Issues with php_handler --replace

Discussion in 'Plesk Automation Suggestions and Feedback' started by SteveITS, Nov 18, 2015.

  1. SteveITS

    SteveITS Tera Poster

    Messages:
    277
    Twice now I have used "php_handler --replace -old-id OLDID -new-id NEWID -service-node x.x.x.x" and get back a success message, but the web site doesn't load it properly. A "ps" shows the PHP file from the old version's directory is still running (via FastCGI). /var/www/vhosts/domain/logs/error_log shows a "Premature end of script headers" message for .php files. If I open the website in the PA user panel, click Website Scripting and Security, I see the new version selected, I click OK, and the site works again. It's like something didn't quite update correctly. I'm pretty sure I've done this before without issue, but it would have been months ago. Has anyone else had this problem on recent update versions?

    (for a bit more context to my question, I'm installing a new PHP version into a different directory, and want to change the sites to use it).

    My second issue is kind of a bug, depending on one's point of view... The --help info says that "replace" is the only command that works on all service nodes, so replacing OLDID with NEWID will make the change on all nodes. However, if one runs "php_handler --replace" without the "-service-node" option, the command incorrectly returns, "The PHP handler "NEWID" is not found." I'm guessing it is looking on the PA management node and not finding it there? It doesn't make much sense to me to require "-service-node" but then run the command on all service nodes anyway...
     
  2. SteveITS

    SteveITS Tera Poster

    Messages:
    277
    I replicated the "replace" issue just now, on a different server... Verify PHP version via ps. Install PHP. Add new handlers. Ps still shows the old version as expected. Run the "replace" and get, "The PHP handler was successfully replaced." Ps still shows the old version. Run "apachectl graceful." Ps shows PHP processes restarted, but still shows the old version. Run "apachectl stop." Ps shows PHP processes ended. After "apachectl start" and a page reload, ps still shows the old version being run for all sites. Website Scripting and Security shows the new version is selected. Change nothing and click OK. Reload page; now ps shows the new version is being run.

    Edit: I opened ticket 2031731.
     
    Last edited: Nov 18, 2015

Share This Page