Page 2 of 2

Posted: Mon Dec 18, 2006 1:55 pm
by aliasxneo
Well, after examining the DB.php file I found out that you can set a debug variable when you connect that spits out errors, and now I am finally receiving some errors:

Code: Select all

Warning: require_once(DB/common.php) [function.require-once]: failed to open stream: No such file or directory in /home/coolmail/public_html/includes/system/PEAR/DB/mysql.php on line 30

Fatal error: require_once() [function.require]: Failed opening required 'DB/common.php' (include_path='.:/usr/local/php5-fcgi/lib/php') in /home/coolmail/public_html/includes/system/PEAR/DB/mysql.php on line 30
That's at http://www.coolmailengine.com/test.php

The only problem is that common.php does exist in /home/coolmail/public_html/includes/system/PEAR/DB. The only thing I can think of is that it's trying to include DB/common.php rather than the full path I just specificed above. Is there a way to make it use the full path without editing the file directly?

Posted: Mon Dec 18, 2006 1:59 pm
by feyd
Your include path needs to be adjusted to include the root path of PEAR's installation directory.

set_include_path().

Posted: Mon Dec 18, 2006 2:08 pm
by aliasxneo
Is there another way to do that? As I said before, PEAR is not locally on the system it's apart of my framework located in /home/coolmail/public_html/includes/system/PEAR. Changing the include path might mess somethings up.

Posted: Mon Dec 18, 2006 2:17 pm
by feyd
Unless you want to alter the PEAR files, that's how they are engineered. You can tack the path onto the end of your paths.. e.g.

Code: Select all

set_include_path(get_include_path() . PATH_SEPARATOR . $pearPath);
...or you can alter it with .htaccess directives.

Posted: Mon Dec 18, 2006 2:37 pm
by d3ad1ysp0rk
I see content on your page.. did you fix it?

Posted: Mon Dec 18, 2006 3:13 pm
by aliasxneo
Yea, I just defined a variable named PEAR_PATH and edited mysql.php to include that path when including other files. Shouldn't hurt too much, only one line, and it works both on my computer and my system.

Anyways, thanks for all the helps guys :)