error running script on crontab
Hi all..., got a new problem......
I've got a crontab that runs a script that call a php script...., the thing is..., when I run that script mannualy from the directory it is in..., there is no problem..., but when I run it from "/" (wich is exactly what the crontab does) the php script tells me that it can't find a file to include..... The file, of course exists..., and is where it is supposed to be... I'm running out of ideas here..., I thought it could be a permissions problem..., but I changed them ..., and nothing happened... Any ideas??? Thanks in advance... |
What if you put "cd <directory where php script is>" in the script right before the php script is called?
|
Thanks!, you solved my problem..., altough I don't know why that happened in the first place...., any ideas??
|
Because, since it is run from "/", the PHP script was looking for it's files at "/"... and by using the cd command before you call it you change the directory so it can find them.
|
All times are GMT -5. The time now is 09:26 AM. |