curl crashes! How do I update curl? - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Development Area (/forum-1.html) +--- Forum: General discussion (/forum-11.html) +--- Thread: curl crashes! How do I update curl? (/thread-3082.html) Pages: 1 2 |
RE: curl crashes! How do I update curl? - zabersoft - 04-25-2008 09:32 AM rbtux Wrote:can you provide the scripts or example code that crashes in your installation? Hi! I think I have located the problem - maybe it's a buffer overflow issue or something of the sort. In any case, after much headscratching I tried a workaround solution by putting the script on the server that worked and then use curl to fetch the output to my own server. Now, this still crashed! Which it shouldn't if it was a response/header problem with the remote server that I have no control over. So - I did a little experiment - I took the output and saved it as a html file - then from my own server I ran this simple code: Code: $url = "http://www.zabersoft.com/trendy/test.html"; And it crashes! Try going to that URL - It's just plain old text. But for some reason this makes the server puke all over the place and return http 500 Any ideas what is going on??? Thanks! Zaber RE: curl crashes! How do I update curl? - zabersoft - 04-25-2008 09:45 AM Aaaargh! Ok I might have been a bit too fast on stating that the above crashes. Well - It does, but only sporadically. Fetching from the original URL always crashes - I will give it out here eventhough it is a bit sensitive information - but for the greater good: Code: $url = "http://www.zabersoft.com/trendy/webpack_fetch.php?from=24-04-2008&to=25-04-2008"; Anyway - This ALWAYS crashes - Whilst $url = "http://www.zabersoft.com/trendy/test.html"; Sometimes crashes. As you can see it is the same output. If you can find the difference and/or reproduce this and track this down you will be my official hero! PS: please be patient with webpack_fetch.php - The remote server is a bit slow. Thanks Zaber RE: curl crashes! How do I update curl? - zabersoft - 04-25-2008 10:27 AM Ok after much new experimentation I have come to the conclusion that all this madness is a simple timeout issue. I noticed that it didn't matter WHAT the data was, but rather via. which script I was getting it. So I timed the scripts - and on the server where it works, then the request can take up to 52 seconds to complete. Whilst on my own server running ispcp it errors out with the http 500 error after around 30 to 33 seconds. Which would make sense when I look at the max_execution_time in php.ini However - after having changed to: php.ini max_execution_time = 300 httpd.conf Timeout 300 and setting curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, 300); curl_setopt($curl_session, CURLOPT_TIMEOUT, 600); in my request - The script still dies after ~30 seconds And yes, I have restarted Apache after the changes. What the heck??? Zaber RE: curl crashes! How do I update curl? - ephigenie - 04-25-2008 06:00 PM Do you use fastcgi or mod_php ? Just because if you're running fastcgi (the default for ispCP) you'll need to set the max_execution time in the right php.ini (otherwise it will be overriden with the values found in /var/www/fcgi/<domain>.<tld>/php5/php.ini .... RE: curl crashes! How do I update curl? - zabersoft - 04-28-2008 06:03 AM ephigenie Wrote:Do you use fastcgi or mod_php ? Hi, I'm using the standard fastcgi and I have changed php ini for both php4 and php5 on the domain in question in /var/www/fcgi etc. But it is not working. The script still dies after 30 seconds. In addition to this I changed php.ini for mod_php just for safety sake. But still no joy. What might be going on?? Thanks, Zaber RE: curl crashes! How do I update curl? - zabersoft - 04-28-2008 06:08 AM UPDATE: I HAVE MOVED THIS QUESTION TO A NEW THREAD: http://www.isp-control.net/forum/how-to-change-script-timeout-settings-t-3167.html PS: This is what phpinfo() gives me: Configuration File (php.ini) Path /etc/php5/cgi Loaded Configuration File /var/www/fcgi/xxxx.dk/php4/php.ini Scan this dir for additional .ini files /etc/php5/cgi/conf.d Why is it using php4 ini when php5 is loaded? In any case, all php.ini files have been changed from 30 to 300 seconds in addition to my earlier changes. My server still kills the script after 30 seconds. Thanks Zaber |