php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2449 When mcrypt support is added, fsockopen fails to return a file identifier
Submitted: 1999-10-05 22:38 UTC Modified: 2000-01-08 06:49 UTC
From: jason at qgl dot org Assigned:
Status: Closed Package: mcrypt related
PHP Version: 3.0.12 OS: Linux (Slackware 4.0 and 3.6)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jason at qgl dot org
New email:
PHP Version: OS:

 

 [1999-10-05 22:38 UTC] jason at qgl dot org
Configure line:

./configure --with-apache=../apache_1.3.9 --with-mcrypt

Experienced same results without Apache, and with Php versions 3.0.10 and 3.0.11 and with various versions of libmcrypt from 2.2.1 and older

As soon as --with-mcrypt was omitted, fsockopen worked fine.

Example code:

<?
$fp = fsockopen("www.php.net",80);
fputs($fp,"GET / HTTP/1.0\n\n");
?>

Warning: Unable to find file identifier 0 in /path/to/test.php3 on line 3

(Tried various hosts and ports)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-20 15:27 UTC] sas at cvs dot php dot net
Works for me with current PHP 4 and libmcrypt-2.2.4. Please configure PHP with --enable-debug. Then run

$ gdb php
...
<gdb> run <insert-script-name-here>
(php starts.. wait until you think it hangs and press CTRL-C)
<gdb> bt

The output of that will show us the source of the problem.
 [2000-01-08 06:49 UTC] sas at cvs dot php dot net
Configuring mcrypt with --disable-pthreads will solve this.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 10:01:27 2025 UTC