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

10.3 - How to Apply Custom PHP Settings IN CGI/FastCGI Mode to 'EXISTING DOMAINS'?

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by andyb-uk, Aug 23, 2011.

  1. andyb-uk

    andyb-uk New Pleskian

    20
     
    Joined:
    Aug 17, 2009
    Messages:
    15
    Likes Received:
    0
    Hi

    This relates to my last post however this is more of a specific question...

    Last post: http://forum.parallels.com/showthread.php?t=113236

    I realise that if I edit/create a php.ini file in

    /var/www/vhosts/.skel/0/conf/php.ini

    I can disable open_basedir for all new domains - and 'IMPORTANTLY' when I change PHP settings in Plesk it doesn't overwrite the php settings...

    How do I apply the setting for all the old domains too ?
    - Is there a way to ensure that php.ini settings for old domains (i,e before creating the
    /var/www/vhosts/.skel/0/conf/php.ini file) are not destroyed by Plesk when updating hosting settings? (specifically the open_basedir setting)

    Regards
     
  2. ManuelF

    ManuelF New Pleskian

    20
     
    Joined:
    Oct 22, 2009
    Messages:
    11
    Likes Received:
    0
    maybe this helps you:

    i don't know why /etc/php.ini doesnt affect any vhosts, but what affects any vhost is /etc/php.d/*.ini.
    So I just created /etc/php.d/custom.ini and added some settings, like upload-size, default timezone, ...

    after apache restart it should work.

    manuel
     
  3. andyb-uk

    andyb-uk New Pleskian

    20
     
    Joined:
    Aug 17, 2009
    Messages:
    15
    Likes Received:
    0
    Hi.

    Yes that seems to have worked.

    Thanks a lot for the hint.

    (why the hell did Plesk make this change - Plesk on Linux is increasingly like being on windows...)
     
  4. Sergey L

    Sergey L Golden Pleskian Staff Member

    32
    43%
    Joined:
    Aug 10, 2006
    Messages:
    1,195
    Likes Received:
    30
    You can put you custom directives into .../conf/php.ini of each domain. It won't be overwritten by Plesk ever.
    Chckout this thread for more information on how it works
     
  5. Revenant

    Revenant Guest

    0
     
    @Sergey: This solution does not work.

    Plesk 10.3 ALWAYS overrides register_globals for me, i tried setting it for Master in php.ini, in the Domain itself via php.ini and vhost.conf, it all doesn't matter. Looks like a bad bug in 10.3.

    For test I just installed Drupal as an App on Windows Server 2k8 with Plesk, and searched all domain and plesk folders for entries in files with "register_global", and really NOWHERE it is set On.

    But Plesk keeps the value On for all Domains, anyway, as I can see at phpinfo(). So what is wrong there, internal?
     
Loading...