russia5 Posted March 27, 2007 Share Posted March 27, 2007 I have a problem with an error to my PEAR path. With this code: <?php require_once(dirname(__FILE__) . '../../ru_4pear.php'); require_once('DB.php'); define("BASE_SERVER", "localhost"); define("BASE_USER", "); define("BASE_PASS", ""); define("BASE_NAME", ""); $dsn = 'mysql://' . BASE_USER . ': ' . BASE_PASS . '@' . BASE_SERVER . '/' . BASE_NAME; //$db = DB::connect($dsn, true); $db = DB::connect($dsn); if (DB::isError($db)) { die($db->getMessage()); } ?> I get this error: Warning: main(/home/russia5/public_html/member/includes../../ru_4pear.php): failed to open stream: No such file or directory in /home/russia5/public_html/member/includes/ru_connection.php on line 2 Fatal error: main(): Failed opening required '/home/russia5/public_html/member/includes../../ru_4pear.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/russia5/public_html/member/includes/ru_connection.php on line 2 When I change the path to PEAR to this: I get this: Warning: main(/home/russia5/public_html/member/includesru_4pear.php): failed to open stream: No such file or directory in /home/russia5/public_html/member/includes/ru_connection.php on line 2 Fatal error: main(): Failed opening required '/home/russia5/public_html/member/includesru_4pear.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/russia5/public_html/member/includes/ru_connection.php on line 2 The same configuration file, one directory up, with the same gallery application, works fine: <?php require_once(dirname(__FILE__) . 'ru_4pear.php'); require_once('DB.php'); define("BASE_SERVER", "localhost"); define("BASE_USER", ""); define("BASE_PASS", ""); define("BASE_NAME", ""); $dsn = 'mysql://' . BASE_USER . ': ' . BASE_PASS . '@' . BASE_SERVER . '/' . BASE_NAME; //$db = DB::connect($dsn, true); $db = DB::connect($dsn); if (DB::isError($db)) { die($db->getMessage()); } ?> Please help. Link to comment https://forums.phpfreaks.com/topic/44535-peae-path-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.