No such file or dir when using cron

Post your support requests/solutions for phpMySQLAutoBackup [website]
Alk
Working towards guru status...
Working towards guru status...
Posts: 5
Joined: Wed Dec 14, 2005 1:51 am
Contact:

No such file or dir when using cron

Postby Alk » Tue Dec 27, 2005 4:45 pm

Hi
I like to use cron, mainly because it doesn't have the limiting factor mentioned for phpjobscheduler. I used to use the cron jobs for a different php script without problems. I edited it to suit the phpMySQLAutoBackup. However, when the cron job is run, this error is outputted:
Warning: chdir(): No such file or directory (errno 2) in /home/chalk/public_html/backup/run.php on line 30

Warning: main(phpmysqlautobackup.php): failed to open stream: No such file or directory in /home/chalk/public_html/backup/run.php on line 31

Warning: main(): Failed opening 'phpmysqlautobackup.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/chalk/public_html/backup/run.php on line 31

I have checked that relative path over and over and I am positive it is correct. The script runs completely without problems when I access it via my web browser.
I know I have the cron command correct because it is the same as I have always used for everything successfully.
I have also put run.php in /home/chalk/public_html/backup/phpmysqlautobackup and it makes no difference.
Does anybody have any ideas please?
Thanks.

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1810
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Thu Dec 29, 2005 11:37 am

Hi,

phpMySQLAutoBackup by default expects a sub folder to exist called:

"files"

see line 30 of run.php, this must be relative to the folder where you are executing run.php

In your case the following may work:

Change Line 30 of run.php from:
chdir("files");
TO:
chdir("/home/chalk/public_html/backup/files");

If not then I suggest you use phpJobScheduler. Not sure what limitations you are referring to but if it is the firing then you can make it fire from any website, not just the one you have it installed!

Cheers, and Happy NEW YEAR.

Dave

Alk
Working towards guru status...
Working towards guru status...
Posts: 5
Joined: Wed Dec 14, 2005 1:51 am
Contact:

That worked!

Postby Alk » Thu Dec 29, 2005 12:42 pm

davidgwalker wrote:Hi,

phpMySQLAutoBackup by default expects a sub folder to exist called:

"files"

see line 30 of run.php, this must be relative to the folder where you are executing run.php

In your case the following may work:

Change Line 30 of run.php from:
chdir("files");
TO:
chdir("/home/chalk/public_html/backup/files");

Thank you, that worked a treat! :D

If not then I suggest you use phpJobScheduler. Not sure what limitations you are referring to but if it is the firing then you can make it fire from any website, not just the one you have it installed!

Ah right ok, that makes it even better then! I'll remember that for future use if I ever need it. :wink:
Thanks and have a good new year too! :)


Return to “phpMySQLAutoBackup [forum]”

Who is online

Users browsing this forum: No registered users and 2 guests