Jump to content

PEAE path problem


russia5

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.