Ubuntu Apache mod_fcgid phpMyAdmin from repositories

I run all my Apache+PHP servers using mod_fcgid, and not mod_php5. When you install phpMyAdmin from the repositories in Ubuntu, it assumes mod_php5, and it won't work.


Ok, I got it to work. I hope it helps someone by putting it here.I had to change the /etc/apache2/mods-enabled/fcgid.conf to tell it to use php5-cgi:
root@srvr-test:/etc/apache2/mods-enabled# cat fcgid.conf
AddHandler fcgid-script .fcgi .php

FcgidConnectTimeout 20

# Where to look for the php.ini file?
# Maximum requests a process handles before it is terminated
MaxRequestsPerProcess 1000
# Maximum number of PHP processes
MaxProcessCount 10
# Number of seconds of idle time before a process is terminated
IPCCommTimeout 240
IdleTimeout 240
#Or use this if you use the file above
FCGIWrapper /usr/bin/php5-cgi .php

ServerLimit 500
StartServers 3
MinSpareThreads 3
MaxSpareThreads 10
ThreadsPerChild 10
MaxClients 300
MaxRequestsPerChild 1000

PHP_Fix_Pathinfo_Enable 1

Then I had to edit /etc/phpmyadmin/apache.conf to add +ExecCGI in the section:

root@srvr-sandbox1:/etc/phpmyadmin# cat apache.conf
# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

Options FollowSymLinks +ExecCGI
DirectoryIndex index.php
....

Comments