Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PEAR error require_once(Structures/Graph/Node.php): failed to open stream

Tags:

php

phpunit

pear

I'm trying to install PHPUnit using PEAR. Whatever command i run like pear install phpunit/PHPUnit, pear install Structures_Graph, pear upgrade, pear upgrade --force --alldeps... it always ends with

Warning: require_once(Structures/Graph/Node.php): failed to open stream: No such file or directory in PEAR\Structures\Graph.php on line 37 PHP Warning: require_once(Structures/Graph/Node.php): failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.4\PEAR\PEAR\Structures\Graph.p hp on line 37

Warning: require_once(Structures/Graph/Node.php): failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.4\PEAR\PEAR\Structures\Graph.php on line 37 PHP Fatal error: require_once(): Failed opening required 'Structures/Graph/Node .php' (include_path='C:\wamp\bin\php\php5.3.4\pear') in C:\wamp\bin\php\php5.3.4 \PEAR\PEAR\Structures\Graph.php on line 37

Fatal error: require_once(): Failed opening required 'Structures/Graph/Node.php' (include_path='C:\wamp\bin\php\php5.3.4\pear') in C:\wamp\bin\php\php5.3.4\PEAR \PEAR\Structures\Graph.php on line 37

I tried the answer to this question and downloaded and extracted the ZIP to C:\wamp\bin\php\php5.3.4\PEAR\PEAR, but that only replaces the Structures_Graph error I had before with this one.

PEAR is installed with go-pear.bat on a wamp installation on Windows 7, PHP 5.3.4.

What more can I try to make this work?

Update: It should be said that I've tried to change the include_path reported in the error above, to no success. Tried to alter both php.ini and pear.bat.

like image 224
Znarkus Avatar asked Apr 11 '11 18:04

Znarkus


2 Answers

I found that the version of pear (go-pear.phar) which comes with wamp is basically broken.

Downloading a fresh go-pear.phar file from pears website worked for me.

like image 169
Keyo Avatar answered Oct 21 '22 07:10

Keyo


When I installed the files it installed some of them in path c:\wamp\bin\php\php5.3.5\PEAR\pear\PEAR\, among the files there was the Structures directory. I simply copied all the files one direcotyr up to c:\wamp\bin\php\php5.3.5\PEAR\pear\ and the problem has been resolved, at least for me

like image 44
Emil Avatar answered Oct 21 '22 08:10

Emil