Cron job problem

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

Warning
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?

Yes.

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).

Regards,

DK

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).