tangledman — 2010-08-26T16:37:16-04:00 — #1
I have a script which works fine if i access it from the web
but if I run it through cron I produces an error
SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct
: URL file-access is disabled in the server configuration in /home/spanishp/cron/currency.php
on line 9
Is it possible that URL file-access is disabled form Crons but not if the script is run from the browser?
dklynn — 2010-08-26T18:35:40-04:00 — #2
You cannot run a PHP script via CRON, either, without wrapping it in special code (which I use seldom enough I have to look it up every time I go to use it).
scallioxtx — 2010-09-02T04:04:04-04:00 — #3
Yes it is. PHP running from Apache (CGI mode) most of the time uses a different php.ini than PHP running from the command line (CLI mode).