PEAR QuickForm install


#1

I admit, I’m completely a newbie. I searched this forum and found one thread about PEAR and Putty, but when trying to use the suggestions in there to install the HTML_Common package so I could then install quickform I failed.

I tried typing:
$ pear install -o HTML_Common

And got:
WARNING: “pear/HTML_Common” is deprecated in favor of "pear/H"
Cannot install, php_dir for channel “pear.php.net” is not writeable by the current user

Right, so I have no idea what to do. Help?


#2

Did you review the DreamHost wiki article on PEAR?

–rlparker


#3

No, somehow in my searching I completely missed the obvious. The wiki article answered all my questions and I’m now happily Pearing away. Thank you so much!


#4

You are most welcome, and I’m glad you are now “happily Pearing”! :slight_smile:

–rlparker


#5

Dreamhost wiki on Pear installation was great. Just having some trouble getting QuickForm.php to run properly.

Here is my code…

<? php $pear_user_config = '/home/myusername/.pearrc'; set_include_path( '.' . PATH_SEPARATOR . '/home/myusername/pear/php' . PATH_SEPARATOR . get_include_path() ); require_once ('/home/myusername/pear/php/HTML/QuickForm.php'); $form = new HTML_QuickForm(); $form->addElement('text','email','Email Address: ', array('size'=> 30, 'maxlength'=>100)); $form->addElement('text','name','Name: ', array('size'=> 30, 'maxlength'=>100)); $form->display; echo '

hello

'; It runs without errors, and I see "hello" on the screen, but no sign of a form. Can anyone provide some insight? Thanks.

#6

doh. $form->display is a function so it should be… $form->display(); with parentheses.