Issue Unable to select 'run PHP as..' on /smb/web/php-settings

Discussion in 'Plesk Onyx' started by Holtes Design, Apr 20, 2017 at 5:14 AM.

Tags:
  1. Holtes Design

    Holtes Design New Pleskian

    2
    20%
    Joined:
    Jan 20, 2017
    Messages:
    4
    Likes Received:
    0
    Location:
    Netherlands, Amsterdam
    Dear All,

    Info:
    OS ‪CentOS Linux 7.3.1611 (Core)‬
    Product Plesk Onyx
    Version 17.5.3 Update #3, last updated on April 19, 2017 04:29 AM

    Problem:
    As of today we were prompted by a client that he can no longer select a PHP version on any subscription with the PHP-settings button. The dropdown with installed PHP versions does appear, but the 'run PHP as' dropdown remains empty.

    screenshot1.png:
    [​IMG]

    When selecting a different version from the dropdown the following error comes up (where the id is the subscription id):
    {"redirect":"\/web\/php-settings\/id\/293","status":"error","statusMessages":[]}

    screenshot2.png:

    [​IMG]

    When navigating back to the subscriptions panel the error 'Permission Denied' is printed above the subscription (on top of the page).

    screenshot3.png
    [​IMG]

    Changing the PHP versions from the 'Hosting Settings' menu does work. It is possible to select a PHP version and 'run PHP as..' is also available.

    screenshot4.png:
    [​IMG]

    Question:

    There is no output in /var/log/sw-cp-server/error_log and /var/log/sw-cp-server/sw-engine.log. Neither does the plesk repair module output anything of interest.

    I'm kinda lost here, any help or suggestions would be appreciated!
     
  2. UFHH01

    UFHH01 Platinum Pleskian Plesk Guru

    40
    64%
    Joined:
    Jun 11, 2013
    Messages:
    4,919
    Likes Received:
    1,017
    Location:
    Hamburg / Germany
    Hi Holtes Design,

    could you pls. post the output of ( logged in as user "root" over SSH ):

    Code:
    plesk bin php_handler --list

    Pls. consider as well to use the "RE-READ" option and check again the listing. ( => plesk bin php_handler --reread )
     
    Holtes Design likes this.
  3. Holtes Design

    Holtes Design New Pleskian

    2
    20%
    Joined:
    Jan 20, 2017
    Messages:
    4
    Likes Received:
    0
    Location:
    Netherlands, Amsterdam
    Dear UFHH01,

    Thanks for your quick reply, really appreciated.

    Please find the output attached.
     

    Attached Files:

  4. UFHH01

    UFHH01 Platinum Pleskian Plesk Guru

    40
    64%
    Joined:
    Jun 11, 2013
    Messages:
    4,919
    Likes Received:
    1,017
    Location:
    Hamburg / Germany
    Hi Holtes Design,

    did you notice, that some PHP - handler are disabled by default now?
    Code:
          plesk-php54-cgi               5.4.45         5.4.45       5.4      cgi   /opt/plesk/php/5.4/bin/php-cgi  /opt/plesk/php/5.4/bin/php  /opt/plesk/php/5.4/etc/php.ini     true disabled
    
          plesk-php56-cgi               5.6.30         5.6.30       5.6      cgi   /opt/plesk/php/5.6/bin/php-cgi  /opt/plesk/php/5.6/bin/php  /opt/plesk/php/5.6/etc/php.ini     true disabled
    
                   module  5.4.16 by OS vendor         5.4.16       5.4   module                 /usr/bin/php-cgi                /usr/bin/php                    /etc/php.ini    false disabled
    
          plesk-php53-cgi               5.3.29         5.3.29       5.3      cgi   /opt/plesk/php/5.3/bin/php-cgi  /opt/plesk/php/5.3/bin/php  /opt/plesk/php/5.3/etc/php.ini     true disabled
    
          plesk-php70-cgi               7.0.18         7.0.18       7.0      cgi   /opt/plesk/php/7.0/bin/php-cgi  /opt/plesk/php/7.0/bin/php  /opt/plesk/php/7.0/etc/php.ini     true disabled
                      cgi  5.4.16 by OS vendor         5.4.16       5.4      cgi                 /usr/bin/php-cgi                /usr/bin/php                    /etc/php.ini    false disabled

    To enable the disabled PHP - handler, you might use for example:
    Code:
    plesk bin php_handler --enable -id plesk-php54-cgi
    or
    Code:
    plesk bin php_handler --enable -id plesk-php70-cgi
    I still have to mention, that these DISABLED PHP - Handler are declared as insecure by now and therefore should be used anymore!


    Pls. go as well to your subscription settings and check the default settings for each subscription and pls. don't forget that with your service plans, you might change all subsriptions at once, after changing the setting and syncing should be done automatically ( if the subscriptions are not "locked" ).


    If you checked your settings and still experience any issues/erorrs/problems as described, pls. consider to use as well the Plesk Repair Utility: => Plesk Repair Utility

    Example usage:
    Just check, WITHOUT repair!
    Code:
    plesk repair all -n -v
    Repair modus WITHOUT automatic YES answers to each question
    Code:
    plesk repair all -v
    Repair modus WITH automatic YES answers to each question
    Code:
    plesk repair all -n -v
    Consider to POST the corresponding repair - log from "/var/log/plesk", if you still experience issues after your repair procedure.​



    Additional notice:

    Sometimes, it is as well a good idea to change the log - level ( TEMPORARILY! ), to get more informations in Plesk - log - files:

     
  5. Holtes Design

    Holtes Design New Pleskian

    2
    20%
    Joined:
    Jan 20, 2017
    Messages:
    4
    Likes Received:
    0
    Location:
    Netherlands, Amsterdam
    Dear UFHH01,

    When opening /usr/local/psa/admin/logs/panel.log I noticed that I did manage to retrieve some info from the Plesk Log when I reproduced the problem this morning. Perhaps this wil help you?

    Code:
    [2017-04-20 10:22:42] ERR [panel] Permission denied.
    [20-Apr-2017 10:22:44 UTC] PHP Warning: array_key_exists(): The first argument should be either a string or an integer; File: /usr/local/psa/admin/plib/Smb/Form/Final/Web/PhpSettings.php, Line: 98
    
    [2017-04-20 10:22:44] ERR [1] PHP Warning: array_key_exists(): The first argument should be either a string or an integer; File: /usr/local/psa/admin/plib/Smb/Form/Final/Web/PhpSettings.php, Line: 98
    
    [2017-04-20 10:24:50] ERR [panel] Permission denied.
    [2017-04-20 10:26:56] ERR [panel] Permission denied.
    [2017-04-20 11:20:23] ERR [panel] Permission denied.
    [2017-04-20 11:46:55] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/vhostmng-content'] with exit code [1]
    [2017-04-20 11:46:55] ERR [1] '/usr/local/psa/admin/bin/vhostmng-content' failed with code 1.
    
    stdout:
    Fatal error: std::runtime_error(can not parse data from stdin : Invalid or unsupported Unicode character or escape sequence found in string. UTF8 encoded characters and '\u' escape sequences are not supported. Error occured at offset 418246, character '\'. Also system error occured: No such file or directory (2).)
    
    
    stderr:
    Fatal error: std::runtime_error(can not parse data from stdin : Invalid or unsupported Unicode character or escape sequence found in string. UTF8 encoded characters and '\u' escape sequences are not supported. Error occured at offset 418246, character '\'. Also system error occured: No such file or directory (2).)
    
    Besides this snippet, I just took all the steps suggested by you. It had no effect on the PHP selector. When repairing Plesk I generated a debug log, please find it attached. Any ideas?
     

    Attached Files:

  6. UFHH01

    UFHH01 Platinum Pleskian Plesk Guru

    40
    64%
    Joined:
    Jun 11, 2013
    Messages:
    4,919
    Likes Received:
    1,017
    Location:
    Hamburg / Germany
    Hi Holtes Design,

    your issue:
    Code:
    Invalid or unsupported Unicode character or escape sequence found in string
    Could point to some issues, when folders/files for example are named with unsupported characters ( i.e. hieroglyphs or something similar ).

    If this is the case, then you might have hit a current bug for such issues and it should be fixed in an upcoming update/upgrade/patch. You might consider to post your "bug" - report as well at => Home > Forum > Plesk Discussion > Reports , so that this may be forwarded to the Plesk developpers. :)
     
Loading...