PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Path problem on shared hosting

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PEAR Forum Forum Index -> General PEAR questions
View previous topic :: View next topic  
Author Message
dedurus



Joined: 25 Feb 2008
Posts: 2

PostPosted: Mon Feb 25, 2008 7:57 pm    Post subject: Path problem on shared hosting Reply with quote

Hi

I'm new in PEAR, so my question might look stupid.
Anyway, here it is.

I've installed the newest PEAR using go-pear on shared hosting, installed additional packages (like QuickForm, etc), and when i try to access the php file that includes PEAR QuickForm, got the following error/warning:

Quote:
Warning: main(HTML/QuickForm.php) [function.main]: failed to open stream: No such file or directory in /home/myhost/public_html/pear/drop.php on line 6

Warning: main(HTML/QuickForm.php) [function.main]: failed to open stream: No such file or directory in /home/myhost/public_html/pear/drop.php on line 6

Warning: main() [function.include]: Failed opening 'HTML/QuickForm.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myhost/public_html/pear/drop.php on line 6

Fatal error: Cannot instantiate non-existent class: html_quickform in /home/myhost/public_html/pear/drop.php on line 8


And line 6 is:
Code:
include "HTML/QuickForm.php";


The problem is that on local XAMPP server, the same script works fine, but not on shared hosting.
There's already installed PEAR on that shared hosting, but also I cannot find a way to include it in my script.
I guess it's an include path problem, but, hey i'm newbie Smile.

So my questions are:
1. Should i make some configuration tweaking so the PEAR is properly included in the script?
2. (This one is extremely stupid Embarassed )
In which folder should I upload the script? In root-getting the same error, inside the PEAR installation folder-same error...

My sharebox PEAR configuration informations:
PEAR directory: /home/myhost/public_html/pear/PEAR
PEAR configuration file directory:/usr/local/lib/php/cfg
etc.

Anyone can help?
Thanks in advance.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Mon Feb 25, 2008 11:24 pm    Post subject: Re: Path problem on shared hosting Reply with quote

dedurus wrote:
PEAR directory: /home/myhost/public_html/pear/PEAR


This directory needs to be added to the include_path, e.g.:
include_path = '.:/home/myhost/public_html/pear/PEAR:/usr/lib/php:/usr/local/lib/php'

You could do this either in php.ini (but I guess that you don't have access to it), in a .htaccess file or via the set_include_path() function.
Back to top
View user's profile Send private message
dedurus



Joined: 25 Feb 2008
Posts: 2

PostPosted: Tue Feb 26, 2008 3:18 am    Post subject: Reply with quote

Thanks mark for your prompt reply.
Changed the code, and it's working now.

This is what made the 'motor' running:

Code:
set_include_path('.:/home/myhost/public_html/pear/PEAR:/usr/lib/php:/usr/local/lib/php' . PATH_SEPARATOR
                 . get_include_path());


Thanks again.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Tue Feb 26, 2008 11:00 am    Post subject: Reply with quote

Don't you duplicate the path now? get_include_path() should return '.:/usr/lib/php:/usr/local/lib/php', doesn't it? That's not really a problem but I'd consider removing this part from the first string.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PEAR Forum Forum Index -> General PEAR questions All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement