Error with file_get_contents

Status
Not open for further replies.

ajs.software

New Member
Messages
14
Reaction score
0
Points
0
I have checked different threads bur not able to find suitable answer.Thats why I am posting here.

I am a intermediate version user of php in x10.

I am using file_get_contents() function in a php script.The script works fine when called from the browser.

But If the same script is running from the cron,it is saying "URL file-access is disabled in the server configuration ".I am stating the full cron output that has been sent to my mail.

Plz help.

Thanks in advance

Mail body from the Cron <ajs@absolut>

<b>Warning</b>: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: URL file-access is disabled in the server configuration in <b>/home/ajs/public_html/dev/test/sc13d/test_59.php</b> on line <b>10</b><br />
<br />
<b>Warning</b>: file_get_contents(http://www.sec.gov/cgi-bin/browse-e...=0&amp;amp;count=40&amp;amp;action=getcurrent) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: no suitable wrapper could be found in <b>/home/ajs/public_html/dev/test/sc13d/test_59.php</b> on line <b>10</b><br />
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
For the cron use

/usr/bin/php-cron instead of php

-Corey
 

ajs.software

New Member
Messages
14
Reaction score
0
Points
0
Thanks Corey.It has been a great help and solved the problem.x10hosting.com has been proved very reliable so far. I am thinking of registering a domain with u people.Can u tell me how can I do that and what is the charge??
 
Status
Not open for further replies.
Top