UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 4th, 2005, 10:31 AM
bozoka45 bozoka45 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: New Orleans
Posts: 175 bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level)bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level)bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 6 h 3 m 44 sec
Reputation Power: 6
Send a message via AIM to bozoka45
Cron creating a blank file

I have a php script running under a cron job like so:

wget http://www.mysite.com/script.php

Everytime the cron runs, I get a script.php.{number} file in my root directory. The number starts at blank and is increased by 1 everytime the cron runs. The file is completely blank.

My script isn't returning any errors when run from my browser.

Could someone please explain what's going on here?

Thanks.

Reply With Quote
  #2  
Old May 6th, 2005, 05:38 AM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
Are you triggering the script via wget or does cron call wget?

Anyway, my guess is that your user permissions are wrong, and the apache / webserver user (usually 'nobody') can't write to the root directory.

Try running the script from a terminal, and see what error you get.

--Simon

Reply With Quote
  #3  
Old May 6th, 2005, 05:13 PM
bozoka45 bozoka45 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: New Orleans
Posts: 175 bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level)bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level)bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 6 h 3 m 44 sec
Reputation Power: 6
Send a message via AIM to bozoka45
If I trigger the script in a terminal using wget (any PHP script on my site), then the "ghost" file appears. I'm giong to look into a different way to use wget.

Reply With Quote
  #4  
Old May 6th, 2005, 05:53 PM
bozoka45 bozoka45 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: New Orleans
Posts: 175 bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level)bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level)bozoka45 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 6 h 3 m 44 sec
Reputation Power: 6
Send a message via AIM to bozoka45
The --delete-after option is deleting he file after its done running the script. Apparently it was creating the file as part of the cache.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Cron creating a blank file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway