I have a php file which uses file_get_contents()
It works fine in the browser, but fails with the following error when run as a cron job:
Warning: file_get_contents(): URL file-access is disabled in the server configuration in /path/to/the/phpfile.php on line 22
This is what I'm using:
/usr/bin/php5 -q /path/to/the/phpfile.php
Iv'e already set allow_url_fopen = true
in php.ini but this doesn't seem to have any effect.
Everything works perfectly in the browser though. How can this be fixed?