Skip navigation.
Home

Gentoo: PHP CGI compilation problems and symptoms (phpmyadmin, gentoo, cookies)

This is just a note to be found by search engines.

I had a weird problem with a configuration of phpmyadmin on top of lighttpd on top of Gentoo Linux.

The symptom was that phpmyadmin said "cookies must be enabled". Cookies were enabled in my browser.

A test of the setcookie() function in PHP (and the header() function as well) seemed to indicate that no header lines were being sent.

Turns out that this is related to the versions of PHP being installed.

http://www.gentoo.org/proj/en/php/php-upgrading.xml

My problem was that I wasn't compiling the CGI version of PHP. I probably had the CLI version installed.

To force the CGI version, add 'cgi' to your USE. (This is in /etc/make.config.)

Rebuild it (emerge php) and wait.

Then, check that /usr/bin/php-cgi exists, and alter your lighttpd.conf file or mod_cgi.conf file to reflect this fact.

Hope this helps.