PDA

View Full Version : Installing FastCGI has broke squirrelmail and phpmyadmin


crimson
12-11-2009, 09:57 AM
I'm on debian lenny and recently installed FastCGI for php in ISPManager via this post: http://forum.ispsystem.com/en/showthread.php?t=802&highlight=fastcgi

Now, I can't get into phpmyadmin or webmail.

If I try to restart apache2, I get:

Syntax error on line 6 of /etc/apache2/conf.d/phpmyadmin.conf:
Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration


After a lot of searching, I found that fastcgi apparently cannot be used with php_admin_flags (as those are php_mod calls) and therefore the two files

phpmyadmin.conf:


Alias /x /usr/share/phpmyadmin/
<Directory /usr/share/phpmyadmin>
AllowOverride All
RemoveHandler .php
AddType application/x-httpd-php .php
php_admin_value open_basedir /usr/share/phpmyadmin:/etc/phpmyadmin:/etc/phpMyAdmin:/tmp:.:..:./:../
php_admin_value upload_tmp_dir /tmp
php_admin_value include_path /etc/phpmyadmin:/etc/phpMyAdmin:.:..
php_admin_value session.save_path /tmp
php_admin_value safe_mode off
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>


and squirrelmail.conf:


Alias /x /usr/share/squirrelmail
<Directory /usr/share/squirrelmail>
RemoveHandler .php .php3 .php4 .phtml
AddType application/x-httpd-php .php .php3 .php4 .phtml
php_admin_value open_basedir none
php_admin_value upload_tmp_dir /tmp
php_admin_value session.save_path "/tmp"
php_admin_value include_path .:..
php_admin_value safe_mode off
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>


won't let apache restart since they make calls to php_admin_value. If I comment these lines out, I can restart apache, but then of course phpmyadmin and webmail don't work.

Is there a way around this? Can these files be rewritten to work with fastcgi?

Thank you for any help!

slava
12-11-2009, 11:01 PM
Are you have mod_php (libapache2-mod-php5) installed?

You need see like this by dpkg -l command

# dpkg -l | grep php
ii libapache2-mod-php5 5.2.0-8+etch7 server-side, HTML-embedded scripting languag
ii php5-cgi 5.2.0-8+etch7 server-side, HTML-embedded scripting languag
ii php5-cli 5.2.0-8+etch7 command-line interpreter for the php5 script
ii php5-common 5.2.0-8+etch7 Common files for packages built from the php
ii php5-mysql 5.2.0-8+etch7 MySQL module for php5


If you have no this module (but I do not know how you can removed this) you need install by apt-get install libapache2-mod-php5 command


Also this module must be loaded (enabled) into apache configuration via symbol link

server:/etc/apache2/mods-enabled# ls -l php5.load
lrwxrwxrwx 1 root root 27 Apr 10 2009 php5.load -> ../mods-available/php5.load
server:/etc/apache2/mods-enabled# ls -l php5.conf
lrwxrwxrwx 1 root root 27 Apr 10 2009 php5.conf -> ../mods-available/php5.conf