Ask Your Question
0

PHP class HttpResponse not found in...

asked 2013-07-08 15:21:25 -0500

JdS gravatar image

On my development machine with Fedora 19. Trying to develop a web site requiring the PHP HTTP extension but I cannot seem to fix this error by myself:

PHP Fatal error:  Class 'HttpResponse' not found in /home/mememe/domains/example.com/public_html/by_date.inc.php on line 54

Originally, I installed the extension through yum, like this: sudo yum install php-pecl-http*.

When that didn't work, I even tried installing it the old-fashioned way i.e. sudo pecl install pecl_http but the error remains.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-07-09 01:59:06 -0500

Remi gravatar image

updated 2013-07-09 02:00:46 -0500

php-pecl-http is extension version 2 which is incompatible with version 1 not available in fedora repository.

Upstream documentation still describe version 1 :( See

php --re http

for classes and methods description.

edit flag offensive delete link more

Comments

For new development, I will recommend to use the new version 2. If you really want to work the old version 1, you can give a try to http://rpms.famillecollet.com/fedora/19/remi/x86_64/repoview/php-pecl-http1.html (I have not yet decided if I will submit it for official repo)

Remi gravatar imageRemi ( 2013-07-09 02:02:26 -0500 )edit

Merci, M. Collet. I went with version 1 once I figured out that it was failing because the .ini file was filenamed 'http.ini'. It needed to be filenamed something else, something that would make it list in the directory after iconv.ini,.. but I'm guessing you already know that!

JdS gravatar imageJdS ( 2013-07-09 16:20:09 -0500 )edit

Question Tools

Stats

Asked: 2013-07-08 15:21:25 -0500

Seen: 662 times

Last updated: Jul 09 '13