Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 27-04-04
Barry's Avatar
Typing with both fingers.
 
Join Date: Aug 2003
Location: In Fishguard with my lovely coracle.
Posts: 2,929
Thanks: 100
Thanked 22 Times in 16 Posts
Barry seems to know their stuff
  PHP or Browser Timeout?

Hi all, I need a little help with timeout errors.
I'm not sure if its the browser timing out or the php script.


I have written a script to extract the datafiles from my networks but I have to do them one at a time, as when i try to loop through all the merchants in one go - the script timesout and causes it to stop.
I have set my php timeout to a really high value, and was wondering if explorer had a - timeout value?

So I suppose my question(s) are:-

Is there anyway to execute a php script that will take 15 - 20 to run in a browser (and is there another means to execute a php file?)

And - What is the php equiviant of (in asp) - < % onerror resume next % >?

Thanks all.
__________________
Mirror Ten Ltd :: Free Codes
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 27-04-04
Registered User
 
Join Date: Oct 2003
Location: Norfolk
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
rogerlittin is an unknown quantity at this point
Hi,

Instead of setting the time limit to a high value, try this at the beginning of your script.
PHP Code:
set_time_limit(0); 
It disables the time limit.

With PHP you can define your own error handling function and call it with
PHP Code:
set_error_handler(error_function); 
It disables the main php error handling function so you are responsible for all aspects of handling the error including die(). If the function returns to the main script then it will resume where it left off.

The time limit should help so you shouldn't have to resort to writing your own error functions.

Hope this helps.

Roger.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 27-04-04
Barry's Avatar
Typing with both fingers.
 
Join Date: Aug 2003
Location: In Fishguard with my lovely coracle.
Posts: 2,929
Thanks: 100
Thanked 22 Times in 16 Posts
Barry seems to know their stuff
Cheers Roger
__________________
Mirror Ten Ltd :: Free Codes
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 28-04-04
darrenw's Avatar
Meow!
 
Join Date: Jan 2004
Location: Manchester
Posts: 432
Thanks: 0
Thanked 0 Times in 0 Posts
darrenw is an unknown quantity at this point
If your hosting provider gives you access to the shell, then it might be worth running these data file upload scripts from there instead...

You can run php scripts from the shell as follows:

php scriptname.php <parameter> <parameter>

For example, I've written a script as follows:

php getfeed.php aw 318 download

This basically gets the csv file for merchant ID 318 from Affiliate Window (without the parameter download it will insert the data from the csv file stored in gz format locally on the server - just in case something goes wrong!)

Thanks,
Darren.
__________________
DarrenW
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 28-04-04
Barry's Avatar
Typing with both fingers.
 
Join Date: Aug 2003
Location: In Fishguard with my lovely coracle.
Posts: 2,929
Thanks: 100
Thanked 22 Times in 16 Posts
Barry seems to know their stuff
Cheers darrenw

i have access to the shell, do I just place the php file in the same directory as the php.exe?

Ta
__________________
Mirror Ten Ltd :: Free Codes
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 28-04-04
darrenw's Avatar
Meow!
 
Join Date: Jan 2004
Location: Manchester
Posts: 432
Thanks: 0
Thanked 0 Times in 0 Posts
darrenw is an unknown quantity at this point
You can put the script wherever you want, but make sure you put the path to the php executable as the first line in the script as follows:

PHP Code:
#!/usr/local/bin/php -q 
Regards,
Darren.
__________________
DarrenW
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 28-04-04
Barry's Avatar
Typing with both fingers.
 
Join Date: Aug 2003
Location: In Fishguard with my lovely coracle.
Posts: 2,929
Thanks: 100
Thanked 22 Times in 16 Posts
Barry seems to know their stuff
Sorry forgot to mention that I am on Windows

I will have a mess around using the 'raw' php.exe though. I'll have a look around php.net to see if there is anything more.

Thanks
__________________
Mirror Ten Ltd :: Free Codes
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone anygood with xml, php, mysql and Affiliate Window AnnonnyMouse The Affiliate Marketing Lounge 1 23-09-04 11:00 AM
Php & Sql Wunderlust1 Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 8 20-08-04 10:22 AM
PHP - No input file specified. - Problem Barry Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 1 02-08-04 10:57 AM
Downloading a file using PHP wibble99 Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 10 19-01-04 02:15 PM
PHP, cookies and trailing slash NeilDurrant Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 2 27-01-03 09:46 PM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7