i have searched the forum and the internet for some explanation to this question.

i am learning PHP and PostgreSQL.

and i ma now trying to handle forms input.

i have discovered the Pear - Validation package (not sure if it is one), but the fact is that i have red the manual and the tutoria and it seems to be very helpful.

i have a SuSE 9 Pro with Apache 2 and PHP 4.3.3 installed, which according to all that i have red so far should be enough.

but when i ran the following script that i gathered from a tutorial;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Testing PEAR HTML_QuickForm</title>
</head>
<body>
<?php
require_once "HTML/QuickForm.php";

$form = new HTML_QuickForm('frmTest', 'get');
$form->addElement('header', 'MyHeader', 'Testing QuickForm');
$form->display();

?>
</body>
</html>

it does not show as it should, instead this is what i have;

Warning: main(HTML/QuickForm.php): failed to open stream: No such file or directory in /srv/www/vHost/brainpowered.net/Untitled-2.php on line 9

Fatal error: main(): Failed opening required 'HTML/QuickForm.php' (include_path='.:/usr/share/php') in /srv/www

i have searched for an anwser but so far nothing.

thank you in advance for taking the time to reply to this post.

Regards,

Nicolas

    2 months later

    Try to execute this from console as root:

    pear install HTML_QuickForm

    Maybe this can help

      i have tried the code above as root on my linux box but the command is not recogined on BASH.

      i would very much appreciate your assistance as i am trying to learn and easy and powerfull way to validate forms.

      thanks

      nicolas

        PEAR is a powerfull collection of classes but getting the initial install going can be a bit challenging.

        First off, the main site is pear.php.net.
        Lots of good stuff there.

        The reason pear is not executing it that your probably don't have a PATH set to it.
        Type "whereis pear" then try running using the full path i.e.

        /usr/local/bin/pear install HTML_Quickform

        That still may not work since you may not have permissions to write in the default pear directories. Either change permissions or try as super user. There are also pear options that let you control where the files get installed to.

        Finally, quick forms is dependent on another package called HTML_Common. You will probably need to install it as well. The install program will list dependicies.

        It can be a bit of a pain to get started but it's well worth the effort.

          i have followed the instructions above and it appears to start the installation.
          however, my linux box tries to connect to the pear.php.net server to fulfil with some task, but my box is not connected to the web.

          is there a way that i can install the pear quickform on a 'stand alone' machine?

          many thanks

          nicolas

            Only a small subset of pear is delivered with a standard php installation. You need to somehow get the HTML_QuickForm.xxx.tgz file from http://pear.php.net/package/HTML_QuickForm onto your computer.

            Then you can just
            pear install HTML_QuickForm.xxx.tgz

            Developing without a web connection could be challenging.

              Write a Reply...