2

i am hosting a website on hostGator with Linux cpanel. i am using httpRequest and Curl functions in my php script. But when i put the script on Live Server it says,

Fatal error: Class 'HTTPRequest' not found in home/directory/file.php on line42

Any way to set up the server as i,ve update the php version to 5.5 on server from Cpanel.

How to configure these settings i have no idea. Don't Link to these Questions not Helping in my case: PHP Fatal error: Class 'HttpRequest' not found
HttpRequest not found in php

Community
  • 1
  • 1

2 Answers2

0

This is a pecl module that is apparently not installed on your server. You can either install via cPanel -> PECL or using the pecl cli pecl install

http://www.php.net/manual/en/install.pecl.php

Looks like I was wrong there does not appear to be a pecl manager in cPanel just pear.

So you need to ssh to the server and use the pecl command else write support@hostgator.com and request they install the extension for you

morissette
  • 1,071
  • 1
  • 8
  • 29
0

You can try this Alternative, as if you are on shared hosting you might not able to get the desired modules: instead of httprequest use CURL which is built in php module, and easily enabled on linux hosting servers as well. Check this out might be helpful. Alternative for HTTPRequest in php

Community
  • 1
  • 1
Zahid Khan
  • 1,250
  • 3
  • 15
  • 31