1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Send-report daily: PHP parse error

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by Shibumi, Dec 17, 2010.

  1. Shibumi

    Shibumi Basic Pleskian

    18
     
    Joined:
    Nov 24, 2010
    Messages:
    31
    Likes Received:
    0
    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
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,543
    Likes Received:
    1,238
    Location:
    Novosibirsk, Russia
    Are you sure that you have unpacked attached gz archive file?
     
  3. Shibumi

    Shibumi Basic Pleskian

    18
     
    Joined:
    Nov 24, 2010
    Messages:
    31
    Likes Received:
    0
    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.
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,543
    Likes Received:
    1,238
    Location:
    Novosibirsk, Russia
    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.​
     
  5. Shibumi

    Shibumi Basic Pleskian

    18
     
    Joined:
    Nov 24, 2010
    Messages:
    31
    Likes Received:
    0
    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
     
  6. Shibumi

    Shibumi Basic Pleskian

    18
     
    Joined:
    Nov 24, 2010
    Messages:
    31
    Likes Received:
    0
    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
     
  7. igareth

    igareth Guest

    0
     
    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
     
  8. Michael Wa.

    Michael Wa. Basic Pleskian

    20
    57%
    Joined:
    Feb 12, 2010
    Messages:
    31
    Likes Received:
    0
    same problem here after using the fix.
     
  9. ZopfWare

    ZopfWare Regular Pleskian

    25
    57%
    Joined:
    May 30, 2004
    Messages:
    215
    Likes Received:
    0
    Please resolve this issue.
     
  10. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,543
    Likes Received:
    1,238
    Location:
    Novosibirsk, Russia
    I have requested developers assistance regarding this not working solution. I will update thread with results as soon as I receive any useful information.
     
  11. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,543
    Likes Received:
    1,238
    Location:
    Novosibirsk, Russia
  12. Lukas0907

    Lukas0907 Guest

    0
     
    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.
     
  13. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,543
    Likes Received:
    1,238
    Location:
    Novosibirsk, Russia
    This file is double gzipped:

     
  14. Lukas0907

    Lukas0907 Guest

    0
     
    Thank you, now everything works as expected.
     
Loading...