I can't find any question exactly like this. If I'm wrong please point me to the right answer about this.
I have the following situation:
I need to run a script in the cron job (no problem), the problem is in my script, something is wrong, 'cause the script is not running properly.
NOT WORKING SCRIPT
<?php
$command = 'mysql -u root -h localhost eephi < C:/wamp/www/file-20110817-0200.sql';
system( $command );
?>
The most weird is, the command -> mysql -u root -h localhost eephi < C:/wamp/www/file-20110817-0200.sql when executed is a shell, works perfect, no errors, everything run fine. But when I call the command in a php script like is showed above it is not working, no errors, no warnings, nothing is outputed.
I have another script doing something similar, but not the same, but the idea is the same.. and it works fine.
WORKING SCRIPT
$command = 'mysqldump -u user -p****** -h myhost.com mytable > /home/user/www/backup/file-20110817-0200.sql';
system( $command );
?>
Then what is the difference between the two scripts? one works fine and another one not.. WEIRD to me. I hope I can find a solution here. Thanks anyway for your time.