[PHP] Help with Curl GZIP problem?
The following code used to work until i upgraded to 4.3.6 Code: --- // Get RSS feed $c = curl_init('http://www.vegguide.org/rss/feed.rss?all=1&omit_hours=1'); curl_setopt($c, CURLOPT_ENCODING, 'gzip'); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_jar); // *** This next line is the problem! *** $data = curl_exec($c); curl_close($c); Expected result: $data should be text. xml_parse($xml, $data) should be able to handle it. Actual result: -- $data is compressed gzip binaray data. I can't use it in this format. What changed? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is Curl GZIP support broken?
The following code used to work until i upgraded to 4.3.6 Code: --- // Get RSS feed $c = curl_init('http://www.vegguide.org/rss/feed.rss?all=1&omit_hours=1'); curl_setopt($c, CURLOPT_ENCODING, 'gzip'); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_jar); // *** This next line is the problem! *** $data = curl_exec($c); curl_close($c); Expected result: $data should be text. xml_parse($xml, $data) should be able to handle it. Actual result: -- $data is compressed gzip binaray data. I can't use it in this format. What changed? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is Curl GZIP support broken?
Check curl_errno() and curl_error(). it sounds like there is a problem with your libcurl I'm not getting any errors using the above functions. Sample PHP code is available at: http://www.vegguide.org/plain/rss-code/get_and_parse_vegguide_rss_feed-php (Requires an account to be able to download RSS data) It used to work, now it doesn't. The problem is the follwing line: $data = curl_exec($c); $data used to be a string. Now it's GZIP compressed binary data that i can't work with. The only thing that has changed is me upgrading to PHP 4.3.6 Any other ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help with Curl GZIP problem?
Sorry, this is a dupe. See: "Is Curl GZIP support broken?" in this same newsgroup. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is Curl GZIP support broken?
PS: I'm using w2k with apache. http://www.php.net/get/php-4.3.6-Win32.zip/from/a/mirror Check curl_errno() and curl_error(). it sounds like there is a problem with your libcurl Curt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is Curl GZIP support broken?
php simply calls the libcurl function and returns what libcurl came back with. There might be problem with the curl.dll your using. The curl.dll i am using is packaged with the binary distribution of PHP (i'm on windows), so if there is a problem with it, there's a problem with the PHP distro. I filed a bug indicating this, but was marked as bogus. http://bugs.php.net/bug.php?id=28168 You might want to try setting CURLOPT_ENCODING to 'defalate'. otherwise dont set any compression requests. This seems to work (slowly?) under test conditions. I'll keep you posted if it works when the 'cron' job is executed several hours from now. Thank you for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: IIS HTTP 405 Error - Clean Urls
Jeremy Weir wrote: how about a server-side redirect to /directory/ at the end of execution of /directory/index.php. You'll give the user an easier time with their back/forward buttons if you do that too. I was looking for more of a server work around, not a me changing my source code work around. :( Thanks anyway. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php