Gallery and PHP 4.3.10 .htaccess oddness

ret

Active Member
Nov 5, 2004
31
0
156
PHP 4.3.10
Zend Optimizer v2.5.7
Zend Engine v1.3.0
ionCube PHP Loader v2.5
Zend Extension Manager v1.0.6


Upgraded php, zend, then installed ion for freebsd.

I have phpsuexec installed and "set" in Fantastico. I installed Gallery and receave "Internal Server Error". When I removed the preinstalled .htaccess file the page loads file but I get a 404 on all the files. This worked fine before the upgrade. Are there now some incompatible lines in the generated .htaccess file that are not working w/ phpsuexec and the newest version of php.

# 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.


php_value post_max_size 20971520
php_value upload_max_filesize 20971520
php_value magic_quotes_gpc off
php_value session.save_handler files

<IfModule sapi_apache2.c>
php_value session.bug_compat_warn off
</IfModule>

<IfModule mod_php4.c>
php_flag session.bug_compat_warn off
</IfModule>

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

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

haze

Well-Known Member
Dec 21, 2001
1,540
3
318
Those php value directives and the flags need to be removed and added to a php.ini within the install directory. With phpSuExec installed they will not function and just produce errors in .htaccess as php is no longer an apache module.

tail -f /usr/local/apache/logs/error_logs while bringing up the page it should show you any errors if they persist. It might also be in an error_log in the directory the script is in.
 

ret

Active Member
Nov 5, 2004
31
0
156
Thanks for the quick reply. Is this a known issue. I would think that Fantasico knowing that I have phpsuexec installed would not have added these .htaccess files.
 

haze

Well-Known Member
Dec 21, 2001
1,540
3
318
I'm not to sure we don't use fantastico, but i'd guess its a bug with their software. If, as you said you had fantastico set to recognize phpsuexec, then it should put those options in a php.ini file. You might want to try contacting the fantastico dev team for assistance.
 

ret

Active Member
Nov 5, 2004
31
0
156
Thanks so much for your help. The logs pointed out that apache was confused w/ php_value. I commented the values out and everything is working as expected. I'll try and remb. to check later to see if Fantastico is aware of the problem.

Thanks again.