troubleshooting Question

PHP library path?

Avatar of tel2
tel2Flag for New Zealand asked on
3 Comments1 Solution586 ViewsLast Modified:
Hi Experts,

My PHP skills are lacking, and I recently downloaded and installed an OpenSource PHP program on a shared Linux webhosting account, but I got an error message when I browsed to the site:
  'MDB2 Library not found on the server.  See the readme file for how to work around this'

So, I followed the instructions in the readme file, which were basically to run these commands from the command line:
    pear install MDB2
    pear install MDB2_Driver_mysql

I ran those, and attached is a log of the installs.  I still got the same error from the browser.

I saw that the MDB2 etc files were installed into the php directory in my home directory (i.e. /home/my-account/php), but I guess PHP doesn't know to look there, so how can I tell it to?  (In Perl I'd do something like: 'use lib "/home/my-account/perl5/..."').

I ended up working around this by putting the MDB2 etc files into the directory of the application, but I'd like to know the proper way of dealing with this.

Here's the code which generated the error message (it's in include/init.php):
    // Set up the DB
    if (!@include_once('MDB2.php')) {
      trigger_error('MDB2 Library not found on the server.  See the readme file for how to work around this');

I do not have root access to this shared server, just command line access.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros