 |
|
|
View previous topic :: View next topic |
Author |
Message |
dedurus
Joined: 25 Feb 2008 Posts: 2
|
Posted: Mon Feb 25, 2008 7:57 pm Post subject: Path problem on shared hosting |
|
|
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 .
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 )
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1235
|
Posted: Mon Feb 25, 2008 11:24 pm Post subject: Re: Path problem on shared hosting |
|
|
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 |
|
 |
dedurus
Joined: 25 Feb 2008 Posts: 2
|
Posted: Tue Feb 26, 2008 3:18 am Post subject: |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1235
|
Posted: Tue Feb 26, 2008 11:00 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|