phpMyAdmin installation errors

When installing phpMyAdmin 3.3.10 on my Nginx 0.8.76, PHP-FPM 5.3.6 (w/ APC + memcached) & MySQL 5.5.9 setup, I first encountered this problem:


2011/04/06 14:17:36 [error] 32174#0: *9366 FastCGI sent in stderr: "PHP Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0
PHP Warning: require_once(): Unable to allocate memory for pool. in /PATH/TO/MYSITE/phpmyadmin/index.php on line 35
PHP Warning: require_once(): Unable to allocate memory for pool. in /PATH/TO/MYSITE/phpmyadmin/libraries/common.inc.php on line 53
PHP Warning: require_once(): Unable to allocate memory for pool. in /PATH/TO/MYSITE/phpmyadmin/libraries/Error_Handler.class.php on line 13
PHP Warning: require_once(): Unable to allocate memory for pool. in /PATH/TO/MYSITE/phpmyadmin/libraries/Error.class.php on line 13" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: www.example.com, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.example.com"

I corrected this by editing /etc/php.d/apc.ini and setting apc.shm_size=64M.

Next, I encountered the following error:


011/04/06 16:54:35 [error] 7399#0: *492 FastCGI sent in stderr: "PHP Fatal error: Class 'PMA_Message' not found in /PATH/TO/MYSITE/phpmyadmin/libraries/Message.class.php on line 732" while reading upstream, client: xxx.xxx.xxx.xxx, server: www.example.org, request: "GET /phpmyadmin/phpmyadmin.css.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.example.org"

I found a hint to fix the problem, and discovered that PHP packages installed by the IUS Community Project store sessions into /var/lib/php/session, which is owned by apache:apache. Since I don’t use apache, I had changed both the PHP-FPM pool user and group to “nginx”, and that change removed PHP-FPM’s ability to write to sessions.

Lessons learned:

  • PHP packages installed via the IUS Community Project attempt to save sessions to /var/lib/php/session, which is owned by apache:apache. Keep this in mind when modifying permissions or the accounts under which the services run.