Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Took me about 4 hours to get a FastCGI + SuPHP running off Ubuntu 11.10 and i'm now happy that it works mighty fine except for ONE big problem.

Custom php.ini's don't seem to load. I tried changing some options and then firing off a phpinfo() and nothing changes in the phpinfo() which leads me to think that there is definitely a problem with the loading of the configuration file.

<IfModule mod_suphp.c>
    AddHandler x-httpd-php .php
    <Location />
        SuPHP_AddHandler x-httpd-php
    </Location>
    suPHP_ConfigPath /home/mdumoulin/Documents/tests/tests
    suPHP_Engine on
</IfModule>

As you can see, i took great care in making sure i wasn't referencing the php.ini file itself but the directory of the vhost.

In the php.ini located in "/home/mdumoulin/Documents/tests/tests/php.ini", you can find:

[PHP]
error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE
display_errors = Off

And the log in /var/log/suphp/suphp.log doesn't contain anything relevant, (only old errors that occured before this post while i was testing suphp...

So i'm stumped there, dunno what more i can do! Anyone got an idea?


EDIT:

FINALY, got time to work on this, i disabled FCGI and only enabled SuPHP but after restarting i still see "Server API: CGI/FastCGI". Is this what i should be getting or not? I believe that it's normal i get CGI since SUPHP works with a CGI... But i'm not too sure anymore...

share|improve this question

migrated from askubuntu.com Nov 9 '11 at 17:34

This question came from our site for Ubuntu users and developers.

    
Can anyone with enough points transfer this question to ServerFault since there doesn't seem to be any answers here! –  Mathieu Dumoulin Oct 25 '11 at 12:32
    
Mathieu, I'm confused by one thing.. you say you're using fastcgi AND suPHP, but the two are basically mutually exclusive ways to run PHP code isolated per-user. It seems to me that you are only running suPHP. –  SpamapS Nov 9 '11 at 17:32
    
The tutorial i used and god it was hard to find one that would work correctly said that i needed mod_fcgid and mod_suphp. Both are enabled on my server and mod_php5 is disabled. –  Mathieu Dumoulin Nov 9 '11 at 19:26
1  
SuPHP does not speak FCGI and will only talk to Apache via CGI. What does phpinfo() say for your server API? If it says FastCGI, then that's your problem. It should say CGI if SuPHP is your default PHP loader. –  Garrett Nov 15 '11 at 21:50
    
"Server API CGI/FastCGI" so thats probably why it doesn'T work, we are not even running it under suphp... lol, i'll try to see what i can do to disable that and still make it work... Thanks for the pointer –  Mathieu Dumoulin Nov 16 '11 at 18:20

1 Answer 1

Why don't you drop suPHP/FastCGI, and switch over to PHP-FPM. With that, you can define one pool per user, and not have to worry about configuring suPHP. You also get better performance, because it doesn't need to start a new process for every request.

To actually answer your question, seeing CGI/FastCGI as the API is 100% correct for suPHP.

share|improve this answer

Your Answer

 
discard

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.