SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cron Not Writing to File (permissions problem?)

    I have a bunch of cron jobs and all work save the ones that access PHP files that have to write some bit of information to a txt file.

    I can't figure out what's wrong, I made sure the PHP scripts have full file paths in them, and when I run them from a browser they work perfect.

    Cron gives me no errors, no email notifications on any problems with the script, but when I check the txt file (which should be updated every few minutes), I get only old information from when I last manually run the script.

    I have the folder that the txt files are in chmod at '777'.

    Any suggestions? I need the cron job to work and have the txt file(s) updated.

    Thanks
    Ryan
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.

  2. #2
    SitePoint Zealot Servyces's Avatar
    Join Date
    Jun 2007
    Location
    The Netherlands
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's the output of your 'crontab -l' ?
    Servyces.com
    Where itís all about you.
    Your partner in online solutions.
    Visit our website at http://www.servyces.com/

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I fixed it!

    Ok, this was the issue.

    The first time I ran the script it created the txt files in the folder. For some reason this absolutely fijucked up the files chmod associations. I couldn't manually change them, as I get an error every way I tried.

    So, I deleted all of them. I created the txt files (blank) on my computer, recreated the folder on the server, and then uploaded the blank text files. Chmodded them and let cron take a shot at it.

    Whala! Working now.

    Thanks
    Ryan
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •