[PHP] [SOLVED] Re: [PHP] curl_exec won't return (any data)

2011-02-11 Thread Tolas Anon
fromTolas Anon tolas...@gmail.com
to  libcurl development curl-libr...@cool.haxx.se
dateFri, Feb 11, 2011 at 5:09 PM
subject Re: php curl_exec won't return any data, libcurl-7.21.3.0, php
5.3.4, WampServer2.1d-x64.exe
mailed-by   gmail.com

On Fri, Feb 11, 2011 at 1:32 PM, Daniel Stenberg dan...@haxx.se wrote:
 On Fri, 11 Feb 2011, Tolas Anon wrote:

 It is also very easy for an application to enable the options as I've
 shown.

 Just not for the platforms i use, apparently.. :(

 Why not? A quick search for tcp keepalive windows shows this:
 http://msdn.microsoft.com/en-us/library/ms819735.aspx


BUYAKAA! This fixed my problem in the simple test AND in my application!
No need to send keep-alive bytes on the text/html level either.

I just added the KeepAliveTime setting with windows 7 regedit.exe in
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/Tcpip, as a
REG_DWORD value, set it to decimal 25000 (so 25 seconds), rebooted,
and it all works as i want it now..

Note that windows registry entries key names are case-sensitive, wrong
casing and they'll be deleted on restart.

Lots of thanks, Daniel. I would've never solved this on my own..

I'll make an entry in the php.net website comments about this.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-09 Thread Tolas Anon
exec-sum update :

details continued at http://curl.haxx.se/mail/lib-2011-02/0101.html

it turns out using the internetdomainname of the apache server is the
source of the problem.
the adsl router could be dropping the connection, or something else.

calling curl_exec() to a localhost address will work fine for the time
that it takes.
(no traffic back for 1hr, then a short status msg only)

however my media import routines are useless if i only can use 'm on localhost.

so the idea i will try tommorow is outputting keepalive weird-bytes on
the text/html level
from the php_script import-script, and then stripping them in php_daemon_script.

i would like to know if i can use feof() to check that ffmpeg launched
via popen() has terminated..
i think so, but the docs aren't perfectly clear.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 7:24 AM, Tolas Anon tolas...@gmail.com wrote:
 Hi..

 For a set of media import routines, i'm using a
 javascript-php_on_apache-windows.bat-php_cli-curl-php_script invocation
 method.
 It seems longwinded, but it's designed to have different parts of the import
 process run on different servers.

 I'm stuck at getting curl_exec() to return the data of the final php_script
 that does the importing.


this is the part that hits my non professionals nerve.you want
something to return data like a 'db' that does the 'final' importing'.
Importing is more of python from my exp, and it is never done at the
end, but at the beginning, so please explain why it's last that this
is done.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 7:32 AM, David Hutto smokefl...@gmail.com wrote:
 On Tue, Feb 8, 2011 at 7:24 AM, Tolas Anon tolas...@gmail.com wrote:
 Hi..

 For a set of media import routines, i'm using a
 javascript-php_on_apache-windows.bat-php_cli-curl-php_script invocation
 method.
 It seems longwinded, but it's designed to have different parts of the import
 process run on different servers.

 I'm stuck at getting curl_exec() to return the data of the final php_script
 that does the importing.


 this is the part that hits my non professionals nerve.you want
 something to return data like a 'db' that does the 'final' importing'.
 Importing is more of python from my exp,

In php, t should be include, and again it should be initially.

and it is never done at the
 end, but at the beginning, so please explain why it's last that this
 is done.




-- 
According to theoretical physics, the division of spatial intervals as
the universe evolves gives rise to the fact that in another timeline,
your interdimensional counterpart received helpful advice from me...so
be eternally pleased for them.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Ashley Sheridan
On Tue, 2011-02-08 at 13:24 +0100, Tolas Anon wrote:

 Hi..
 
 For a set of media import routines, i'm using a
 javascript-php_on_apache-windows.bat-php_cli-curl-php_script invocation
 method.
 It seems longwinded, but it's designed to have different parts of the import
 process run on different servers.
 
 I'm stuck at getting curl_exec() to return the data of the final php_script
 that does the importing.
 The script itself runs fine, and i've recorded good details that curl_exec()
 is supposed to catch with file_put_contents(/some/debug.txt,
 json_encode($returnArray)), and from those debug-printouts it's just a few
 tiny steps towards a cascade of return statements, followed by a
 echo(json_encode($returnArray)) and a normal end to the php_script at the
 end of the call chain.
 
 However, curl_exec() seems to hang completely. I've added over a dozen
 debuginfo - file on server statements, and the one that should fire
 straight after curl_exec() does not fire.
 
 It does this only with large (1.8gb) video files, a smaller (60mb) video
 file doesn't produce this problem and the entire import routines work fine
 then.
 
 I'd very much appreciate any tips you might have for me.


Let me see if I've got this right.

The windows.bat is processing the media file somehow, then calling a
php_cli script which makes a cURL call to another web-based PHP script?
Is this right? The final script I assume is getting sent some info from
the cURL call and is using it somehow (in a DB maybe?) before some sort
of message back to your curl call. What is the code then doing with it
after that?

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 7:35 AM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
 On Tue, 2011-02-08 at 13:24 +0100, Tolas Anon wrote:

 Hi..

 For a set of media import routines, i'm using a
 javascript-php_on_apache-windows.bat-php_cli-curl-php_script invocation
 method.
 It seems longwinded, but it's designed to have different parts of the import
 process run on different servers.

 I'm stuck at getting curl_exec() to return the data of the final php_script
 that does the importing.
 The script itself runs fine, and i've recorded good details that curl_exec()
 is supposed to catch with file_put_contents(/some/debug.txt,
 json_encode($returnArray)), and from those debug-printouts it's just a few
 tiny steps towards a cascade of return statements, followed by a
 echo(json_encode($returnArray)) and a normal end to the php_script at the
 end of the call chain.

 However, curl_exec() seems to hang completely. I've added over a dozen
 debuginfo - file on server statements, and the one that should fire
 straight after curl_exec() does not fire.

 It does this only with large (1.8gb) video files, a smaller (60mb) video
 file doesn't produce this problem and the entire import routines work fine
 then.

 I'd very much appreciate any tips you might have for me.


 Let me see if I've got this right.

 The windows.bat is processing the media file somehow, then calling a
 php_cli script which makes a cURL call to another web-based PHP script?
 Is this right? The final script I assume is getting sent some info from
 the cURL call and is using it somehow (in a DB maybe?) before some sort
 of message back to your curl call. What is the code then doing with it
 after that?

Other than placing it in the main php file(index.php), at the position
you called it at, and at which it sits in precedence at? Because at
the end, it is a part of the page being returned to the user.


 Thanks,
 Ash
 http://www.ashleysheridan.co.uk






-- 
According to theoretical physics, the division of spatial intervals as
the universe evolves gives rise to the fact that in another timeline,
your interdimensional counterpart received helpful advice from me...so
be eternally pleased for them.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
On Tue, Feb 8, 2011 at 1:35 PM, Ashley Sheridan 
a...@ashleysheridan.co.ukwrote:

 On Tue, 2011-02-08 at 13:24 +0100, Tolas Anon wrote:

  Hi..
 
  For a set of media import routines, i'm using a
  javascript-php_on_apache-windows.bat-php_cli-curl-php_script
 invocation
  method.
  It seems longwinded, but it's designed to have different parts of the
 import
  process run on different servers.
 
  I'm stuck at getting curl_exec() to return the data of the final
 php_script
  that does the importing.
  The script itself runs fine, and i've recorded good details that
 curl_exec()
  is supposed to catch with file_put_contents(/some/debug.txt,
  json_encode($returnArray)), and from those debug-printouts it's just a
 few
  tiny steps towards a cascade of return statements, followed by a
  echo(json_encode($returnArray)) and a normal end to the php_script at the
  end of the call chain.
 
  However, curl_exec() seems to hang completely. I've added over a dozen
  debuginfo - file on server statements, and the one that should fire
  straight after curl_exec() does not fire.
 
  It does this only with large (1.8gb) video files, a smaller (60mb) video
  file doesn't produce this problem and the entire import routines work
 fine
  then.
 
  I'd very much appreciate any tips you might have for me.


 Let me see if I've got this right.

 The windows.bat is processing the media file somehow, then calling a
 php_cli script which makes a cURL call to another web-based PHP script?
 Is this right? The final script I assume is getting sent some info from
 the cURL call and is using it somehow (in a DB maybe?) before some sort
 of message back to your curl call. What is the code then doing with it
 after that?

 Thanks,
 Ash
 http://www.ashleysheridan.co.uk



oops, i missed a step (php_daemon_script) in the chain of calls;

it's : javascript - php_on_apache - windows.bat - php_cli -
php_daemon_script - curl_exec - php_script

followed by calls-until-finished from javascript that read the status of
php_script via json files written to the server and thus display the status
to the end-user..

the windows.bat just starts up cli-php with admin privileges, which executes
the php_daemon_script, which uses repetitive curl calls to the import-script
(php_script at the end of my chain) that does all the work for a single
item in the total upload/import queue; it does video conversion with
exec(/path/to/ffmpeg), photo conversion with imagemagick, and updates the db
with the php adodb library.
php_script at the end of it's work returns a simple and short status array
(json_encode()d) to the php_daemon_script via curl_exec, that dictates if
the php_daemon_script should continue calling the (import) php_script more
times.

it's curl_exec that hangs/freezes, both with using CURLOPT_RETURNTRANSFER=1,
or capturing output with ob_start() and ob_get_clean(). i've gathered that
much from my custom debug logs.


Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Ashley Sheridan
On Tue, 2011-02-08 at 13:50 +0100, Tolas Anon wrote:

 
 
 
 On Tue, Feb 8, 2011 at 1:35 PM, Ashley Sheridan
 a...@ashleysheridan.co.uk wrote:
 
 
 On Tue, 2011-02-08 at 13:24 +0100, Tolas Anon wrote:
 
  Hi..
 
  For a set of media import routines, i'm using a
 
 javascript-php_on_apache-windows.bat-php_cli-curl-php_script 
 invocation
  method.
  It seems longwinded, but it's designed to have different
 parts of the import
  process run on different servers.
 
  I'm stuck at getting curl_exec() to return the data of the
 final php_script
  that does the importing.
  The script itself runs fine, and i've recorded good details
 that curl_exec()
  is supposed to catch with
 file_put_contents(/some/debug.txt,
  json_encode($returnArray)), and from those debug-printouts
 it's just a few
  tiny steps towards a cascade of return statements,
 followed by a
  echo(json_encode($returnArray)) and a normal end to the
 php_script at the
  end of the call chain.
 
  However, curl_exec() seems to hang completely. I've added
 over a dozen
  debuginfo - file on server statements, and the one that
 should fire
  straight after curl_exec() does not fire.
 
  It does this only with large (1.8gb) video files, a smaller
 (60mb) video
  file doesn't produce this problem and the entire import
 routines work fine
  then.
 
  I'd very much appreciate any tips you might have for me.
 
 
 
 
 Let me see if I've got this right.
 
 The windows.bat is processing the media file somehow, then
 calling a
 php_cli script which makes a cURL call to another web-based
 PHP script?
 Is this right? The final script I assume is getting sent some
 info from
 the cURL call and is using it somehow (in a DB maybe?) before
 some sort
 of message back to your curl call. What is the code then doing
 with it
 after that?
 
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk
 
 
 
 
 oops, i missed a step (php_daemon_script) in the chain of calls;
 
 it's : javascript - php_on_apache - windows.bat - php_cli -
 php_daemon_script - curl_exec - php_script
 
 followed by calls-until-finished from javascript that read the status
 of php_script via json files written to the server and thus display
 the status to the end-user..
 
 the windows.bat just starts up cli-php with admin privileges, which
 executes the php_daemon_script, which uses repetitive curl calls to
 the import-script (php_script at the end of my chain) that does all
 the work for a single item in the total upload/import queue; it does
 video conversion with exec(/path/to/ffmpeg), photo conversion with
 imagemagick, and updates the db with the php adodb library. 
 php_script at the end of it's work returns a simple and short status
 array (json_encode()d) to the php_daemon_script via curl_exec, that
 dictates if the php_daemon_script should continue calling the (import)
 php_script more times.
 
 it's curl_exec that hangs/freezes, both with using
 CURLOPT_RETURNTRANSFER=1, or capturing output with ob_start() and
 ob_get_clean(). i've gathered that much from my custom debug logs.


I've done similar things with transcoders, and found that often the best
way is to send off the job to the transcoder and leave it. Don't poll
from your main app to see how it's getting along (it'll get annoyed
otherwise!)

