Re: Auth
| From: | Stefan Neufeind | Date: | Sat, 20 Mar 2004 13:41:45 +0000 |
| Subject: | Re: Auth | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11410@lists.php.net to get a copy of this message | ||
Seems you didn't really "install" the package on your server but
simply unpacked it? This is not the recommended way. See the docs on
the possibilities available for installing pear-packages
(http://pear.php.net/manual/en/).
However, if you really want to try make it working with the unpacked
version, include "Auth-1.2.3/" in your include-path.
Good luck,
Stefan
On 20 Mar 2004 at 13:47, Frederic SOSSON wrote:
> I am just trying to authenticate users with Pear Auth-1.2.3.
>
> My code is this one:
>
> => require_once "Auth-1.2.3/Auth.php";
> =>
> => function loginFunction() {
> => echo "<FORM METHOD=POST action=\"" .
> $_SERVER['PHP_SELF'] . "?login=1\">";
> => echo "<TABLE ALIGN='center' cellspacing='1'
> cellpadding='0'>";
> => echo "<TR>";
> => echo "<TD CLASS='texte'>User name:</TD>";
> => echo "<TD><INPUT TYPE='text'
> NAME='username'></TD>";
> => echo "</TR>";
> => echo "<TR>";
> => echo "<TD CLASS='texte'>Password:</TD>";
> => echo "<TD><INPUT TYPE='password'
> NAME='password'></TD>";
> => echo "</TR>";
> => echo "<TR>";
> => echo "<TD></TD>";
> => echo "<TD><INPUT TYPE='submit'
> CLASS='button' VALUE='Go!'></TD>";
> => echo "</TR>";
> => echo "</TABLE>";
> => echo "</FORM>";
> => }
> => $dsn = "mysql://root:azerty@localhost/news";
> => $a = new Auth("DB", $dsn, "loginFunction");
> =>
> => $a->start();
> =>
> => if ($a->getAuth()) {
> => echo "OK";
> => } else {
> => echo "Pas OK";
> => }
> => ?>
>
> and i've got this message in my browser:
>
> => Warning: _factory(Auth/Container/DB.php): failed to open stream: No such file or
> directory in /www/news/Auth-1.2.3/Auth.php on line 218
>
> => Fatal error: _factory(): Failed opening required 'Auth/Container/DB.php'
> (include_path='.:') in /www/news/Auth-1.2.3/Auth.php on line 218
>
> Any idea?