1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Does custom php.ini require dedicated IP?

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by BrittT, Jan 22, 2013.

  1. BrittT

    BrittT New Pleskian

    12
    85%
    Joined:
    Jul 12, 2011
    Messages:
    6
    Likes Received:
    0
    I am trying to use custom php.ini configurations for some of the subscriptions running FastCGI, but it is not picking up the new values. I have tried to modify values, specifically session.save_path, using a file in ../conf/php.ini and have also attempted to use custom values in the Control Panel for the specific subscription. I have combed through most of the forum posts on this topic that I can find but haven't found any real solutions to getting it working consistently. One post seems to indicate it will only work for subscriptions with a dedicated IP.

    I am running PP 10.4.4 Update #47 on RHEL 5.6 with PHP 5.3. Any help would be greatly appreciated!
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  3. BrittT

    BrittT New Pleskian

    12
    85%
    Joined:
    Jul 12, 2011
    Messages:
    6
    Likes Received:
    0
    I have read those and similar KBs and the Plesk 10.4 documentation multiple times and unless I am missing something everything is set up correctly for the Webspace. I have PHP Support set to FastCGI Application and I have the following in conf/php.ini...

    ------------
    PHP:
    open_basedir "/var/www/vhosts/<domain>/httpdocs:/var/www/vhosts/<domain>/data:/var/www/vhosts/<domain>/site_temp:/var/www/vhosts/<domain>/site_uploads:/var/www/vhosts/<domain>/site_sessions"
    upload_tmp_dir "/var/www/vhosts/<domain>/site_temp"

    [Session]
    session.save_path "/var/www/vhosts/<domain>/site_sessions"
    ------------

    I see that these values are being picked up by Plesk and put in etc/php.ini but they are not being used by the running FastCGI PHP processes as I only see default values in a phpinfo() page.
     
  4. BrittT

    BrittT New Pleskian

    12
    85%
    Joined:
    Jul 12, 2011
    Messages:
    6
    Likes Received:
    0
    I would think that with the addition of the custom configuration the php-cgi process would now run with the -c option and include the path to the new php.ini file, but the processes are not running with any additional options.


    As a sidenote if I create a new .ini file in /etc/php.d using the [HOST=] option and the specific directives they do correctly override the default php.ini for this specific domain. This option is new to PHP 5.3 and also only available for CGI/FastCGI... http://us3.php.net/manual/en/ini.sections.php
     
  5. BrittT

    BrittT New Pleskian

    12
    85%
    Joined:
    Jul 12, 2011
    Messages:
    6
    Likes Received:
    0
    Anyone have additional thoughts?

    It seems fairly straightforward but Plesk is not using the new configurations correctly. I really need to get this working!
     
  6. Sergey L

    Sergey L Golden Pleskian Staff Member

    32
    43%
    Joined:
    Aug 10, 2006
    Messages:
    1,195
    Likes Received:
    30
    Hi Britt,

    I can only tell that php.ini definitely does not depend on dedicated IP. As long as you edit settings through Plesk UI, the values should get into the right file - php.ini for FastCGI and apache config for mod_php.
    With given details it is almost impossible to compare your case with proper configuration. The only similar case I have ever seen before was quite simple - sites were running in mod_php and site owner forgot of this detail.
     
  7. BrittT

    BrittT New Pleskian

    12
    85%
    Joined:
    Jul 12, 2011
    Messages:
    6
    Likes Received:
    0
    The webspace that I'm using to test this configuration is definitely mod_fcgid because I have checked, double, and triple checked that it was configured that way. That would definitely be an irritating discovery at this point. As I stated before, if I create a custom php.ini file in /etc/php.d with a [HOST=] entry and the specific directives I want to override the php-cgi running for this webspace picks up the changes. Howerver, the values that are present in the webspaces etc/php.ini are not being picked up.

    I am wondering if because I upgraded from Plesk 10.2 to 10.4.4 rather than doing a fresh install that something is missing or misconfigured within Plesk.

    Would it be possible for someone to detail how Plesk picks up that their are overridden value and implements them via php-cgi? I assume after seeing changes it would start executing the php-cgi process with the -c option and include the path to the new php.ini file. Is this correct?
     
  8. BrittT

    BrittT New Pleskian

    12
    85%
    Joined:
    Jul 12, 2011
    Messages:
    6
    Likes Received:
    0
    OK, I figured out the problem. I have a custom template for domainVirtualHost and the upgrade process didn't modify that file. So all the new configuration settings for PP_CUSTOM_PHP_INI were not in the httpd.include configurations for the webspaces. I no longer require the changes configured in this custom templates so I removed them and reconfigured my domain(s). My php-cgi process is now running with a "-c /var/www/vhosts/<domain.tld>/etc/php.ini"
     
Loading...