running HTML_QuickForm2 without PEAR

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
thatsme
Forum Commoner
Posts: 87
Joined: Sat Apr 07, 2007 2:18 am

running HTML_QuickForm2 without PEAR

Post by thatsme »

Hello,

I downloaded HTML_QuickForm2 from http://pear.php.net. It is inside, C:/wamp/www/mysite/
When i try to include it using, require_once('HTML/QuickForm2.php');, i am getting fatal error,

Failed opening required 'HTML/Common2.php' (include_path='.;C:\php5\pear').

Am i giving wrong path?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: running HTML_QuickForm2 without PEAR

Post by Christopher »

Do you have 'HTML/Common2.php' in the same directory as Quickform2.php ?
(#10850)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: running HTML_QuickForm2 without PEAR

Post by Weirdan »

For a PEAR package to run you need to provide it with all the dependencies (you can see them listed in package.xml)
thatsme
Forum Commoner
Posts: 87
Joined: Sat Apr 07, 2007 2:18 am

Re: running HTML_QuickForm2 without PEAR

Post by thatsme »

No. I am not having those dependencies files.
I tried to install PEAR through Go-PEAR Installer. I am getting a message, Installation Completed!. There is a link in Go-PEAR Installer, Start Web Frontend of the PEAR Installer >>. It points to http://localhost/index.php. If i click on the link,

i am getting the below message,
Warning: Can not find config file, please specify the $pear_user_config variable in /index.php
Error: the template directory (C:\php5\pear\data\PEAR_Frontend_Web\data\templates) is not a directory, or not readable. Make sure the 'data_dir' of your config file (C:\php5\pear\data) points to the correct location !

i think i should write a .htaccess file.
how to write .htaccess file for pointing to correct path?

Thanks
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: running HTML_QuickForm2 without PEAR

Post by Christopher »

It looks like you need to set the $pear_user_config variable in /index.php to define 'data_dir'. You should read through the PEAR manual about configuration.
(#10850)
thatsme
Forum Commoner
Posts: 87
Joined: Sat Apr 07, 2007 2:18 am

Re: running HTML_QuickForm2 without PEAR

Post by thatsme »

Its not working.

I completely unistalled wamp and downloaded wampserver 2.0 and installed in the c:\
Directory structure after installing wampserver 2.0

C:\wamp
--- alias
--- apps
--- bin
------ apache
------ mysql
------ php
--------- php5.2.5
------------ go-pear.bat // on double clicking PEAR installation started and a new PEAR folder is created here itself
---help
---lang
--- logs
--- scripts
--- tmp
--- www

Further if i wanted to install and run HTML_Quickform, where should i have to place HTML_Quickform folder
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: running HTML_QuickForm2 without PEAR

Post by Christopher »

Is anyone using PEAR on WAMP around here that might be able to help?
(#10850)
fdl333
Forum Newbie
Posts: 2
Joined: Tue Mar 25, 2008 2:15 am

$pear_user_config problem

Post by fdl333 »

Actually, the problem is really simple:
What Pear wants is that this variable in the index.php points to the actual pear configuration FILE!

just set it to:

$pear_user_config = 'C:\wamp\www\pear.conf';

(or whereever your pear.conf is) and all will be fine!


p.s. pity that it overwrites wamps index.php file!!
fdl333
Forum Newbie
Posts: 2
Joined: Tue Mar 25, 2008 2:15 am

pear et all..

Post by fdl333 »

.. what I was trying to get at in my previous post is that wamp created a very useful index.php which allowed me t do all sorts of this (sqlite databases, info, configuration, etc)..

the pear install just brutally overwrote this index.php file without so much as an "excuse me .."

what do I have to do now? reinstall wamp?
Post Reply