When the script responsible for transcoding is done though, it can
report back to the main app to let it know how it got on, and pass along
any details it needs that way.

This isn't great for getting things like transcode progress, but it will
reduce polling traffic, and transcodes can take a long time, especially
if more than once are running at the same time.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 8:02 AM, Ashley Sheridan 
a...@ashleysheridan.co.ukwrote:

  On Tue, 2011-02-08 at 07:59 -0500, David Hutto wrote:

  it's : javascript - php_on_apache - windows.bat - php_cli -
  php_daemon_script - curl_exec - php_script
 
  followed by calls-until-finished from javascript that read the status of
  php_script via json files written to the server and thus display the
 status
  to the end-user..

 1: java event
 2:java event calls a php function to apache.


 Java != Javascript


Honestly, I've never used java enough to know the difference from the
html/css/javascript/php mentality to notice there was a difference(Not that
I don't now the difference, just misuse the term).




   Thanks,
 Ash
 http://www.ashleysheridan.co.uk





Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 7:50 AM, Tolas Anon tolas...@gmail.com wrote:
 On Tue, Feb 8, 2011 at 1:35 PM, Ashley Sheridan 
 a...@ashleysheridan.co.ukwrote:

 On Tue, 2011-02-08 at 13:24 +0100, Tolas Anon wrote:

  Hi..
 
  For a set of media import routines, i'm using a
  javascript-php_on_apache-windows.bat-php_cli-curl-php_script
 invocation
  method.
  It seems longwinded, but it's designed to have different parts of the
 import
  process run on different servers.
 
  I'm stuck at getting curl_exec() to return the data of the final
 php_script
  that does the importing.
  The script itself runs fine, and i've recorded good details that
 curl_exec()
  is supposed to catch with file_put_contents(/some/debug.txt,
  json_encode($returnArray)), and from those debug-printouts it's just a
 few
  tiny steps towards a cascade of return statements, followed by a
  echo(json_encode($returnArray)) and a normal end to the php_script at the
  end of the call chain.
 
  However, curl_exec() seems to hang completely. I've added over a dozen
  debuginfo - file on server statements, and the one that should fire
  straight after curl_exec() does not fire.
 
  It does this only with large (1.8gb) video files, a smaller (60mb) video
  file doesn't produce this problem and the entire import routines work
 fine
  then.
 
  I'd very much appreciate any tips you might have for me.


 Let me see if I've got this right.

 The windows.bat is processing the media file somehow, then calling a
 php_cli script which makes a cURL call to another web-based PHP script?
 Is this right? The final script I assume is getting sent some info from
 the cURL call and is using it somehow (in a DB maybe?) before some sort
 of message back to your curl call. What is the code then doing with it
 after that?

 Thanks,
 Ash
 http://www.ashleysheridan.co.uk



 oops, i missed a step (php_daemon_script) in the chain of calls;

 it's : javascript - php_on_apache - windows.bat - php_cli -
 php_daemon_script - curl_exec - php_script

 followed by calls-until-finished from javascript that read the status of
 php_script via json files written to the server and thus display the status
 to the end-user..

1: java event
2:java event calls a php function to apache.
3: which calls a window.bat
4: calls a php command line
5. calls a php daemon, which is a 'waiting server process', listening
on on a port.
6. you execute a command line statement
7. and it's for a php script to return something


 the windows.bat just starts up cli-php with admin privileges, which executes
 the php_daemon_script, which uses repetitive curl calls to the import-script
 (php_script at the end of my chain) that does all the work for a single
 item in the total upload/import queue;


 it does video conversion with
 exec(/path/to/ffmpeg), photo conversion with imagemagick, and updates the db
 with the php adodb library.
 php_script at the end of it's work returns a simple and short status array
 (json_encode()d) to the php_daemon_script via curl_exec, that dictates if
 the php_daemon_script should continue calling the (import) php_script more
 times.

 it's curl_exec that hangs/freezes, both with using CURLOPT_RETURNTRANSFER=1,
 or capturing output with ob_start() and ob_get_clean(). i've gathered that
 much from my custom debug logs.


What do you have at the beginning, and what do you want at the end of
this process. Break it down into simple steps. And then not only can
any php programmer help you, but any computer scientist can help you
utilize the control flow logic.


-- 
According to theoretical physics, the division of spatial intervals as
the universe evolves gives rise to the fact that in another timeline,
your interdimensional counterpart received helpful advice from me...so
be eternally pleased for them.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Ashley Sheridan
On Tue, 2011-02-08 at 07:59 -0500, David Hutto wrote:

  it's : javascript - php_on_apache - windows.bat - php_cli -
  php_daemon_script - curl_exec - php_script
 
  followed by calls-until-finished from javascript that read the
 status of
  php_script via json files written to the server and thus display the
 status
  to the end-user..
 
 1: java event
 2:java event calls a php function to apache. 


Java != Javascript

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
ok, i've done another run, this time with both php_daemon_script and
php_script allowed to run indefinitely, and i've triple-checked my
results..

- all the calls to convert and import the +-2gb video file in
php_script (the import-worker-script) complete just fine, they update
a debug file on the server with correct results. from there it's just
a few simple steps back to curl_exec(), which i've tripple-checked to
be followed correctly, with more print-to-seperate-debug-file
statements.

- the call to curl_exec() in launched by php_daemon_script never
completes. i've added a print-to-debug-file statement right after
curl_exec() there, and it does NOT update that debug file. previous
experience shows that this is true for curl_setopt
(CURLOPT_RETURNTRANSFER,1) aswell as
ob_start();curl_exec(blah);file_put_contents(/path/to/debug-file-N.txt,ob_get_clean()).

- the php_daemon_script continues to run in my debug window (i now
launch windows.bat manually), it does not crash/end, it freezes. and
from experience i can tell you that it will stay frozen for several
hours, not doing anything anymore.

i've run out of ideas :(

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
for completeness, i'll say that i'm using libcurl-7.21.3, and (again)
that these import routines work without problems for smaller video
files (tested with +-60mb vid file).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
also: the vid file itself is converted correctly too, and inserted
into my db correctly.
i can even view the converted flv and it has the correct length and everything!

it's just that the frigging import won't continue with the rest of the
files in the queue..
it's maddening! ;-)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
On Tue, Feb 8, 2011 at 3:39 PM, Tolas Anon tolas...@gmail.com wrote:
 also: the vid file itself is converted correctly too, and inserted
 into my db correctly.
 i can even view the converted flv and it has the correct length and 
 everything!

 it's just that the frigging import won't continue with the rest of the
 files in the queue..
 it's maddening! ;-)


eh, view the converted flv _in_ the cms that does the importing, as
an end-user of the cms would.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
the one thing i can think of is that curl_exec() somehow stops
listening for results and hangs the calling php script
(php_daemon_script in this case) if it does not receive any data for
more than a few minutes (converting the 60mb vid file takes about a
minute, and the 2gb script well over 30 minutes)..

however i haven't been able to find any bugreports via google that
describe this bug..

could it be i found a new bug in libcurl?...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Mujtaba Arshad
nice quintuple posting.

On Tue, Feb 8, 2011 at 9:46 AM, Tolas Anon tolas...@gmail.com wrote:

 the one thing i can think of is that curl_exec() somehow stops
 listening for results and hangs the calling php script
 (php_daemon_script in this case) if it does not receive any data for
 more than a few minutes (converting the 60mb vid file takes about a
 minute, and the 2gb script well over 30 minutes)..

 however i haven't been able to find any bugreports via google that
 describe this bug..

 could it be i found a new bug in libcurl?...

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Mujtaba


Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
Things I've checked in the meanwhile;

curl_setopt($ch,CURLOPT_TIMEOUT, 0); and
curl_setopt($ch,CURLOPT_TIMEOUT, 9); have the same freezing
results as before

I've used a packetsniffer to analyze the dataflow on my port 80, with
all other http apps incl the browser not in memory/running, so i could
get a clear view.
Turns out i do get the traffic my php_daemon_script relies on and
should get from curl_exec() when the 2gb video file has finished
converting  importing, flowing from an 192.xyz.xyz.xyz address (which
is my apache) to a 82.xyz.xyz.xyz address (also resolves to my
apache).

I currently run the entire site, upload and import on the same machine
and instance of apache.
And the import was run from that windows.bat again, which i had
running as a normal dos window.
I made sure the sniffer caught both the initialization of the
offending 2gb-convert call, and it's termination, which i monitored by
monitoring the server filesystem (the size of the converted vid, and
the fact it got moved into it's final directory for serving to the
end-user).

This apache installation is on an adsl modem that does
outside-to-inside port 80 forwarding to my windows apache
installation, and i use the outside-world domain name linked to my
adsl IP for the site and upload and import.

However, this wanted traffic is reported by wireshark (the sniffer)
as having an invalid 0x header checksum, which should be
something else (a hex value of course).
The packet flow is like this:
192... - 82... : HTTP/1.1 200 OK (text/html) {wanted data}
192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
192... - 82... : HTTP  portno [FIN,ACK] seq=... ack=... win=. len=0
192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
192... - 82... : HTTP  portno [RST,ACK] seq=... ack=... win=0 len=0
After this the http capturing goes silent again.

The wanted packet does not show up in the debug-info-to-file call made
by the php_daemon_script just after it does
$result=curl_exec(valid-settings);

I don't use sniffers often, so i have to ask;

Is this enough evidence to report it as a libcurl bug?
Or do i have to suspect php-cli and cmd.exe as well?



P.S.;
Entire WAMP installed by WampServer2.1d-x64.exe
PHP Version 5.3.4

System  Windows NT NOOT 6.1 build 7600 (Unknow Windows version Home
Premium Edition) AMD64
Build Date  Dec 15 2010 23:40:06
CompilerMSVC9 (Visual C++ 2008)
Architecturex64

libcurl-7.21.3.0 added manually

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
On Tue, Feb 8, 2011 at 7:01 PM, Tolas Anon tolas...@gmail.com wrote:
 Things I've checked in the meanwhile;

 curl_setopt($ch,CURLOPT_TIMEOUT, 0); and
 curl_setopt($ch,CURLOPT_TIMEOUT, 9); have the same freezing
 results as before

 I've used a packetsniffer to analyze the dataflow on my port 80, with
 all other http apps incl the browser not in memory/running, so i could
 get a clear view.
 Turns out i do get the traffic my php_daemon_script relies on and
 should get from curl_exec() when the 2gb video file has finished
 converting  importing, flowing from an 192.xyz.xyz.xyz address (which
 is my apache) to a 82.xyz.xyz.xyz address (also resolves to my
 apache).

 I currently run the entire site, upload and import on the same machine
 and instance of apache.
 And the import was run from that windows.bat again, which i had
 running as a normal dos window.
 I made sure the sniffer caught both the initialization of the
 offending 2gb-convert call, and it's termination, which i monitored by
 monitoring the server filesystem (the size of the converted vid, and
 the fact it got moved into it's final directory for serving to the
 end-user).

 This apache installation is on an adsl modem that does
 outside-to-inside port 80 forwarding to my windows apache
 installation, and i use the outside-world domain name linked to my
 adsl IP for the site and upload and import.

 However, this wanted traffic is reported by wireshark (the sniffer)
 as having an invalid 0x header checksum, which should be
 something else (a hex value of course).
 The packet flow is like this:
 192... - 82... : HTTP/1.1 200 OK (text/html) {wanted data}
 192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
 192... - 82... : HTTP  portno [FIN,ACK] seq=... ack=... win=. len=0
 192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
 192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
 192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
 192... - 82... : RETRANSMISSION HTTP/1.1 200 OK (text/html) {wanted data}
 192... - 82... : HTTP  portno [RST,ACK] seq=... ack=... win=0 len=0
 After this the http capturing goes silent again.

 The wanted packet does not show up in the debug-info-to-file call made
 by the php_daemon_script just after it does
 $result=curl_exec(valid-settings);

 I don't use sniffers often, so i have to ask;

 Is this enough evidence to report it as a libcurl bug?
 Or do i have to suspect php-cli and cmd.exe as well?



 P.S.;
 Entire WAMP installed by WampServer2.1d-x64.exe
 PHP Version 5.3.4

 System  Windows NT NOOT 6.1 build 7600 (Unknow Windows version Home
 Premium Edition) AMD64
 Build Date      Dec 15 2010 23:40:06
 Compiler        MSVC9 (Visual C++ 2008)
 Architecture    x64

 libcurl-7.21.3.0 added manually


I've been thinking about that reported bad checksum. libcurl may be
right to reject those packets.
And i guess that apache determines that 0x checksum.
That is, _if_ i can trust the accuracy of that wireshark app.

Bit too many variables at work here for my liking, but this bug just
has to get fixed.

I guess i'll un-install wireshark, install a different sniffer app and
re-do the whole thing, i'll let you know the results when they are in.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
ok, did another run with a different packet analyzer, one that does

not have winPcap under the hood like WireShark does. I chose

microsoft network monitor 3.4 for the task.

the launch of the 2gb vid import (only part by curl_exec):

format:
packetnumber[TAB] time_date_local_adjusted[TAB] time_offset[TAB]

processname[TAB] source[TAB] destination[TAB] protocolname[TAB]

description[TAB] conv_id[TAB] tolas_comment

134 19:50:08 8-2-2011   31.2774633  Unavailable 

WindowsNameOfApacheServer   InternetDomainOfApacheServerHTTP

HTTP:Request, POST /site/cms/php/php_(import_)script.php,

Query:PHPSESSID=o365inhor0ln8mqdr0p8vb3rm7action=batchNext 

{HTTP:40, TCP:38, IPv4:8}   

135 19:50:08 8-2-2011   31.2777843  Unavailable 

InternetDomainOfApacheServerWindowsNameOfApacheServer   TCP 

TCP:Flags=...A, SrcPort=3573, DstPort=HTTP(80), PayloadLen=0,

Seq=1169302766, Ack=4118332969, Win=260 (scale factor 0x8) = 66560  

{TCP:39, IPv4:8}

136 19:50:08 8-2-2011   31.2781472  Unavailable 

InternetDomainOfApacheServerWindowsNameOfApacheServer   HTTP

HTTP:Request, POST /site/cms/php/php_(import_)script.php,

Query:PHPSESSID=o365inhor0ln8mqdr0p8vb3rm7action=batchNext 

{HTTP:41, TCP:39, IPv4:8}

138 19:50:08 8-2-2011   31.4807963  Unavailable 

WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 

TCP:Flags=...A, SrcPort=HTTP(80), DstPort=3573, PayloadLen=0,

Seq=4118332969, Ack=1169303037, Win=260 (scale factor 0x8) = 66560  

{TCP:39, IPv4:8}

139 19:50:08 8-2-2011   31.4859769  Unavailable 

InternetDomainOfApacheServerWindowsNameOfApacheServer   TCP 

TCP:Flags=...A, SrcPort=HTTP(80), DstPort=3573, PayloadLen=0,

Seq=4118332969, Ack=1169303037, Win=260 (scale factor 0x8) = 66560  

{TCP:38, IPv4:8}

140 19:50:08 8-2-2011   31.6234279  adsl-router 

WindowsNameOfApacheServer   TCP TCP:Flags=..S.,

SrcPort=2456, DstPort=14013, PayloadLen=0, Seq=1335058890, Ack=0,

Win=5840 ( Negotiating scale factor 0x2 ) = 5840{TCP:42,

IPv4:4}

141 19:50:11 8-2-2011   34.6104085  adsl-router 

WindowsNameOfApacheServer   TCP TCP:[SynReTransmit #140]

Flags=..S., SrcPort=2456, DstPort=14013, PayloadLen=0,

Seq=1335058890, Ack=0, Win=5840 ( Negotiating scale factor 0x2 ) =

5840{TCP:42, IPv4:4}

Packet 137 = adsl-router discovery traffic, not relevant.





Then, after 45 minutes or so, the completion of the conversion and
import, with the wanted data sent back to curl_exec() running from
php-cli, which was started by windows.bat

Some other (network discovery) traffic is likely mixed in, I added it
to be on the safe side.

590120:32:45 8-2-2011   2588.7346959Unavailable 
WindowsNameOfApacheServer
InternetNameOfApacheServer  HTTPHTTP:Response, HTTP/1.1, 
Status: Ok,
URL: /site/cms/php/php_(import_)script.php  {HTTP:41, TCP:39, IPv4:8}
{{CONTAINS THE WANTED DATA}}

590220:32:45 8-2-2011   2588.7354838
InternetNameOfApacheServer  WindowsNameOfApacheServer
ICMPICMP:Destination Unreachable Message, Communication
Administratively Prohibited, 82.161.37.94   {IPv4:8}

590320:32:48 8-2-2011   2591.6092751
FE80:0:0:0:E579:89FF:369D:668B  FF02:0:0:0:0:0:0:C  SSDPSSDP:Request,
M-SEARCH *  {HTTP:3, UDP:2, IPv6:1}

590420:32:48 8-2-2011   2591.7421833Unavailable 
WindowsNameOfApacheServer
InternetNameOfApacheServer  TCP TCP:[ReTransmit 
#5901]Flags=...AP...,
SrcPort=HTTP(80), DstPort=3573, PayloadLen=558, Seq=4118332969 -
4118333527, Ack=1169303037, Win=260 (scale factor 0x8) =
66560   {TCP:39, IPv4:8}

590520:32:48 8-2-2011   2591.7452755
InternetNameOfApacheServer  WindowsNameOfApacheServer
ICMPICMP:Destination Unreachable Message, Communication
Administratively Prohibited, 82.161.37.94   {IPv4:8}

590620:32:49 8-2-2011   2592.4183261192.168.178.1   
WindowsNameOfApacheServer
TCP TCP:Flags=..S., SrcPort=2119, DstPort=14013, PayloadLen=0,
Seq=4038649047, Ack=0, Win=5840 ( Negotiating scale factor 0x2 ) =
5840{TCP:1001, IPv4:4}

590720:32:51 8-2-2011   2594.2343496Unavailable 
WindowsNameOfApacheServer
InternetNameOfApacheServer  TCP TCP:Flags=...A...F, 
SrcPort=HTTP(80),
DstPort=3573, PayloadLen=0, Seq=4118333527, Ack=1169303037, Win=260
(scale factor 0x8) = 66560  {TCP:39, IPv4:8}

590820:32:51 8-2-2011   2594.2349872
InternetNameOfApacheServer  WindowsNameOfApacheServer
ICMPICMP:Destination Unreachable Message, Communication
Administratively Prohibited, 82.161.37.94   {IPv4:8}

590920:32:52 8-2-2011   2595.4057840192.168.178.1   
WindowsNameOfApacheServer
TCP  

Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
On Tue, Feb 8, 2011 at 8:54 PM, Tolas Anon tolas...@gmail.com wrote:
 But in the meanwhile I found a new idea to try as well;

        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                        'Connection: Keep-Alive',
                        'Keep-Alive: 300'
        ));

 I already checked via phpinfo() that keep-alive is on in
 apache2handler, and no other mentions of keepalive or keep alive
 in the phpinfo() output.

 I'll post the results.


ehm

http://www.io.com/~maus/HttpKeepAlive.html :

HTTP/1.0

Under HTTP 1.0, there is no official specification for how keepalive
operates. It was, in essence, tacked on to an existing protocol. If
the browser supports keep-alive, it adds an additional header to the
request:
Connection: Keep-Alive

Then, when the server receives this request and generates a response,
it also adds a header to the response:
Connection: Keep-Alive

Following this, the connection is NOT dropped, but is instead kept
open. When the client sends another request, it uses the same
connection. This will continue until either the client or the server
decides that the conversation is over, and one of them drops the
connection.

-
HTTP/1.1

Under HTTP 1.1, the official keepalive method is different. All
connections are kept alive, unless stated otherwise with the following
header:
Connection: close

The Connection: Keep-Alive header no longer has any meaning because of this.
Additionally, an optional Keep-Alive: header is described, but is so
underspecified as to be meaningless. Avoid it.

-

And of course, my return data packet 5901 uses HTTP1.1, so the test
i'm running now probably won't fix things.. :(((

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Steve Staples
On Tue, 2011-02-08 at 21:15 +0100, Tolas Anon wrote:
 On Tue, Feb 8, 2011 at 8:54 PM, Tolas Anon tolas...@gmail.com wrote:
  But in the meanwhile I found a new idea to try as well;
 
 curl_setopt($ch, CURLOPT_HTTPHEADER, array(
 'Connection: Keep-Alive',
 'Keep-Alive: 300'
 ));
 
  I already checked via phpinfo() that keep-alive is on in
  apache2handler, and no other mentions of keepalive or keep alive
  in the phpinfo() output.
 
  I'll post the results.
 
 
 ehm
 
 http://www.io.com/~maus/HttpKeepAlive.html :
 
 HTTP/1.0
 
 Under HTTP 1.0, there is no official specification for how keepalive
 operates. It was, in essence, tacked on to an existing protocol. If
 the browser supports keep-alive, it adds an additional header to the
 request:
 Connection: Keep-Alive
 
 Then, when the server receives this request and generates a response,
 it also adds a header to the response:
 Connection: Keep-Alive
 
 Following this, the connection is NOT dropped, but is instead kept
 open. When the client sends another request, it uses the same
 connection. This will continue until either the client or the server
 decides that the conversation is over, and one of them drops the
 connection.
 
 -
 HTTP/1.1
 
 Under HTTP 1.1, the official keepalive method is different. All
 connections are kept alive, unless stated otherwise with the following
 header:
 Connection: close
 
 The Connection: Keep-Alive header no longer has any meaning because of this.
 Additionally, an optional Keep-Alive: header is described, but is so
 underspecified as to be meaningless. Avoid it.
 
 -
 
 And of course, my return data packet 5901 uses HTTP1.1, so the test
 i'm running now probably won't fix things.. :(((
 


i've been sorta reading this (as I am sure most maybe stopped after the
4th consecutive post)... but what I am wondering is...

why can't you just write the output of the what you're doing to a file,
or the db, and then query along the way or when you need/want some
information on it??   Maybe i just haven't quite figured out, or got the
gist of what you are trying to accomplish...

it also seems to me, that this really isn't a PHP specific issue, so all
the posts that you're doing, really doesn't pertain to the PHP mailing
list, so (and sorry to say this) maybe stop posting all the incremental
updates you're doing, and when there is a major break through, or
someone has an idea on how to help solve your issue, update us.

Steve.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
On Tue, Feb 8, 2011 at 9:33 PM, Steve Staples sstap...@mnsi.net wrote:
 i've been sorta reading this (as I am sure most maybe stopped after the
 4th consecutive post)...

yea, i feel i gotta be complete so as to not waste the time of people
who do wanna help.

 but what I am wondering is...

 why can't you just write the output of the what you're doing to a file,
 or the db, and then query along the way or when you need/want some
 information on it??   Maybe i just haven't quite figured out, or got the
 gist of what you are trying to accomplish...

That's exactly what i'm doing.
I need curl_exec() to absorb the response to requests that take over
1hr to complete, because i want to be able to run different parts of
the media import process on different servers.

 it also seems to me, that this really isn't a PHP specific issue, so all
 the posts that you're doing, really doesn't pertain to the PHP mailing
 list, so (and sorry to say this) maybe stop posting all the incremental
 updates you're doing, and when there is a major break through, or
 someone has an idea on how to help solve your issue, update us.

 Steve.

I wish to have a complete log of this bughunt somewhere online, one of
the many websites with the php mailing list content will do nicely.

I suppose i could've chosen to subscribe to the libcurl mailinglist,
but this seemed a good place because i thought to find many people
that use libcurl in different ways here.
And at the start it could've been the php-cli, or the apache, or the
lib-curl, i just didn't know.

Even though lib-curl atm looks the more likely suspect, i'll continue
this log here.

If you don't like it, don't read it.
With a decent mail reader it is shoved under 1 header anyways.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 3:47 PM, Tolas Anon tolas...@gmail.com wrote:
 On Tue, Feb 8, 2011 at 9:33 PM, Steve Staples sstap...@mnsi.net wrote:
 i've been sorta reading this (as I am sure most maybe stopped after the
 4th consecutive post)...

 yea, i feel i gotta be complete so as to not waste the time of people
 who do wanna help.

Personally, I feel that if you want to have a conversation that
pertains to the usefulness of the language, and therefore promote it's
'consumer' benefits, and branding, it's a necessity to relate it to
the language, and solve the OP's problem programatically utilizing the
language itself.


 but what I am wondering is...

 why can't you just write the output of the what you're doing to a file,
 or the db, and then query along the way or when you need/want some
 information on it??   Maybe i just haven't quite figured out, or got the
 gist of what you are trying to accomplish...

 That's exactly what i'm doing.
 I need curl_exec() to absorb the response to requests that take over
 1hr to complete, because i want to be able to run different parts of
 the media import process on different servers.

 it also seems to me, that this really isn't a PHP specific issue, so all
 the posts that you're doing, really doesn't pertain to the PHP mailing
 list, so (and sorry to say this) maybe stop posting all the incremental
 updates you're doing, and when there is a major break through, or
 someone has an idea on how to help solve your issue, update us.

 Steve.

 I wish to have a complete log of this bughunt somewhere online, one of
 the many websites with the php mailing list content will do nicely.

 I suppose i could've chosen to subscribe to the libcurl mailinglist,
 but this seemed a good place because i thought to find many people
 that use libcurl in different ways here.
 And at the start it could've been the php-cli, or the apache, or the
 lib-curl, i just didn't know.

 Even though lib-curl atm looks the more likely suspect, i'll continue
 this log here.

 If you don't like it, don't read it.
 With a decent mail reader it is shoved under 1 header anyways.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
According to theoretical physics, the division of spatial intervals as
the universe evolves gives rise to the fact that in another timeline,
your interdimensional counterpart received helpful advice from me...so
be eternally pleased for them.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
On Tue, Feb 8, 2011 at 11:01 PM, Tolas Anon tolas...@gmail.com wrote:
 Ok, another run, this time after adding the following to
 php_daemon_script;

        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                        'Connection: Keep-Alive',
                        'Keep-Alive: 300'
        ));

 Exec-sum:
 No change whatsoever in behaviour, curl_exec still freezes after
 processing the 2gb file completely. ~maus was right.

 Since i create the folder in the cms to hold the media-imported
 files before starting the import, i can view the offending 2gb video
 as an end-user of my cms. but files that were behind the 2gb video
 in the queue never get imported because curl_exec (or something
 feeding it) has frozen.

 It could be that apache sends the wrong packets, or libcurl rejects
 'good' packets, or libcurl just froze completely. I might not have
 thought of all possibilities though, that's one of the reasons I
 post these mails.

 I've run out of ideas again..
 And since i've been at it since 05:00, i'll get some sleep now..

 opening bell of 2gb import, microsoft network monitor 3.4 again:


 89268   21:48:23 8-2-2011       314.7693867     Unavailable-4920

 InternetDomainNameOfApacheServer        WindowsNameOfApacheServer

 HTTP    HTTP:Request, POST /site/cms/php/php_(import_)script.php,

 Query:PHPSESSID=bhgnqukbn4v0dbbv25i14ca2o4action=batchNext

 {HTTP:112, TCP:110, IPv4:1} {{ALL GOOD DATA}}


 And the closing bell (the omissions are there because i let the

 sniffer app filter by process id - ip-address) :

 363     22:31:16 8-2-2011       676.1139552     Unavailable-4920
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    HTTP
 HTTP:Response, HTTP/1.1, Status: Ok, URL:{OMMITTED BECAUSE OF MEMORY
 EXHAUSTION-KILL OF SNIFFER APP}        {HTTP:31, TCP:30, IPv4:29}
 {{CONTAINS THE WANTED DATA}}

 367     22:31:19 8-2-2011       679.1089487     Unavailable-4920
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    TCP
 TCP:[ReTransmit #363]Flags=...AP..., SrcPort=HTTP(80), DstPort=8372,
 PayloadLen=614, Seq=3326586000 - 3326586614, Ack=3291710338, Win=260
 {TCP:30, IPv4:29}

 372     22:31:21 8-2-2011       681.6189851     Unavailable-4920
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    TCP
 TCP:Flags=...A...F, SrcPort=HTTP(80), DstPort=8372, PayloadLen=0,
 Seq=3326586614, Ack=3291710338, Win=260 {TCP:30, IPv4:29}

 376     22:31:25 8-2-2011       685.1089219     Unavailable-4920
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    TCP
 TCP:[ReTransmit #363]Flags=...AP..F, SrcPort=HTTP(80), DstPort=8372,
 PayloadLen=614, Seq=3326586000 - 3326586615, Ack=3291710338, Win=260
 {TCP:30, IPv4:29}

 384     22:31:37 8-2-2011       697.1089168     Unavailable-4920
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    TCP
 TCP:[ReTransmit #363]Flags=...AP..F, SrcPort=HTTP(80), DstPort=8372,
 PayloadLen=614, Seq=3326586000 - 3326586615, Ack=3291710338, Win=260
 {TCP:30, IPv4:29}

 400     22:32:01 8-2-2011       721.1089938     Unavailable-4920
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    TCP
 TCP:[ReTransmit #363]Flags=...AP..F, SrcPort=HTTP(80), DstPort=8372,
 PayloadLen=614, Seq=3326586000 - 3326586615, Ack=3291710338, Win=260
 {TCP:30, IPv4:29}

 431     22:32:49 8-2-2011       769.1090750     Unavailable-4920
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    TCP
 TCP:[ReTransmit #363]Flags=...AP..F, SrcPort=HTTP(80), DstPort=8372,
 PayloadLen=614, Seq=3326586000 - 3326586615, Ack=3291710338, Win=260
 {TCP:30, IPv4:29}

 485     22:33:49 8-2-2011       829.1041446     Unavailable-4920
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    TCP
 TCP:Flags=...A.R.., SrcPort=HTTP(80), DstPort=8372, PayloadLen=0,
 Seq=3326586615, Ack=3291710338, Win=0   {TCP:30, IPv4:29}

 550     22:35:38 8-2-2011       938.7487524     Unavailable-676
 WindowsNameOfApacheServer       InternetDomainOfApacheServer    TCP
 TCP:Flags=...A.R.., SrcPort=8372, DstPort=HTTP(80), PayloadLen=0,
 Seq=3291710338, Ack=3326586000, Win=0   {TCP:59, IPv4:29}

 551     22:35:38 8-2-2011       938.7514250     Unavailable-4920
 InternetDomainOfApacheServer    WindowsNameOfApacheServer       TCP
 TCP:Flags=...A.R.., SrcPort=8372, DstPort=HTTP(80), PayloadLen=0,
 Seq=3291710338, Ack=3326586000, Win=0   {TCP:60, IPv4:29}


 Please note that packet 550 was apparently from a different cpu
 process.


oh, packet number 363 has HTTP/1.1 as the protocol version..

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
Ok, another run, this time after adding the following to
php_daemon_script;

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Connection: Keep-Alive',
'Keep-Alive: 300'
));

Exec-sum:
No change whatsoever in behaviour, curl_exec still freezes after
processing the 2gb file completely. ~maus was right.

Since i create the folder in the cms to hold the media-imported
files before starting the import, i can view the offending 2gb video
as an end-user of my cms. but files that were behind the 2gb video
in the queue never get imported because curl_exec (or something
feeding it) has frozen.

It could be that apache sends the wrong packets, or libcurl rejects
'good' packets, or libcurl just froze completely. I might not have
thought of all possibilities though, that's one of the reasons I
post these mails.

I've run out of ideas again..
And since i've been at it since 05:00, i'll get some sleep now..

opening bell of 2gb import, microsoft network monitor 3.4 again:


89268   21:48:23 8-2-2011   314.7693867 Unavailable-4920

InternetDomainNameOfApacheServerWindowsNameOfApacheServer   

HTTPHTTP:Request, POST /site/cms/php/php_(import_)script.php,

Query:PHPSESSID=bhgnqukbn4v0dbbv25i14ca2o4action=batchNext 

{HTTP:112, TCP:110, IPv4:1} {{ALL GOOD DATA}}


And the closing bell (the omissions are there because i let the

sniffer app filter by process id - ip-address) :

363 22:31:16 8-2-2011   676.1139552 Unavailable-4920
WindowsNameOfApacheServer   InternetDomainOfApacheServerHTTP
HTTP:Response, HTTP/1.1, Status: Ok, URL:{OMMITTED BECAUSE OF MEMORY
EXHAUSTION-KILL OF SNIFFER APP}{HTTP:31, TCP:30, IPv4:29}
{{CONTAINS THE WANTED DATA}}

367 22:31:19 8-2-2011   679.1089487 Unavailable-4920
WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 
TCP:[ReTransmit #363]Flags=...AP..., SrcPort=HTTP(80), DstPort=8372,
PayloadLen=614, Seq=3326586000 - 3326586614, Ack=3291710338, Win=260
{TCP:30, IPv4:29}

372 22:31:21 8-2-2011   681.6189851 Unavailable-4920
WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 
TCP:Flags=...A...F, SrcPort=HTTP(80), DstPort=8372, PayloadLen=0,
Seq=3326586614, Ack=3291710338, Win=260 {TCP:30, IPv4:29}

376 22:31:25 8-2-2011   685.1089219 Unavailable-4920
WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 
TCP:[ReTransmit #363]Flags=...AP..F, SrcPort=HTTP(80), DstPort=8372,
PayloadLen=614, Seq=3326586000 - 3326586615, Ack=3291710338, Win=260
{TCP:30, IPv4:29}

384 22:31:37 8-2-2011   697.1089168 Unavailable-4920
WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 
TCP:[ReTransmit #363]Flags=...AP..F, SrcPort=HTTP(80), DstPort=8372,
PayloadLen=614, Seq=3326586000 - 3326586615, Ack=3291710338, Win=260
{TCP:30, IPv4:29}

400 22:32:01 8-2-2011   721.1089938 Unavailable-4920
WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 
TCP:[ReTransmit #363]Flags=...AP..F, SrcPort=HTTP(80), DstPort=8372,
PayloadLen=614, Seq=3326586000 - 3326586615, Ack=3291710338, Win=260
{TCP:30, IPv4:29}

431 22:32:49 8-2-2011   769.1090750 Unavailable-4920
WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 
TCP:[ReTransmit #363]Flags=...AP..F, SrcPort=HTTP(80), DstPort=8372,
PayloadLen=614, Seq=3326586000 - 3326586615, Ack=3291710338, Win=260
{TCP:30, IPv4:29}

485 22:33:49 8-2-2011   829.1041446 Unavailable-4920
WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 
TCP:Flags=...A.R.., SrcPort=HTTP(80), DstPort=8372, PayloadLen=0,
Seq=3326586615, Ack=3291710338, Win=0   {TCP:30, IPv4:29}

550 22:35:38 8-2-2011   938.7487524 Unavailable-676 
WindowsNameOfApacheServer   InternetDomainOfApacheServerTCP 
TCP:Flags=...A.R.., SrcPort=8372, DstPort=HTTP(80), PayloadLen=0,
Seq=3291710338, Ack=3326586000, Win=0   {TCP:59, IPv4:29}

551 22:35:38 8-2-2011   938.7514250 Unavailable-4920
InternetDomainOfApacheServerWindowsNameOfApacheServer   TCP 
TCP:Flags=...A.R.., SrcPort=8372, DstPort=HTTP(80), PayloadLen=0,
Seq=3291710338, Ack=3326586000, Win=0   {TCP:60, IPv4:29}


Please note that packet 550 was apparently from a different cpu
process.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread Tolas Anon
The one thing that strikes me as odd, before i go, is that i saw no
actual HTTP-KEEPALIVE traffic flowing... I might have missed it, but i
don't think so..

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl_exec won't return (any data)

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 5:05 PM, Tolas Anon tolas...@gmail.com wrote:
 The one thing that strikes me as odd, before i go, is that i saw no
 actual HTTP-KEEPALIVE traffic flowing... I might have missed it, but i
 don't think so..


Welcome to programming. on /off true /false.
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
According to theoretical physics, the division of spatial intervals as
the universe evolves gives rise to the fact that in another timeline,
your interdimensional counterpart received helpful advice from me...so
be eternally pleased for them.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php