Jump to content

suPHP and php.ini


Recommended Posts

Hi,

 

A friend of mine has just bought a dedicated server and has asked me to do a few things to it. One thing he wants of the max execution time to be 1800, so I checked phpinfo which said that the php.ini file was in /etc/php5/cgi however none of the changes I make in this file take effect.

 

I then noticed that the Loaded Configuration File value in phpinfo is set to /etc/suphp/suphp.conf however this file doesn't appear to reference php.ini and doesn't have any of the normal php config stuff in it.

 

I checked another server with suhosin installed and the 2 values (Configuration File (php.ini) Path, Loaded Configuration File ) were the same (/etc/php5/apache2 and /etc/php5/apache2/php.ini)

 

Is the server configured wrong, and if so how can I change where PHP looks for its config data.

 

Thanks,

 

Jon

Link to comment
Share on other sites

I then noticed that the Loaded Configuration File value in phpinfo is set to /etc/suphp/suphp.conf however this file doesn't appear to reference php.ini and doesn't have any of the normal php config stuff in it.

 

The loaded configuration files section of phpinfo simply shows other (extra) configuration files that have been loaded. Not all config options need go within the php.ini. In fact most distrobutions put each extensions configuration within its own ini files so extensions can easily be installed separately.

 

You don't need to restart the server when running under cgi but you might give it a shot. Restart Apache.

 

By the way, I would be running php as an apache module instead of as cgi unless you have specific reasons to do so.

Link to comment
Share on other sites

I then noticed that the Loaded Configuration File value in phpinfo is set to /etc/suphp/suphp.conf however this file doesn't appear to reference php.ini and doesn't have any of the normal php config stuff in it.

 

The loaded configuration files section of phpinfo simply shows other (extra) configuration files that have been loaded. Not all config options need go within the php.ini. In fact most distrobutions put each extensions configuration within its own ini files so extensions can easily be installed separately.

 

You don't need to restart the server when running under cgi but you might give it a shot. Restart Apache.

 

By the way, I would be running php as an apache module instead of as cgi unless you have specific reasons to do so.

 

This is what I see in phpinfo - usually the first two are the same and the additional files are shown below. We've restarted apache a number of times.

 

Configuration File (php.ini) Path /etc/php5/cgi

 

Loaded Configuration File         /etc/suphp/suphp.conf

 

Scan this dir for additional .ini files /etc/php5/cgi/conf.d

 

additional .ini files parsed         /etc/php5/cgi/conf.d/curl.ini, /etc/php5/cgi/conf.d/gd.ini, /etc/php5/cgi/conf.d/mcrypt.ini, /etc/php5/cgi/conf.d/mysql.ini, /etc/php5/cgi/conf.d/mysqli.ini, /etc/php5/cgi/conf.d/pdo.ini, /etc/php5/cgi/conf.d/pdo_mysql.ini, /etc/php5/cgi/conf.d/pspell.ini, /etc/php5/cgi/conf.d/xmlrpc.ini

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.