php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58393 HttpRequest class unknown
Submitted: 2008-10-28 08:41 UTC Modified: 2008-10-29 15:25 UTC
From: fjas at free dot fr Assigned: mike (profile)
Status: Not a bug Package: pecl_http (PECL)
PHP Version: 5.2.5 OS: Win Server 2003 (SE)
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: fjas at free dot fr
New email:
PHP Version: OS:

 

 [2008-10-28 08:41 UTC] fjas at free dot fr
Description:
------------
Trying to use the HttpRequest class results in a fatal error.
Yet, the Http extension was correctly loadad, and the class HttpQueryString, or the function http_get(), work right.

Note that my libcurl version is 7.16.0.
Also note that my PHP version is 5.2.6 (and not 5.2.5, as mentionned: it would be nice to update the webform, so we can choose "5.2.6"). Also, note that I have "1.6.1-dev" (I could not find a "1.6.1-stable", neither in the current 5.2.6 win32 distrib, neither in the separate win32 pecl package)

Mu Curl version:
cURL support : enabled  
cURL Information : libcurl/7.16.0 OpenSSL/0.9.8g zlib/1.2.3  

Used Library	Compiled	Linked
libcurl 	7.16.0		7.16.0 
libevent 	disabled 	disabled 
libz 		1.2.3 		1.2.3 
libmagic 	unknown 	unknown 

My loaded extensions (php.ini):
extension=php_curl.dll
extension=php_gd2.dll
extension=php_http.dll
extension=php_ldap.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_oci8.dll
extension=php_openssl.dll
extension=php_curl.dll
extension=php_printer.dll
extension=php_soap.dll
extension=php_sockets.dll
extension=php_xsl.dll

Here is my configure cmd:
cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" "--with-extra-includes=C:\Program Files (x86)\Microsoft SDK\Include;C:\PROGRA~2\MICROS~2\VC98\ATL\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\MFC\INCLUDE" "--with-extra-libs=C:\Program Files (x86)\Microsoft SDK\Lib;C:\PROGRA~2\MICROS~2\VC98\LIB;C:\PROGRA~2\MICROS~2\VC98\MFC\LIB" 

Apache version :
Apache/2.2.8 (Win32) PHP/5.2.6 

Reproduce code:
---------------
$h = HttpRequest('http://www.google.com/', HTTP_METH_GET);

Expected result:
----------------
No error

Actual result:
--------------
Fatal error: Call to undefined function HttpRequest() in ...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-28 09:36 UTC] mike@php.net
You need to write "new HttpRequest" to create an instance.
 [2008-10-29 15:25 UTC] fjas at free dot fr
Oops, you're right. Sorry (how the hell did I make such a mistake?)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 07:01:33 2025 UTC