#19301 [Fbk->Opn]: curl_exec crashes
| From: | sniper@php.net | Date: | Mon, 09 Sep 2002 12:35:14 +0000 |
| Subject: | #19301 [Fbk->Opn]: curl_exec crashes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18770@lists.php.net to get a copy of this message | ||
ID: 19301
Updated by: sniper@php.net
Reported By: honza@honza.info
-Status: Feedback
+Status: Open
Bug Type: cURL related
Operating System: Windows XP Professional CZ
PHP Version: 4.2.3
Previous Comments:
------------------------------------------------------------------------
[2002-09-09 07:30:56] honza@honza.info
Ooops, I wanted to write 4.2.3, not 4.3.2.
Honza
------------------------------------------------------------------------
[2002-09-09 07:28:51] honza@honza.info
Nope, PHP 4.3.2 was the first to get into the system. As I said, I even
tested it on clean system (Win2000ProCZ) where nothing else got
installed, not even web server (from W2000 i tried it only as php.exe
executable), and it gave me the crash on a clean system as well.
Honza
------------------------------------------------------------------------
[2002-09-09 05:59:19] sniper@php.net
Just a thought..but did you have some older PHP installed in this
machine before you installed 4.2.3?
If so, make sure you replace ALL the existing files with the ones found
in the new version. Most important one being php4ts.dll
------------------------------------------------------------------------
[2002-09-09 05:52:51] honza@honza.info
OK, there are important news: I downloaded the older PHP 4.1.2 and
checked it there, and it works. The example that crashed in 4.2.3 works
without a problem in 4.1.2. Hope this information helps, now I'll keep
4.1.2 until it gets corrected.
Honza
------------------------------------------------------------------------
[2002-09-09 01:39:38] honza@honza.info
Hello,
I'm a newbie to PHP, so it may be something wrong on my side. But I
checked the problem, reproduced it many times so here I send it.
I replicated the problem many times in Windows XP Professional CZ,
which I use as my operating system. I also have a separate instalation
of Windows 2000 Professional CZ SP2, which I use for my full time job,
and I replicated the problem there as well. While there is a lot of
software installed on my WinXP system, the Win2000 system was
completely clean (I was reinstalling the system for new project), so
there was just Win2000 Pro CZ SP2 and PHP 4.2.3 on the system, nothing
more. The only difference was the crash dialog it produced: under Win2k
it was the dialog "Error in program: php.exe generated errors and so
Windows closed it. It is neccessary to restart the program. Generating
error protocol. OK button", while WinXP give the dialog of "Error
occured in php.exe application and it is necessary to close it. We are
apologizing for caused problems. ... Report the problem to Microsoft
... Send the report button and Don't send button" (please note that I
use the Czech localization of Windows and here I translated back the
messages from the dialogs in Czech language in my Windows into English,
so the original texts may differ).
What I did: I copied the example featured at curl_init function
documentation to a file, and changed the url, so it is now:
<?php
$ch = curl_init ("http://www.ebay.com");
$fp = fopen ("output/result.txt", "w");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
?>
This simple code crashes with dialogs mentioned above. It always
crashes, I had no successfull run.
Note 1: Commenting the lines (using //) in the source I came to the
result that the crashing function is curl_exec(). Other functions work
OK. If I comment only the line with curl_exec() and nothing more, the
script will successfully run.
Note 2: I uncommented the php_curl.dll in php.ini, the extension is
allowed (I tried the script with the extension left commented, and then
it fails on line with curl_init() function).
Note 3: The extension_dir in php.ini is set to proper location. I tried
it set to wrong dir and it produced errors on curl_init() function.
Note 4: It crashes no matter if it is run from DOS-prompt using
php.exe, php-cli.exe or via web server (IIS).
Note 5: When run through IIS the "output" directory has the write
allowed, and the file "result.txt" is created. As curl_exec fails, the
file "result.txt" is left of 0 lenght.
Note 6: Although I didn't see it mentioned in the install documentation
for Windows, before getting into this crashing problem I got a report
that "libeay32.dll cannot be loaded". Of course adding
php-install-dir/dlls into PATH env variable helped. I think it would be
good to add this into install documentation.
OK, that's all for now. Tomorrow I'll try it on different machines
(although they will all be Windows, but simply up-to-date I tried it
only on one computer, just different systems) and I'll report if it
behaves the same in there as well.
Thanx. Honza
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19301&edit=1