[RESOLVED] A PEAR Question
I am learning PEAR. In following the tutorials the first line is "require_once 'HTML/QuickForm.php';" which in my case cant be right. The html/quickform directory is back out in the root directory under php/HTML/quickform.
If I just use the HTML/quickform line of course I get the error that the file doesnt exist and cant open it.
When I come up with an address for it such as "/home/lunar/php/HTML/QuickForm.php'" then the Quickform error goes away and I get this error
"Warning: require_once(HTML/Common.php) [function.require-once]: failed to open stream: No such file or directory in /home/lunar/php/HTML/QuickForm.php on line 33
Fatal error: require_once() [function.require]: Failed opening required 'HTML/Common.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lunar/php/HTML/QuickForm.php on line 33"
My question is, Where exactly are the HTML/quickform and common files supposed to be? I tried to include the Common file as well but that didnt do anything.
PEAR is installed through Cpanel into /home/domain/php. If this is correct, how on earth does one access PEAR with a command of "require_once 'HTML/QuickForm.php';" ?
Should I copy the php/HTML directory out of the root and into public_html?
Thanks, Im really confused on how to access or address this to get a simple form to work. The same question will probably be next with HTML_Table which of course is in the HTML directory
The simplest thing will be to add the PEAR directory to your PHP include_path setting. You can do this at the php.ini level, or the directory level via a .htaccess setting, or per script via the set_include_path function.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Thank you nogdog, Very much appreciated. I have never had to work backwards out of the public_html directory before.
Thanks again, that worked perfectly
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)