Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are there no longer Windows binaries for PECL extensions like pecl_http?

I'm working on a PHP project running on Windows and it would be so very handy to be able to use pecl_http rather than working with cURL and re-inventing the wheel in order to do all the cool stuff the pecl extension does like parsing headers and so forth.

Everywhere I read (including the PHP site) is that the Windows binary for pecl_http is no longer packaged with any PHP installation. I can't find any explanation as to why not anywhere. Also, http://pecl4win.php.net/ has been down for ages and I can only assume that the pecl4win project is dead.

Does anyone know the story about what happened and if there are any nice alternatives to pecl_http that I can run in a WIMP environment?

like image 971
Iain Fraser Avatar asked Oct 28 '09 01:10

Iain Fraser


People also ask

How to install PHP extensions on Windows?

On Windows, you have two ways to load a PHP extension: either compile it into PHP, or load the DLL. Loading a pre-compiled extension is the easiest and preferred way. To load an extension, you need to have it available as a ". dll" file on your system.

How do I enable PECL?

You have to compile the CGI or CLI version of PHP with --enable-pcntl configuration option when compiling PHP to enable Process Control support.


3 Answers

Try this:

First, download the PECL module from the php website : PECL 5.2.2 Win32 binaries.
Then unzipp it and copy the file php_http.dll in your PHP extension folder.
Now edit your php.ini file (c:\WINDOWS\php.ini) and activate the module :
extension=php_http.dll
Restart apache and check the installation using phpinfo.

**EDIT: ** Link: PECL 5.2.6 Windows Binaries

Source

like image 172
Alex Weber Avatar answered Oct 04 '22 09:10

Alex Weber


I'm not sure if this is a fresh update to the page or if I missed it the first time. But under the current Windows Binaries there is a note which reads:

Note: The PECL package will not be released for this version. The 5.2.6 PECL package does however work with this release

(From: http://www.php.net/downloads.php)

For some reason I only noticed the first part, to the point where I'm almost SURE the second sentence wasn't there when I checked the first time :). Not to worry, effectively this means I can use the PECL package from the 5.2.6 release of PHP. (http://museum.php.net/php5/pecl-5.2.6-Win32.zip)

Thanks guys for your answers, it was a great help.

Cheers Iain

like image 39
Iain Fraser Avatar answered Oct 04 '22 11:10

Iain Fraser


Perhaps one of the PEAR modules can help you? PEAR modules are implemented in PHP, so will work on any PHP install anywhere (theoretically).

Installation instructions for Pyrus (PHP 5.3+) or plain old PEAR.

like image 34
Matthew Scharley Avatar answered Oct 04 '22 11:10

Matthew Scharley