Darrell
Darrell

Reputation: 103

PHPDoc on OSX via PEAR

I'm running OS 10.8.2 (Mountain Lion).

I did a fresh install of PEAR just as this blog states:

http://clickontyler.com/blog/2008/01/how-to-install-pear-in-mac-os-x-leopard/

So I set include_path in my php.ini file to /usr/local/share/pear. Then I installed apigen via pear and everything works fine. I then wanted to install phpdoc, but after I installed it, I get the following error:

PHP Warning:  require(/usr/lib/php/pear/phpDocumentor/src/phpDocumentor/Bootstrap.php): failed to open stream: No such file or directory in /usr/bin/phpdoc on line 33
PHP Fatal error:  require(): Failed opening required '/usr/lib/php/pear/phpDocumentor/src/phpDocumentor/Bootstrap.php' (include_path='.:/usr/local/share/pear') in /usr/bin/phpdoc on line 33

After searching on SO, I found this QA: PhpDocumentor installed via PEAR on OSX not working - missing files?

So, when I do pear config-show it shows that my php_dir is set to /usr/local/share/pear which is exactly what is set in my php.ini

However, it seems that phpdoc is trying to use /usr/lib/php/pear as the directory still.

The /usr/lib/php/pear folder doesn't exist! So, if I change my pear configs to this folder, it will break my other pear-installed commands.

Any help would be appreciated.

Thanks!

Upvotes: 0

Views: 991

Answers (1)

Darrell
Darrell

Reputation: 103

I was just about to give up when I found a solution.

OS X was using PHP 5.3, so I manually updated it to 5.4.10.

Then, I reinstalled PEAR, then reinstalled apigen then reinstalled phpdoc and it all worked fine.

To update PHP on my system, I followed the following: http://mac.tutsplus.com/tutorials/server/upgrading-the-native-php-installation-on-os-x-mountain-lion/

Upvotes: 1

Related Questions