• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Send-report daily: PHP parse error

Shibumi

Basic Pleskian
Hi,

first of all I constantly got mails from one of our servers (centos 5.5 64bit, Plesk 10.0.1) with the following error message:
/usr/local/psa/libexec/modules/watchdog/cp/send-report daily
PHP Fatal error: Class 'OptionalServices_ServicesConfiguration' not found in /usr/local/psa/admin/plib/common_func.php3 on line 2948

and I applied the hotfix for it:
http://kb.odin.com/en/9329

After replacing the file I'm getting the following error in a daily mail:
Cron <root@domain> /usr/local/psa/libexec/modules/watchdog/cp/send-report daily
PHP Warning: Unexpected character in input: '' (ASCII=2) state=1 in /usr/local/psa/libexec/modules/watchdog/cp/send-report on line 6
PHP Parse error: syntax error, unexpected T_STRING in /usr/local/psa/libexec/modules/watchdog/cp/send-report on line 6

Any idea what this error can be?

Thanks for your help

Best regards
 
Are you sure that you have unpacked attached gz archive file?
 
Hi IgorG,

yes I unzipped the file and copied the extracted file over the existing one. I've done that on other server and there it seems to work but not on this one.
 
It seems like the file was broken during the upload to server, please, re-upload the file and check that md5 sums are the same as for the attached to KB article file.​
 
Hi,

I've downloaded and unpacked the file and copied it over the old one. Now I'm getting an other error:

****************
/bin/sh: /usr/local/psa/libexec/modules/watchdog/cp/send-report: /opt/psa/bin/sw-engine-pleskrun: bad interpreter: No such file or directory
****************

But in my server configuration there is no /opt/psa/bin/sw-engine-pleskrun, this file exists in /usr/local/psa/bin/sw-engine-pleskrun.

So I changed the first line of the file from

***********************
#!/opt/psa/bin/sw-engine-pleskrun > #!/usr/local/psa/bin/sw-engine-pleskrun
***********************

I have to see if the new file is working now.

Thanks for your help IgorG

With best regards
 
Hi IgorG,

do u have a modified send-report file where the first line starts with "/bin/sh: /usr/local/psa/" instead of "/opt/psa/bin/" because manually editing with nano breaks the file and I get the following error as daily mail:

************
PHP Warning: Unexpected character in input: '' (ASCII=2) state=1 in /usr/local/psa/libexec/modules/watchdog/cp/send-report on line 6
PHP Parse error: syntax error, unexpected T_STRING in /usr/local/psa/libexec/modules/watchdog/cp/send-report on line 6
************

and editing the newly copied file file with vi:

************

************

Thanks for your help

Regards
 
Hi,

I have the same problem - I installed the file as explained now get the following in an email

/bin/sh: /usr/local/psa/libexec/modules/watchdog/cp/send-report: /opt/psa/bin/sw-engine-pleskrun: bad interpreter: No such file or directory
 
I have requested developers assistance regarding this not working solution. I will update thread with results as soon as I receive any useful information.
 
The fix still seems to be broken.

# wget "http://kb.odin.com/Attachments/14520/Attachments/send-report.gz"
# gunzip -d send-report.gz
# ./send-report daily
zsh: fehler im Format der Programmdatei: ./send-report
("Error in file ./send-report")

... and if I dump the file:

00000000 1f 8b 08 08 ab 11 35 4d 00 03 73 65 6e 64 2d 72 |......5M..send-r|
00000010 65 70 6f 72 74 00 01 1f 2b e0 d4 23 21 2f 75 73 |eport...+..#!/us|
00000020 72 2f 6c 6f 63 61 6c 2f 70 73 61 2f 62 69 6e 2f |r/local/psa/bin/|
00000030 73 77 2d 65 6e 67 69 6e 65 2d 70 6c 65 73 6b 72 |sw-engine-pleskr|
00000040 75 6e 0a 3c 3f 70 68 70 0a 20 20 20 20 64 69 65 |un.<?php. die|
00000050 28 22 54 68 65 20 66 69 6c 65 20 7b 24 5f 53 45 |("The file {$_SE|
00000060 52 56 45 52 5b 27 53 43 52 49 50 54 5f 46 49 4c |RVER['SCRIPT_FIL|

As you can see from the hexdump, before the Shebang there are some useless bytes. I can remove them with a hex editor and afterwards I can run the file, but then the output is vanished.
 
Back
Top