Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running PHP as FastCGI (I needed multiple versions of PHP).


AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php-5.2.17.fcgi


exec $PHP_CGI -c /home/john/www/crm/php.ini

The main issue is that PHP is ignoring -c option. My php.ini files is NOT loaded.

Can anybody share any suggestions?

share|improve this question

My first thought is permissions -- Apache typically runs as a limited user, often www-user or apache, depending on your flavor of Linux and how you installed Apache.

This means that with the default permissions on pretty much all Linuxes (Linii?), the Apache user (which will also be the same user running php-cgi) cannot read any file inside your home directory.

I would move the php.ini file to another location (e.g. /usr/local/php/crm/php.ini), which I suspect will solve your problem here. Another option is to simply spawn the php-cgi process using an entirely separate script, optionally running under its own user account, and have Apache talk to that.

share|improve this answer
I thought about this. Tried everything in this matter ;) I tried moving php.ini to cgi-bin directory, tried to delete -c option. Nothing works. I'm out of ideas. – John S. Jun 7 '11 at 21:53

i'm new to that Topic, so please dont kill me if i'm Wrong but shouldnt you use something like this:

    <Directory "/path/to/doc/root">
      Options Indexes MultiViews FollowSymLinks +ExecCGI
      FCGIWrapper /path/to/cgi-bin/php-5.2.17.fcgi .php
      Order allow,deny
      allow from all

Try using the -d Switch and check in phpinfo if you can change things this way. If it works your probably on the right track (and i am wrong :) )

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.