![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I have a php script that processes text files which ads and updates records in a mysql database.
After January 09 when this file has run automatically by crontab it seems to run twice, but the 2nd time it runs, it runs with incomplete information, so it should not have run because that info is required for the file to run. In other word it seems to be processing the same file twice at the same time I can run this file over and over again manually and it runs fine. I have another php script that has caused problems since 10/08 It adds and updates records to a mysql database, when it was running by cron it sometimes added two records in middle of a loop. Since I have run this script manually for the last 2 months it has worked fine. I ran it by cron for a couple of days and it added the duplicates. Does anyone know what could be causing this? any suggestion apreciated! Thanks, neil |
|
#2
|
|||
|
|||
|
I may have found the answer
I am running the php file with wget I have changed the crontab entry from /usr/local/bin/wget -q /dev/null http://www.foo.com.au/file.php to /usr/local/bin/wget --ignore-length -q http://www.foo.com.au/file.php on initial testing this has stopped the duplication below is the info on "ignore length". If anyone from quadra has any knowledge of this or could confirm or deny that this could be the cause of my problem please reply. thanks, Neil ‘--ignore-length’ Unfortunately, some http servers (cgi programs, to be more precise) send out bogus Content-Length headers, which makes Wget go wild, as it thinks not all the document was retrieved. You can spot this syndrome if Wget retries getting the same document again and again, each time claiming that the (otherwise normal) connection has closed on the very same byte. With this option, Wget will ignore the Content-Length header—as if it never existed. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|