Skip to content

Dear Lazyweb: Help With PHP include_path Problem

March 7, 2007

I’m trying to get phpMyAdmin installed on one of my dev environments. I’ve never had trouble before, but something is amiss on this box. Its running:

Apache/2.0.59 (Unix) DAV/2 PHP/5.2.0 Server at large.sfbay Port 80
mysql Ver 12.22 Distrib 4.0.24, for pc-solaris2.10 (i386)
PHP 5.2.0 (cli) (built: Nov 4 2006 07:17:22)

and a test script printing phpinfo() reports all the right things. However, when I try to pull up the phpMyAdmin index page, I get errors suggesting its not groking my include_path:

[Wed Mar 07 09:29:31 2007] [error] [client 129.146.110.129] PHP Warning: require_once(./libraries/common.lib.php) [function.require-once]: failed to open stream: No such file or directory in /export/home/htdocs/phpMyAdmin-2.10.0.2-all-languages/index.php on line 36
[Wed Mar 07 09:29:31 2007] [error] [client 129.146.110.129] PHP Fatal error: require_once() [function.require]: Failed opening required ‘./libraries/common.lib.php’ (include_path=’.:/usr/local/php/lib/php’) in /export/home/htdocs/phpMyAdmin-2.10.0.2-all-languages/index.php on line 36

Even though the error itself says my include_path includes the current working directory.

Whats up with that? I hacked around it for the time being, by making all paths absolute:

find . -type f | xargs perl -pi -e 's=\./libraries/=/export/home/htdocs/phpMyAdmin/libraries/=g'
find . -type f | xargs perl -pi -e 's=\./lang/=/export/home/htdocs/phpMyAdmin/lang/=g'

Ick. Perhaps I’ll set some time aside to migrate to Sun Webserver 7 and see if thats cures it. Its about time I ran some benchmarks against that container anyway…

Advertisements

From → Interweb

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: