3

I have read many posts that tell me this is because pear is not installed. My issue is that it is installed and I have tried to re-install it without success.

I have my php.ini file set to

include_path='.:/usr/share/php:/usr/share/php/pear'

I have logged into the system by ftp and the files exist and everything appears to be installed properly.

Where have I gone wrong.

FULL ERROR:

Warning: require_once(HTTP/Request2.php): failed to open stream: No such file or directory in /var/www/test.php on line 3 Fatal error: require_once(): Failed opening required 'HTTP/Request2.php' (include_path='.:/usr/share/php:/usr/share/php/pear:/usr/share/PEAR') in /var/www/test.php on line 3

LINE 3: require_once('HTTP/Request2.php');

I have checked the installation of HTTP_Request2 and it is installed and up to date.

EDIT: Could this be caused by some type of permissions?

2
  • Can you show me the code on line 3? It may be typo'd.
    – nanofarad
    Oct 18, 2012 at 20:53
  • require_once('HTTP/Request2.php');
    – Doug
    Oct 18, 2012 at 20:58

1 Answer 1

4

Pear may be installed but pear is itself kind of package manager. Http_request2 has to be installed.

Compare http://pear.php.net/package/HTTP_Request2/redirected

On console try

sudo pear install HTTP_Request2
4
  • HTTP_Request2 is already installed and is the same as the released version
    – Doug
    Oct 18, 2012 at 20:59
  • I have no ubuntu system at hand right now... so guessing...You already checked the inclusion path of your php.ini for existance of that file?! I would try filling in a phpinfo() for debugging and check if the value of php.ini applies to the skipt.
    – cljk
    Oct 18, 2012 at 21:02
  • I dont see anything wrong This has to be a permissions problem but I dont even know where to start
    – Doug
    Oct 18, 2012 at 23:00
  • I checked today my system (10.04 LTS). My include path is .:/usr/share/php:/usr/share/php5:/usr/share/php/PEAR (compare the capitalization) Another solution would be to download the pear package manually and install it in your php path download.pear.php.net/package/HTTP_Request2-2.1.1.tgz
    – cljk
    Oct 19, 2012 at 7:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .