i_a
i_a

Reputation: 2763

pyrus.phar installed but can't find PEAR2/Autoloader.php in Ubuntu 14.04

I am installing Net_RouterOS on Ubuntu 14.04. I was able to install everything fine in OSX 10.7.5, but on the Ubuntu machine, I have not been able to configure pyrus.phar correctly to install and run Net_RouterOS.

What I am having trouble with, is where to locate the pyrus.phar file, and what the setting should be in the pearconfig.xml file (which is located at /home/xxxx/.pear). It seems that there are problems with either permissions or possible the location of the files.

When I include this at the top of my php file:

use PEAR2\Net\RouterOS;
require_once 'PEAR2/Autoload.php';

I get:

Warning: require_once(PEAR2/Autoload.php): failed to open stream: No such file or directory in /var/www/html/wifi_creator.php on line 3

Fatal error: require_once(): Failed opening required 'PEAR2/Autoload.php' (include_path='/usr/bin/php:/usr/share/php:/home/xxxx/.pear') in /var/www/html/wifi_creator.php on line 3

Any help would be great! Thank you

Upvotes: 0

Views: 1124

Answers (1)

i_a
i_a

Reputation: 2763

Figured it out. I did a search with this command:

find / -iname Autoload.php

And it took a while but finally I got back /usr/share/php/PEAR/php/PEAR2/Autoload.php

So in my php.ini file I added /usr/share/php/PEAR/php to the include_path

whew :)

Upvotes: 0

Related Questions