.htaccess file/httpd.conf

sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Thu, 2004-12-23 23:12

it seems like my host is always changing things around on their end that affect my gallery negatively. the newset is that i am unable to upload images over 2mb in size. i tried to run the configuration wizard and here is where i found the problem... in step 1.

Quote:
Warning!

Apache is not obeying the 'php_value' lines in your .htaccess file. Try entering the following into your web server's httpd.conf file:
<Directory /home/origin/public_html>
AllowOverride Options FileInfo
</Directory>
If you are running PHP in CGI mode, this message is unavoidable.

after contacting my host to request that this line be put into the httpd.conf file...

Quote:
<Directory /home/origin/public_html>
AllowOverride Options FileInfo
</Directory>

...they told me to put this line in my .htaccess file. after doing this i immediately got this error:

Quote:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator,

and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at www.origin-studio.com Port 80

any simple solutions?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Thu, 2004-12-23 23:17

Yeah, get your hosts act sorted....

Seriously, you can't add that to the .htaccess file, since thats what enables php directives in .htaccess in the first place...

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Fri, 2004-12-24 01:15

If all else fails, you can take your monthly fee to another provider that doesn't change things all the time and break your shit.

 
sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Mon, 2004-12-27 17:28

my host said:

"Hello Rick,
AllowOverride Options FileInfo is already set in our httpd.conf."

however, the problem still persists. i can't upload pictures larger than 2mb. i ran the configuration wizard again and i got... "Apache is not obeying the 'php_value' lines in your .htaccess file."

any ideas? :-?

 
sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Mon, 2004-12-27 18:17

when i try to upload a file over 2mb this is the error message i get:

Processing status...

- Adding DSCF0073.JPG
   Resizing/compressing original image
Warning: getimagesize(/home/origin/public_html/albums/album01/aac.jpg): failed to open stream: No such file or directory in /home/origin/public_html/util.php on line 436

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2004-12-27 18:43

Well, your host has to change it, you can't as long as the PHP directives in .htaccess is not followed.

 
sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Tue, 2004-12-28 03:51

here is the response i got back from my host:

Quote:
Rick,

the # next to the php directives makes them not work because if you use them in the .htaccess file it will cause a 500 internal error.

You need to use php directives in a php.ini file instead.

does what he's saying make any sense? here is my .htaccess in full:

# BEGIN Gallery section
# (Automatically generated.  Do not edit this section)
# Note: still under development, so format may change.
# If you edit this file, make a backup before runnng the Config. Wizard.


Options -Indexes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([0-9]+)$	/view_photo.php?set_albumName=$1&index=$2	[QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$	/view_photo.php?set_albumName=$1&id=$2	[QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/$	/$1	[R]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)$	/view_album.php?set_albumName=$1	[QSA]
</IfModule>
# END Gallery section.  Add User changes below this line

#php_value post_max_size 30971520 
#php_value upload_max_filesize 30971520 
#php_value magic_quotes_gpc off 


Options +FollowSymLinks 
<IfModule mod_rewrite.c> 
</IfModule> 



Redirect temp /guestbook/addentry.php http://www.origin-studio.com

Redirect permanent /sets.php http://www.originstudio.com

Redirect permanent /pink.php http://www.originstudio.com

Redirect permanent /galleries/ http://www.originstudio.com

Redirect permanent /dirty_white.php http://www.originstudio.com




Redirect temp /galleries/dirty_white/01.php http://www.origin-studio.com






RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://melliart.origin-studio.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://melliart.origin-studio.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://origin-studio.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://origin-studio.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://originstudio.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://originstudio.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.melliart.origin-studio.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.melliart.origin-studio.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.origin-studio.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.origin-studio.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.originstudio.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.originstudio.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

this is the .htaccess that was generated by gallery.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-12-28 07:20

If you do have access to your own php.ini file, thats fine. You can add the

Quote:
#php_value post_max_size 30971520
#php_value upload_max_filesize 30971520
#php_value magic_quotes_gpc off

Lines to it, but they need some modifications, like removing the #php_value part of them.

 
sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Tue, 2004-12-28 14:43
Quote:
If you do have access to your own php.ini file, thats fine.

the solution to my problem is out of my skill set :-?

are there any basic tutorials on this php.ini and it's functions?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-12-28 17:21

php.net has all you need! :-)