Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class 'HttpResponse' not found

Tags:

http

php

According to PHP documentation, HttpResponse is a static class to manipulate the Http response to the requester.

The code echo HttpResponse::getBufferSize();

throws the error in the Subject of this post.

Any ideas? Maybe it's some config, but I am a PHP newbie and I'm not sure where to look.

Thanks!

like image 551
richb01 Avatar asked Mar 21 '26 19:03

richb01


1 Answers

From the docs:

This PECL extension is not bundled with PHP.

You need to install it via PECL http://pecl.php.net/package/pecl_http. To see how to install PECL, see (again) the docs.

If you haven't heard of PECL, read the Wikipedia page!

like image 121
DrColossos Avatar answered Mar 23 '26 08:03

DrColossos