Pecl_http at Dreamhost

software development

#1

Hi all,
I’m tryng to use the pecl_http extension for php at dreamhost. Sadly it is not avaliable.

I tried to compile it and use it with the dl function.
I was able to compile it ( I had to use my own autoconf, php and curl instalation). Now I have the http.so file.

I placed the http.so in the same directory my script is but I cant use the library classes.

My script is very simple:

GNU nano 1.2.4 File: test.php

<?php $e = dl("./http.so"); if($e === TRUE) echo "okay"; $req = new HttpRequest; ?>

The resul Im getting is:

okay
Fatal error: Cannot instantiate non-existent class: httprequest in /home/.mcqueen/hscomputadores/hscomputadores/hscomputadores.com/test.php on line 8

Has someone ever used pecl_http??

Thank you,
Eduardo


#2

Did you ever get this to work? I’m running into a need to use HttpRequest and it would be a shame to have to do all of this in javascript.


#3

Use the curl extension instead? It’s got most of the same functionality, and it’s installed/available by default.