» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-01-2006, 04:55 PM
yogesh yogesh is offline
Junior Member
 
Join Date: Jul 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yogesh is on a distinguished road
Default Cron with Plesk and PHP Script

Hi everybody,

I have set up a cron job from within Plesk to run a PHP script that backs up a MYSQL database.

I usually access the script in my browser and it works OK.

I am recieving the email below with the output from the cron and it is not too happy

X-Cron-Env: <MAILTO=nospam@gmail.com>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/var/www/vhosts/mysite.com>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=web123>

/var/www/vhosts/mysite.com/httpdocs/sub-folder/phpmysqlautobackup/run.php: line 1: ?: No such file or directory
/var/www/vhosts/mysite.com/httpdocs/sub-folder/phpmysqlautobackup/run.php: line 2: /aquota.user: Permission denied
/var/www/vhosts/mysite.com/httpdocs/sub-folder/phpmysqlautobackup/run.php: line 3: anon_ftp: command not found
/var/www/vhosts/mysite.com/httpdocs/sub-folder/phpmysqlautobackup/run.php: line 4 -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-01-2006, 04:58 PM
enron enron is offline
OSP Starters
 
Join Date: Jul 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
enron is on a distinguished road
Default

Hi buddy

Find the exact path of your cron job pages using the following code in your any of the page in that specific folder,

Code:

<?php
$file_path = realpath("run.php");

print $file_path;
?>

and replace this exact path in cron job file..

Permission denied error is due to file permissions of run.php, CHMOD 777 your run.php because page running under cron job must be executable.

Code:
/var/www/vhosts/mysite.com/httpdocs/sub-folder/phpmysqlautobackup/run.php: line 3: anon_ftp: command not found
/var/www/vhosts/mysite.com/httpdocs/sub-folder/phpmysqlautobackup/run.php: line 4: syntax error near unexpected token `uses'
/var/www/vhosts/mysite.com/httpdocs/sub-folder/phpmysqlautobackup/run.php: line 4: ` * (uses the MySQL export library from *'

these errors are related to your run.php page code so paste your run.php co -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 02:35 AM.