Applicable to:
- Plesk Onyx for Windows
Symptoms
-
WordPress instance is shown as broken in Domains > example.com > WordPress with the following error in Plesk interface:
PLESK_ERROR: Decoding failed: Syntax error
-
The error like below is displayed in Plesk logs
%plesk_dir%admin\logs\php_error.log
:CONFIG_TEXT: [extension/wp-toolkit] [5b14f2b719fd6] Starting: D:\Plesk\Additional\PleskPHP56\php.exe -dsafe_mode=off -ddisplay_errors=off -dopen_basedir= D:\Plesk\Additional\modules\wp-toolkit\vendor\wp-cli\wp-cli\php\boot-fs.php "--path=D:\vhosts\example.com\httpdocs" admin-username check-password "" ""
[extension/wp-toolkit] [5b14f2b719fd6] Finished, Error code: 20101, stdout: , stderr: Administrator with '' username was not found.
{"err_code":20101,"err_message":"Administrator with '' username was not found."} -
With enabled debug logging the following may be seen:
CONFIG_TEXT: [extension/wp-toolkit] An error has occurred when decoding JSON by Zend_Json: Illegal Token
DEBUG [extension/wp-toolkit] An error has occurred when decoding JSON by Zend_Json: Illegal Token
Trace: #0 C:\Program Files (x86)\Parallels\Plesk\admin\plib\vendor\plesk\zendframework\library\Zend\Json\Decoder.php(113): Zend_Json_Decoder->_getNextToken()
ERR [extension/wp-toolkit] Unable to fetch WordPress multisite flag for WordPress instance #1 ('') Reason: An error has occurred when decoding JSON returned by wp-cli: 'Illegal Token'
Cause
There are BOM symbols in %plesk_vhosts%example.com\httpdocs\wp-includes\functions.php
file, which prevents correct functionality of Wordpress instance in WordPress ToolKit.
The issue is submitted as bug #EXTWPTOOLK-1583, which is planned to be fixed in one of the future Plesk updates.
Resolution
Until the fix is available use the following workaround:
-
Log into the server via RDP;
-
Download the attachment with the script which converts BOM symbols into UTF-8 and unpack it in C:/;
-
Open Command Prompt as Administrator and execute the following command, replacing example.com with the name of the domain where issue exists:
C:\> php.exe "C:\check_utf8.php" "%plesk_vhosts%example.com\httpdocs\"
Comments
2 comments
tengo este error: An error has occurred when decoding JSON: Decoding failed: Syntax error
Relacionado con Wordpress
Sobre servidor Windows Server 2012 y Plesk Obsidian Version 18.0.26
He probado comando recomendado arriba pero la ruta no es correcta, no hay forma
php.exe "C:\Users\root\check_utf8.php" "%plesk_vhosts%domain.com\httpdocs\"
----
ERROR
"php.exe" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
Hello Guillermo Mon
Please, try specifying the full path to php.exe installed via Plesk as specified here: https://docs.plesk.com/en-US/obsidian/administrator-guide/76345/
Please sign in to leave a comment.