Tonight I changed over from Apache MPM Prefork to Worker MPM, after learning this is generally supported by ISPManager that I run, I had already changed to using mod_fcgid for PHP, but hadn’t removed mod_php as this was going to do as I run Debian and it has to be one or the other, installation was fairly simple until I was greeted by an apache error upon first run:
Starting web server: apache2Syntax 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 failed!
I quickly learned that this is because fcgi doesn’t support the php_admin_value command, so I went into phpmyadmin.conf and commented out those lines, I was then shown the same error by squirrelmail.conf, so I did the same and the server was able to start.
After this I tried PHPMyAdmin and Squirrelmail finding that there’s no handler for them and then I realised that they are running on the ssl server with ISPManager, so here is the solution (or atleast workaround) to get PHPMyAdmin and Squirrelmail to work again with ISPManager and fcgi.
First going back to /etc/apache2/conf.d/phpmyadmin.conf I edited in the initial commands to spawn fast cgi, you’ll notice I basically just copied from ISPManager’s user apache sections:
Alias /myadmin /usr/share/phpmyadmin/ <Directory /usr/share/phpmyadmin> FCGIWrapper /usr/share/phpmyadmin-php-bin/php .php FCGIWrapper /usr/share/phpmyadmin-php-bin/php .php3 FCGIWrapper /usr/share/phpmyadmin-php-bin/php .php4 FCGIWrapper /usr/share/phpmyadmin-php-bin/php .php5 FCGIWrapper /usr/share/phpmyadmin-php-bin/php .phtml 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 /etc/apache2/conf.d/squirrelmail.conf:Alias /webmail /usr/share/squirrelmail <Directory /usr/share/squirrelmail> FCGIWrapper /usr/share/squirrelmail-php-bin/php .php FCGIWrapper /usr/share/squirrelmail-php-bin/php .php3 FCGIWrapper /usr/share/squirrelmail-php-bin/php .php4 FCGIWrapper /usr/share/squirrelmail-php-bin/php .php5 FCGIWrapper /usr/share/squirrelmail-php-bin/php .phtml #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>
Now to create the respective php-bin directories:
Create a file called php in a new folder /user/share/phpmyadmin-php-bin/ and in /user/share/squirrelmail-php-bin/ with the contents:#!/usr/bin/php5-cgi
Make sure it has execute permissions for apache, perhaps changing the owner to apache’s user/group would work, but apache must have execute permissions for this file or you will get a server error.
Lastly put the values for php_admin_value for PHPMyAdmin and Squirrelmail into a php.ini file in their own respective php-bin folders and you should be good to go, restart apache and they both should work fine again.