Scoochi2
New Member
- Messages
- 185
- Reaction score
- 0
- Points
- 0
Hey. I have a file that is run by my crontab once every 24 hours. It simply loads up a list of values and changes my site to reflect those values.
It works fine.
However, when run under the crontab, it generates the following error:
Of course, this leads to another error:
Like I said, the errors only occurs when the file is run on the cron, and works perfectly if I simply load up the script in my browser.
Here's the first three lines of the script. Of course, as above I have replaced the actual URL with **URL**. The URL should not make a difference to the file() problem.
What's really confusing me is that this script used to work. Then all of a sudden without any changes to it, it stopped working!)
Am I doing something wrong, has the server/permissions changed or something else?
It works fine.
However, when run under the crontab, it generates the following error:
Code:
[/FONT]Warning: file() [function.file]: URL file-access is disabled in the server configuration in **SCRIPT URL** on line 3
Code:
Warning: file([URL="http://www.nationstates.net/cgi-bin/regiondata.cgi/region=antarctica"]**URL**[/URL]) [function.file]: failed to open stream: no suitable wrapper could be found in **SCRIPT URL** on line 3
Like I said, the errors only occurs when the file is run on the cron, and works perfectly if I simply load up the script in my browser.
Here's the first three lines of the script. Of course, as above I have replaced the actual URL with **URL**. The URL should not make a difference to the file() problem.
Code:
#!/usr/local/bin/php -q
<?php
$file = file ("**URL**");
What's really confusing me is that this script used to work. Then all of a sudden without any changes to it, it stopped working!)
Am I doing something wrong, has the server/permissions changed or something else?