Closed Thread
Results 1 to 3 of 3

Thread: Cron Job php config

  1. #1
    thomaswprice80 is offline x10Hosting Member thomaswprice80 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    1

    Cron Job php config

    Hey, I love your site, but I've got a small problem. I've got a php script that needs to access an image from another website. It works fine when I run it manually by navigating to it, but I've tried to set up to run as a cron job, and I get this error in the log: "[27-Jan-2011 16:20:01] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: URL file-access is disabled in the server configuration in /home/thomaswp/public_html/cron.php on line 10". Do you have a different configuration for running php scripts though cron? Because it works fine when I run it manually. Any suggestions?

  2. #2
    calistoy's Avatar
    calistoy is offline Free Support Volunteer calistoy is just really nice
    Join Date
    Aug 2008
    Location
    USA
    Posts
    5,598

    Re: Cron Job php config

    Here's what the problem is:

    "[27-Jan-2011 16:20:01] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: URL file-access is disabled in the server configuration in /home/thomaswp/public_html/cron.php on line 10".
    I've bolded the important part of the message we need to look at. What you are trying to do in your php script is disabled on free hosting accounts. That means it's not the cron that's the problem. You'll need make other plans of what you wanted to do.

    Edit: I'm very sorry; it turns out I was wrong.
    Last edited by calistoy; 01-27-2011 at 05:16 PM. Reason: still learning

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,634

    Re: Cron Job php config

    The setup for cron jobs is the problem.

    His script works when run manually (from the Web), but not when run from a cron job. There is a similar problem with the PHP mail() function.
    Nothing is always absolutely so.

Closed Thread

Similar Threads

  1. Web.config Help
    By boone1 in forum Programming Help
    Replies: 5
    Last Post: 12-12-2009, 04:39 PM
  2. Replies: 6
    Last Post: 11-14-2009, 06:38 PM
  3. Is this config ok ?
    By dhruv227 in forum Computers & Technology
    Replies: 8
    Last Post: 09-09-2009, 03:30 PM
  4. php config
    By 037291 in forum Free Hosting
    Replies: 2
    Last Post: 12-17-2008, 07:20 PM
  5. [cron problem]php-cron command not found
    By N4rk0 in forum Free Hosting
    Replies: 1
    Last Post: 01-31-2008, 11:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers