How to customize PHP settings in Plesk

Follow

Comments

14 comments

  • Avatar
    Michael M.

    Hello,

     

    but how to set setting that uses PHP for Crontab?

    For example i set in global PHH.ini how it written. And also i set it for domain.

    short_open_tag=on

    But when i start crontab, it runs task as short_open_tag=off

    What do i do whong?

     

    Thanks! 

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova

    @Michael M.
    Can you please clarify: do you run domain's Scheduled Task? Do you run it as a command or as a PHP script?

    0
    Comment actions Permalink
  • Avatar
    Michael M.

    Hi, Alisa!

    I run it as PHP Script in Tools & Settings->Scheduled Tasks

    Sorry i do no know (or do not have in panel) what is domain Scheduled Tasks. Please let me know what it is.

    But i take a script from domain folder that i have made.

     

    Suggest please how i must run it to work, and i will make so)

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova

    @Michael M.
    You may create a server-wide scheduled task (Tools & Settings > Scheduled Tasks), or for a specific domain (domain > Scheduled Tasks).
    Make sure that short_open_tag is specified only once in the php.ini (you may use ctrl+f and writing short_open_tag in a browser to find it on the page).
    Try to run the same task as "Run a command", use root user and command like this:
    /opt/plesk/php/7.0/bin/php ./var/www/vhosts/example.com/httpdocs/script-name.php
    Change the 7.0 to other PHP version for which you have enabled short_open_tag (and the script path).
    Check the domain > PHP Settings > View the phpinfo() page, is it showing that short_open_tag on?
    Hope this helps!

    0
    Comment actions Permalink
  • Avatar
    Michael M. (Edited )

    1. To run domain Sheduler - do not work. Also need to say that here http://prntscr.com/musj8y i have ony one choose. But i know nothing if it is FPM or FAstCGI  or maybe one deactivated http://prntscr.com/musjpq

    2. /opt/plesk/ - i do not have this folder. i have only /opt/psa and there no php folder inside.

    3. >>Check the domain > PHP Settings > View the phpinfo() page, is it showing that short_open_tag on?

    When i push this link i get one more error -

    Error: Unable to retrieve information about the PHP configuration. - http://prntscr.com/musm5i

     

    Alisa, could you tell - are you from Plesk support?

     

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Alexandr Redikultsev

    Hi @Michael M.,

    Alisa is indeed from Plesk Support :)

    And I suggest getting in contact with us directly as it seemed like there is some technical issue that worth looking into.

    You can submit a request to Plesk Technical Support as documented here: https://support.plesk.com/hc/en-us/articles/213608509

    0
    Comment actions Permalink
  • Avatar
    Michael M.

    I understood.

    There is full misunderstandnis in configuration. So:

    1. If i run normal Server Sheduler with option - Run a PHP script so it will be processed with this CLI PHP 7.2.15. Its ini is - /etc/php/7.2/cli/php.ini

    2. If i run normal Server Sheduler with option - Run a Command so it will be processed with another PHP 7.1.14. Its ini is - /opt/psa/admin/conf/php.ini

    3. If i run Domain Scheduler with option - Run a PHP script so it will be processed with this CLI PHP 7.2.15 as in first. But it do use domain specified INI file or domain specified ini setting! There is a big problem, that must be solved in next version of plesk.

     

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Taras Ermoshin

    Hello @Michael M.!

    I checked all three methods you mentioned, and here're the results:

    1. Tools & Settings > Scheduled Tasks > Add Task > Run a PHP script

    Depending on the selected PHP version (from OS vendor or provided by Plesk), the main php.ini for the PHP engine is used - it can be /etc/php/7.2/cli/php.ini (I guess you're running Debian 9), /etc/php.ini or /opt/plesk/php/7.1/etc/php.ini.

    2. Tools & Settings > Scheduled Tasks > Add Task > Run a command

    In this case, the used php.ini depends on the PHP binary which is specified in the field Command.

    3. Domains > example.com > Scheduled Tasks > Add Task > Run a PHP script

    The results here are the same as in the server-wide scheduled task (method 1).

     

    If you face different behavior, I recommend you submit a support ticket with providing the detailed steps which can be used to reproduce the issue (screenshots and screencasts can be very helpful in understanding the issue).

    0
    Comment actions Permalink
  • Avatar
    Codders

    For me only the Common settings can be changed (have drop-down lists), the Performance and security settings and the FastCGI settings are read only - why would that be and what can I do about it?

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Codders,

    Do you have administrator access to Plesk?

    Most probably it is limited at Service Plans > "Plan Name" > Permissions.

    If you do not possess such rights, please, contact your Plesk administrator. 

    0
    Comment actions Permalink
  • Avatar
    Codders

    Hi Ivan, I don't see a Service Plans > "Plan Name" > Permissions menu, but I can see this:

     

    Are these the right permissions?

    0
    Comment actions Permalink
  • Avatar
    Codders

    I also spoke with someone from GoDaddy support who had me add

    upload_max_filesize = 64M

    post_max_size = 64M
    max_execution_time = 300
    to the .user.ini file and also create a info.php file. Then the IIS application pool was recycled, waited for 10 minutes, but the installation still fails with the same error message.
    0
    Comment actions Permalink
  • Avatar
    Codders

    have uninstalled WP and installed Joomla, tried to install JEvents and got the same Internal Server Error

    not seeing any new entries in the php error log...

    0
    Comment actions Permalink
  • Avatar
    Nikita Nikushkin

    Hi @Codders,

    > "Hi Ivan, I don't see a Service Plans > "Plan Name" > Permissions menu, but I can see this:"

    Based on the provided screenshot, you are not Plesk administrator and, thus, the "Service Plans" tab is not available for you

    Also, you have no "Hosting performance settings management" permissions granted. As a result, you are unable to edit the "Performance and security settings" and "FastCGI settings"

    Ask your Plesk administrator regarding adding such permission

    > "have uninstalled WP and installed Joomla, tried to install JEvents and got the same Internal Server Error. not seeing any new entries in the php error log..."

    Go to "Plesk > Websites & Domains > example.com > Failed Requests Tracing" and press the "Start Tracing" button

    Reproduce the issue, stop tracing and check the created file

    Based on the error message try to find the solution

    If the issue is still unclear the deeper investigation is required. For this, contact Plesk administrator

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request