Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2008
    Posts
    28

    Default loadxml not working through cron

    My php script works fine when called through the browser but when called as a batch process in cron (scheduled task) it fails when it gets to the command loadxml (

    Raised a support ticket and they are telling me that the issue is the way that I have set up the scheduled task : D:\inetpub\vhosts\datahostingonline.net\httpdocs\c odetails\**********.php - worked fine up until loadxml command

    they have amended to

    D:\Parallels\Plesk\Additional\PleskPHP5\php.exe" - i "D:\inetpub\vhosts\datahostingonline.net\httpdocs\ codetails\*********.php" - which didnt run at all, I guess because quotes are not correctly closed so I amended to

    D:\Parallels\Plesk\Additional\PleskPHP5\php.exe -i "D:\inetpub\vhosts\datahostingonline.net\httpdocs\ codetails\**********.php"
    - but still not running at all

    I suspect it is a security setting as quick google search on loadxml through cron throws up similar issues, but we cant see error logs .

    Anyone any ideas please?

  2. #2
    Join Date
    Nov 2008
    Posts
    28

    Default Support

    So my script executes every time from the browser and only fails from Scheduler. I have added debug to write to a log file after every line of my script and can show that it fails at the command line loadxml - here is the resaponse from my support ticket:

    "Thank you for writing to us.

    We have checked and plesk scheduler is configured properly and executing script without issue.
    If you script fails then there is issue with the script and not with the configuration.

    Please feel free to contact us if you need any further assistance.

    Regards,

    Nicholas."


    How do I escalate???????

  3. #3
    Join Date
    Apr 2007
    Location
    Manchester, United Kingdom
    Posts
    8,440

    Default

    You could reply back to the ticket and ask a senior tech to look at it I guess....... That does seem like a strange one. Have you used this script successfully via a cron job before?
    David Smith
    DPS Computing
    http://www.dpscomputing.com (Computing, Reviews, News) - We're still plodding on adding new content and features (August 2011)
    http://www.djdavid.co.uk - Massive update! (September 2011) - It's now not neglected!!
    http://davidsmith.dpscomputing.com (My Personal Website) - New Site (10/2009)

  4. #4
    Join Date
    Nov 2008
    Posts
    28

    Default permissions?

    yes it is odd, i can get the script to run and send me an email confirmation if I set the path to executable to point at the script:
    D:\inetpub\vhosts\datahostingonline.net\httpdocs\c odetails\**********.php but it fails with an 'undefined function loadxml' which I guess is because that command is only supported in PHP5 and the server must run 4 as default.

    Whan i set the path as follows:
    D:\Parallels\Plesk\Additional\PleskPHP5\php-win.exe -f "D:\inetpub\vhosts\datahostingonline.net\httpdocs\ codetails\**********.php"

    Then I do not get an email and it looks as if the script never executes (same with php.exe or php-cgi.exe)

    Could that be due to permissions on my reseller account do you think? have posted that question back to Support so will see what happens next.

  5. #5
    Join Date
    Apr 2010
    Location
    The KOP END
    Posts
    237

    Default

    Quote Originally Posted by the-ferret View Post
    yes it is odd, i can get the script to run and send me an email confirmation if I set the path to executable to point at the script:
    D:\inetpub\vhosts\datahostingonline.net\httpdocs\c odetails\**********.php but it fails with an 'undefined function loadxml' which I guess is because that command is only supported in PHP5 and the server must run 4 as default.

    Whan i set the path as follows:
    D:\Parallels\Plesk\Additional\PleskPHP5\php-win.exe -f "D:\inetpub\vhosts\datahostingonline.net\httpdocs\ codetails\**********.php"

    Then I do not get an email and it looks as if the script never executes (same with php.exe or php-cgi.exe)

    Could that be due to permissions on my reseller account do you think? have posted that question back to Support so will see what happens next.
    Hi

    Can you please provide me the ticket number in question

    Thanks,
    Ray

  6. #6
    Join Date
    Nov 2008
    Posts
    28

    Default ticket

    Hi Ray

    Ticket ref BGW-754-30161

    thanks
    Graham

  7. #7
    Join Date
    Apr 2010
    Location
    The KOP END
    Posts
    237

    Default

    Quote Originally Posted by the-ferret View Post
    Hi Ray

    Ticket ref BGW-754-30161

    thanks
    Graham
    Hello Graham,

    Your ticket has been updated. Please respond to the ticket with updates.

    Thanks,
    Ray

  8. #8
    Join Date
    Nov 2008
    Posts
    28

    Default still not working

    Hi Ray

    I replied last night but still not working and no updates. Can I get moved to a server that only runs PHP5?

  9. #9
    Join Date
    Apr 2010
    Location
    The KOP END
    Posts
    237

    Default

    Quote Originally Posted by the-ferret View Post
    Hi Ray

    I replied last night but still not working and no updates. Can I get moved to a server that only runs PHP5?
    Hello Graham,

    I have updated the ticket with information requested to get to the bottom of this. All our servers have php4 and php 5. If you site has php 5 enabled then it would run all processes under the php 5 DLL and not the php4 one. I believe there is something not happening when the cron is run. Its not executing the file as desired. The problem here is no log is being shown for an error in the task scheduler and we need to drill down and keep probing till we find the failure. Kindly update the ticket and I will keep digging into this for you.

    Thanks
    Ray

  10. #10
    Join Date
    Apr 2007
    Location
    Manchester, United Kingdom
    Posts
    8,440

    Default

    Hope your problem gets sorted soon .
    David Smith
    DPS Computing
    http://www.dpscomputing.com (Computing, Reviews, News) - We're still plodding on adding new content and features (August 2011)
    http://www.djdavid.co.uk - Massive update! (September 2011) - It's now not neglected!!
    http://davidsmith.dpscomputing.com (My Personal Website) - New Site (10/2009)

  11. #11
    Join Date
    Nov 2008
    Posts
    28

    Default

    Thanks so do I, not to happy that support need to keep runnign my batches to try to fix their server issues especially as they are running tasks that I have not agreed to that contaminate my database.

    Not sure why it is so difficult, all I want to do is schedule a php file and have it run in PHP5 instead of PHP4

    Beginning to loose faith

  12. #12
    Join Date
    Nov 2008
    Posts
    28

    Default Fixed

    Ok so finally got it running after setting aside an hour or so and searching google.

    It was a simple syntax error, not sure why support could not tell me that but I am posting here in case anyone else has same issue and like me has to self fix.

    Correct syntax for running scheduled task under php 5 is:

    "D:\Parallels\Plesk\Additional\PleskPHP5\php.e xe" -f "D:\inetpub\vhosts\yourdomain.tld\httpdocs\yourfil e.php"

    Note the two sets of quotes with the -f switch between

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •