cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: PHP & Curl - Timeout

From: Thomas Bähr [Office] <baehr_at_glaswald.de>
Date: Thu, 12 Jun 2003 17:58:35 +0200

At 11:15 12.06.2003 -0400, you wrote:
>Check also:
>max_input_time
>default_socket_timeout
hmmm default_socket_timeout is just definable starting with php 4.3

and i guess the same is true for max_input_time at least its not in my
php.ini [4.0.6]

hmm i hope i dont need a newer php version .. always hate updating that ..
so much could go wrong :-//

but thx
Thomas

>----- Original Message -----
>From: "Thomas Bähr [Office]" <baehr_at_glaswald.de>
>To: <curl-and-php_at_lists.sourceforge.net>
>Sent: Thursday, June 12, 2003 9:59 AM
>Subject: PHP & Curl - Timeout
>
>
> > Hello List,
> >
> > im using this small php include file to Upload a XML File via HTTP Post
>upload
> >
> > Versions:
> > php 4.0.6
> > curl 7.10.5
> >
> > <?php
> > global $XMLURL;
> > global $fp;
> > global $zipfile;
> >
> > $ch = curl_init();
> >
> > curl_setopt($ch, CURLOPT_URL,$XMLURL); <- the path to the servlet to which
> > im posting my data
> > curl_setopt($ch, CURLOPT_POST, 1);
> > if ($DEBUG>0) curl_setopt($ch, CURLOPT_VERBOSE, 0);
> > curl_setopt($ch, CURLOPT_TIMEOUT, 0);
> > curl_setopt($ch, CURLOPT_INFILESIZE,filesize($zipfile)); <- path to the
> > file I want to upload via POST
> > curl_setopt($ch, CURLOPT_FILE,$fp);
> > if ($DEBUG>0) $c=curl_setopt($ch, CURLOPT_NOPROGRESS, 1);
> > $formvars[handler]="insertion";
> > $formvars[version]="1.0.0";
> > $formvars[file]="@$zipfile";
> > $c=curl_setopt($ch, CURLOPT_POSTFIELDS, $formvars);
> >
> > $reply=curl_exec ($ch);
> > curl_close ($ch);
> > ?>
> >
> >
> > it works find for small files (the file includes an xml file + grafic
> > datas) and worked with around 2 MB
> >
> > but if i try this with a bigger file [around 28 MB with 480 rows of data]
> > the execution seems to timeout
> > i looked at the servlet and saw that it still processes my file so i guess
> > its a Timeout problem with
> > the curl_exec() function !?!? i even tried curl_setopt($ch,
> > CURLOPT_TIMEOUT, 32000); with only the same
> > result.
> > php max_execution_time is set to 3000 which is around 50 min but the
>upload
> > ends after around 430 seconds
> > and the servlet [to which im sending the data is still in the middle of
> > processing the XML file] so my only
> > problem is that i dont get a response and therefor dont know if the upload
> > was successfully coz im missing the response
> > from the servlet .. :-( *sigh*
> >
> > is there something else i should watch out !? Any other solutions which
> > might help in that case !?
> >
> > thx for any comment!
> >
> > Thomas
> >
> >
> >
> > -------------------------------------------------------
> > This SF.NET email is sponsored by: eBay
> > Great deals on office technology -- on eBay now! Click here:
> > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> >
> >
>
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by: eBay
>Great deals on office technology -- on eBay now! Click here:
>http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
Received on 2003-06-12