I ran into something like this once when writing a PHP script that must FTP certain files to another server at cron-determined intervals. Are you using absolute paths? You'll probably have to...
I. e. when developing the script I ran it in a browser, for testing and design. But, when I deployed it on the actual server, it simply didn't work. It turned out I had to specify all path & file references in absolute terms, i. e.
/backupfiles/backupfile.tar.7z
had to become
/usr/www/fwuser/public_html/backupfiles/backupfile.tar.7z
Only once I used these absolute paths, did the script run correctly when called by cron...
So you might try using absolute paths in your exec() calls?
Last edited by rylan76; 06-11-2009 at 02:05 AM.
|