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

How to edit php.ini

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by sami1983, Aug 4, 2012.

  1. sami1983

    sami1983 Guest

    0
     
    I am managing my clients server and I need to edit the php.ini for some new directives, I don't have the root password, but I am logged in as the admin, I would need either a password for root or to add my account to the sudoer, any ideas would be much appreciated.
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Why "PHP Settings" tab for domain is not enough for you?
     
  3. sami1983

    sami1983 Guest

    0
     
    Why? "PHP Settings" tab is in "Custom View Settings", that's why. Who is the genius who decided to put it in the 'view' settings? It's certainly miscategorized and that's not the first place I'd look for PHP settings. The only relavent tab in the Custom View Settings is Administrative Tools. Change the name to 'Custom Settings' and then ask me whether it's enough for me or not and I'd be glad to let you know, Igor.
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    "Custom View Settings"? Hmmm... I see this tab in Hosting setting for domain. Look at attached picture.
     
  5. sami1983

    sami1983 Guest

    0
     
    Is that for domain-specific PHP settings? If you look under the Server/Custom View Settings/PHP Settings, it's the same, unless it's for the server-wide settings.
     
    Last edited by a moderator: Aug 5, 2012
  6. tanatonaut

    tanatonaut New Pleskian

    10
    85%
    Joined:
    Feb 9, 2013
    Messages:
    14
    Likes Received:
    0
    Здравствуйте!

    У меня есть веб сервер на plesk.
    В силу внутренних причин мне необходимо изменить sendmail_path на всех доменах сервера.
    С сайтами на модуле Apache всё просто - там php.ini один.
    Но на сервере также около сотни сайтов в режиме FastCGI. php.ini у каждого свой, соответственно.

    Из этого всего вытекают вопросы:
    1. Возможно ли изменить содержание всех выделенных php.ini из одного места? (Замена текста в шаблоне PP_CUSTOM_PHP_INI и переконфигурирование всех виртуальных хостов, например )
    2. Если да, то где менять?
    3. Есть второй способ - это find и sed. Перезапишутся ли кастомные php.ini на шаблонные после переконфигурации этого домена\всех доменов?

    Менять вручную я опасаюсь, т.к. не уверен, что при переконфигурировании вирт. хоста не подцепится php.ini из шаблона.


    UPD:
    Проверил, вроде как не перезаписывается и можно менять ручками. Команда здесь:
     
    Last edited: Jun 6, 2013
  7. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    tanatonaut, Вообще, самый правильный способ - это определить нужные кастомные настройки для PHP Settings в сервис плане и засинхронизировать его на существующие подписки. После этого они уже точно не перезапишутся и все новые подписки на этом плане будут создаваться уже с этими кастомными настройками.

    Кстати, по-умолчанию на форуме принято писать на English. Поэтому, прошу все же придерживаться этого правила, для удобства остальных пользователей. Спасибо.
     
  8. tanatonaut

    tanatonaut New Pleskian

    10
    85%
    Joined:
    Feb 9, 2013
    Messages:
    14
    Likes Received:
    0
    IgorG,
    Учту Ваше замечание, спасибо.
    Based on my recent experience:
    the most correct way of your - the wrong way, in my opinion.
    Let me explain my point of view:
    1. I have 15 service plans. I know the key combination "copy - paste", but this is too much.
    2. Changes in the config of service plans will not be affected on locked for editing subscriptions. For example, if I change the memory limit on the domain, his subscription will be impossible to change even if you change the service plan.
    3. Because I'm changing sendmail_path in all domains, I, naturally, modified /etc/php.ini. Php.ini template for new domains is taken there, and the directives from (123.png ) are added to it.
    4. Most importantly, if I add here (123.png ) directive, which is already in the default php.ini, then plesk core NOT overwrite it, and add it as a new row. This will cause a crash the web server, followed by a denial of service.
     
    Last edited: Jun 6, 2013
  9. IgorG

    IgorG Forums Analyst Staff Member

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