I am installing an OSCommerce contribution that requires a PEAR module installed. I've never used or installed a PEAR module, so I am new to the whole deal. I am getting an error (below) that I have been told is due to PEAR not being installed on the server, which the ISP (Lunarpages) assures me it is installed.
Is there any way to easily verify that the server does have a functioning PEAR configuration?
Thanks for any suggestions or tips, they are greatly appreciated.
The Error:
Warning: main(): open_basedir restriction in effect. File(/usr/lib/php/PEAR.php) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/nfs/home:/usr/home:/usr/local/bin/') in /home/onest4/public_html/pear/Services/PayPal.php on line 11
Warning: main(PEAR.php): failed to open stream: Operation not permitted in /home/onest4/public_html/pear/Services/PayPal.php on line 11
Fatal error: main(): Failed opening required 'PEAR.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/onest4/public_html/pear/') in /home/onest4/public_html/pear/Services/PayPal.php on line 11
PEAR Help PLEASE
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
That's possible, if for no other reason than the path to your subdomain may not be resolving correctly. Take a look at the full server path to our main site and the full path to your subdomain. See how they relate to the location of the PEAR modules. That might be part of the problem as well. But really it looks like a permissions thing.
Alright, I heard back from lunar and here's the information that they gave me....
**********************
If you want other PEAR libraries such as SOAP, you will need to add them to your own space yourself.
On our hosting servers, you do not have access to shell. You will need to use FTP to upload the files to your own hosting space.
To install PEAR modules:
1. Download what you need from http://pear.php.net Some packages may depend on others so you may need more than one file.
2. Extract the files.
3. Create a new folder under you account root folder called “pear” (on the
same level as public_html)
4. Upload all files under the pear folder.
5. Create php.ini under public_html with the line:
include_path = .:/usr/local/lib/php:/home/username/pear (change username to
your cpanel username)
6. Add a line to .htaccess:
suPHP_ConfigPath /home/username/public_html (change username to your cpanel username)
To use a PEAR library in an application you would add the following line:
require_once 'packagename.php' or require_once
'packagesubfolder/packagename.php'
Remember, our servers are case-sensitive. You must use the exact names.
To use a PEAR file that is already installed on the server, either skip to step 5 or add the path to pear (/usr/local/lib/php) into your file.
**********************
I've done all of the steps, but when I create a "php.ini" file with that line, I get a "register_globals needs to be enabled" error. Am I to literally create a php.ini file with just that line in it?
When I go without the "php.ini" file, I get this new error:
**********************
Warning: paypal_init(Services/PayPal.php): failed to open stream: No such file or directory in /home/***edit****/public_html/includes/modules/payment/paypal_wpp.php on line 303
Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/***edit****/public_html/includes/modules/payment/paypal_wpp.php on line 303
**********************
I appreciate the help and I'm sorry to keep coming back with 101 questions, but..... any suggestions? I know there's a path that is not synching right, but I can't put a finger on it.
**********************
If you want other PEAR libraries such as SOAP, you will need to add them to your own space yourself.
On our hosting servers, you do not have access to shell. You will need to use FTP to upload the files to your own hosting space.
To install PEAR modules:
1. Download what you need from http://pear.php.net Some packages may depend on others so you may need more than one file.
2. Extract the files.
3. Create a new folder under you account root folder called “pear” (on the
same level as public_html)
4. Upload all files under the pear folder.
5. Create php.ini under public_html with the line:
include_path = .:/usr/local/lib/php:/home/username/pear (change username to
your cpanel username)
6. Add a line to .htaccess:
suPHP_ConfigPath /home/username/public_html (change username to your cpanel username)
To use a PEAR library in an application you would add the following line:
require_once 'packagename.php' or require_once
'packagesubfolder/packagename.php'
Remember, our servers are case-sensitive. You must use the exact names.
To use a PEAR file that is already installed on the server, either skip to step 5 or add the path to pear (/usr/local/lib/php) into your file.
**********************
I've done all of the steps, but when I create a "php.ini" file with that line, I get a "register_globals needs to be enabled" error. Am I to literally create a php.ini file with just that line in it?
When I go without the "php.ini" file, I get this new error:
**********************
Warning: paypal_init(Services/PayPal.php): failed to open stream: No such file or directory in /home/***edit****/public_html/includes/modules/payment/paypal_wpp.php on line 303
Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/***edit****/public_html/includes/modules/payment/paypal_wpp.php on line 303
**********************
I appreciate the help and I'm sorry to keep coming back with 101 questions, but..... any suggestions? I know there's a path that is not synching right, but I can't put a finger on it.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Man, that seems like a lot of work to get a PEAR module installed. I think you can upload the necessary libraries to your web space and include them in your app. You might need to adjust the way you call your objects and methods. But having to go through all of that seems way over the top. Your host should have handled this for you.
Yeah, that's how I feel about it. Here's the latest error after going step by step with Lunar Help....
************
Warning: paypal_init(Services/PayPal.php): failed to open stream: No such file or directory in /home/*****/public_html/includes/modules/payment/paypal_wpp.php on line 303
Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/****/public_html/includes/modules/payment/paypal_wpp.php on line 303
***********
The line referenced in the error (303) is as follows:
require_once ('Services/PayPal.php');
I've tried various paths in the above line which tends to either bring the previous error or this new one. Lunar Help is not .....yet.
Thanks for your help!
************
Warning: paypal_init(Services/PayPal.php): failed to open stream: No such file or directory in /home/*****/public_html/includes/modules/payment/paypal_wpp.php on line 303
Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/****/public_html/includes/modules/payment/paypal_wpp.php on line 303
***********
The line referenced in the error (303) is as follows:
require_once ('Services/PayPal.php');
I've tried various paths in the above line which tends to either bring the previous error or this new one. Lunar Help is not .....yet.
Thanks for your help!
-
worldwidegage
- Forum Newbie
- Posts: 1
- Joined: Thu Mar 23, 2006 8:57 pm
Did you ever figure this out?
I'm having the same problem on a lunarpages server. As a test, I set osCommerce up on another lunarpages hosted site (without SSL) and it works fine.
Thanks
Thanks