Problems with Pear and php5

software development

#1

I’m going to be doing some programming that requires php5, that’s fine, dreamhost offers it. However, when I try to use this additional pear package, it won’t work when php5 is enabled on my account. I tried it on another domain I have hosted here that uses php4 and it does fine. Perhaps it’s not possible or perhaps there is another way to do it, I’m not sure.

Here is the code:

ini_set(‘include_path’, ini_get(‘include_path’).’:/home/dionysus/17thdegree.com/pear_packages/DB-1.7.6/’);
require_once(“DB.php”);

The error when php5 is enabled:

Warning: main(PEAR.php) [function.main]: failed to open stream: No such file or directory in /home/.taffi/dionysus/17thdegree.com/pear_packages/DB-1.7.6/DB.php on line 30

Fatal error: main() [function.require]: Failed opening required ‘PEAR.php’ (include_path=’.:/usr/local/php5/lib:/home/dionysus/17thdegree.com/pear_packages/DB-1.7.6/’) in /home/.taffi/dionysus/17thdegree.com/pear_packages/DB-1.7.6/DB.php on line 30


#2

My thought is that pear package was not installed with php5, I would recommend contacting DH and checking that fact out. If it is true then you may need to compile you own version of php5 with that pear package and upload that.
Silk


#3

The DB package is not part of the default Pear installation and that is all that dreamhost has installed.

I will contact dreamhost admin’s and see what they say.


#4

Hmm, apparently the DB package is one of the included packages for php5.

See this wiki article:
http://wiki.dreamhost.com/index.php/PEAR_breaks_on_upgrading_to_PHP5

You can see the installed packages in /usr/local/lib/php