Jump to content

Recommended Posts

I can not find why my pear directory is failing.  DB.php which is in the pear directory does not open.

 

I have pasted code to show the path of the server to the secondary website(see the red below for the code and the output).  The path that I can see is:  /home1/nuclearp/public_html/libs/pear/DB.php

 

Thanks to anyone who can see why I am getting my error.

 

 

 

This is the index.php

//this script reads the path and is listed in the output below:
<?php
$path = getcwd();
echo "This Is Your Absolute Path: ";
echo $path;
?>
 
<?php
require_once("includes/ru_config.php");
require_once("includes/ru_connection.php");
require_once("includes/ru_data.php");
require_once("includes/ru_utils.php");
require_once("libs/ru_multi_smarty.php");
 
$smarty->display("index.tpl");
?>
This is ru_config.php

 

<?php
//require_once(dirname(__FILE__) . 'ru_4pear.php');
ini_set("include_path", ini_get("include_path") . ":/home1/nuclearp/public_html/libs/pear/");
require_once('DB.php');
 

This is the output from www.atc-roofing.com (the index.php result)

 

This Is Your Absolute Path: /home1/nuclearp/public_html/atc-roofing.com

 

Warning: require_once(DB.php): failed to open stream: No such file or directory in /home1/nuclearp/public_html/atc-roofing.com/includes/ru_connection.php on line 4

 

Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/opt/php54/lib/php:/home1/nuclearp/public_html/libs/pear/') in /home1/nuclearp/public_html/atc-roofing.com/includes/ru_connection.phpon line 4

Edited by requinix
it was all sorts of messed up
Link to comment
https://forums.phpfreaks.com/topic/302282-connection-to-pear-lib-problem/
Share on other sites

I added the DB.php and I took the : out of the code, as you suggested, and I got the following output:

 

This Is Your Absolute Path: /home1/nuclearp/public_html/atc-roofing.com 

Warning: require_once(DB.php): failed to open stream: No such file or directory in /home1/nuclearp/public_html/atc-roofing.com/includes/ru_connection.php on line 4

Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/opt/php54/lib/php:/home1/nuclearp/public_html/libs/pear/DB.php') in /home1/nuclearp/public_html/atc-roofing.com/includes/ru_connection.php on line 4

No, don't change the include path. Just replace that one require_once you had with the one I posted. So

<?php
//require_once(dirname(__FILE__) . 'ru_4pear.php');
ini_set("include_path", ini_get("include_path") . ":/home1/nuclearp/public_html/libs/pear/");
require_once('/home1/nuclearp/public_html/libs/pear/DB.php');
The point is to see whether the file can be included successfully at all.

 

Troubleshooting this problem, I shorten it up a bit with:

require_once('/home1/nuclearp/public_html/libs/pear/DB.php');I

 

 

 

I got the following error

 

This Is Your Absolute Path: /home1/nuclearp/public_html/atc-roofing.com 

Warning: require_once(/home1/nuclearp/public_html/libs/pear/DB.php): failed to open stream: No such file or directory in /home1/nuclearp/public_html/atc-roofing.com/includes/ru_connection.php on line 6

 

Fatal error: require_once(): Failed opening required '/home1/nuclearp/public_html/libs/pear/DB.php' (include_path='.:/opt/php54/lib/php') in /home1/nuclearp/public_html/atc-roofing.com/includes/ru_connection.phpon line 6

 

 

The code I pasted in this response is on line 6.  I checked the folders and DB.php is in the correct place:  home1/nuclearp/public_html/libs/pear/DB.php  Can you see the error.  And thanks, I very much appreciate your help.

 

I figured the problem. This is an alternative domain  i.e.)  public_html/atc-roofing.com/xxx  I did not have acc-roofing.com folder included into the path.  I did put in acc-roofing/ into it but I still got the error so I took it out.  After lots and lots of studying it, and with your help in telling me that there was absolutly something wrong with the path, then I caught it.  I owe you a lot of gratitude.  Thans so much!!!  Greg

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.