Re: Re[2]: [PEAR] Auth
| From: | Firman Wandayandi | Date: | Mon, 22 Mar 2004 08:03:26 +0000 |
| Subject: | Re: Re[2]: [PEAR] Auth | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11438@lists.php.net to get a copy of this message | ||
Hi Frederic,
Did you install the Auth package? or you just extract it?
Seems you did supply unavailable driver. Available drivers are:
[01] DB
[02] File
[03] IMAP
[04] LDAP
[05] MDB
[06] POP3
[07] RADIUS
[08] SMBPasswd
[09] SOAP
[10] vpopmail
You can find the available drivers in user/local/share/pear/Auth/Container
From the errors, I guess you supllied "Auth" as a driver name, I guess your
bits code might be like this:
=> $auth = new Auth('auth');
or
=> $auth = &Auth::_factory('auth');
right?
For more clearly, can you provide me a little bits code?
Feel free to ask.
Good Luck,
Firman
----- Original Message -----
From: "Frederic SOSSON" <fred_sos@swing.be>
To: "pear-general" <pear-general@lists.php.net>
Sent: Monday, March 22, 2004 12:39 AM
Subject: Re[2]: [PEAR] Auth
> Hi,
>
> I have install full Pear package and added:
>
> include_path = "/usr/local/share/pear/"
>
> (that's the path to my pear)
>
> in my php.ini
>
> But when I want to authenticate user whith
>
> => require_once "Auth/Auth.php";
>
> I've got this message:
>
> => Warning: _factory(Auth/Container/auth.php): failed to open stream: No
such file or directory in /usr/local/share/pear/Auth/Auth.php on line 189
>
> => Fatal error: _factory(): Failed opening required
'Auth/Container/auth.php' (include_path='/usr/local/share/pear/') in
/usr/local/share/pear/Auth/Auth.php on line 189
>
>
> Any idea?
>
>
> Saturday, March 20, 2004, 3:31:01 PM, you wrote:
>
> FW> Hi Frederic,
>
> FW> Stefan right, I just notice on the error
> FW> Fatal error: _factory(): Failed opening required
'Auth/Container/DB.php'
> FW> (include_path='.:') in /www/news/Auth-1.2.3/Auth.php on line 218
>
> FW> I'd bet you didn't turned On include_path directive on php.ini. Please
> FW> correct
> FW> thism, just remove semicolon at front of include_path.
>
> FW> include_path = "path/to/pear"
>
> FW> Firman
>
> FW> ----- Original Message -----
> FW> From: "Frederic SOSSON" <fred_sos@swing.be>
> FW> To: "pear-general" <pear-general@lists.php.net>
> FW> Sent: Saturday, March 20, 2004 7:47 PM
> FW> Subject: [PEAR] Auth
>
>
> >> Hi,
> >>
> >> 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
> FW> such file or directory in /www/news/Auth-1.2.3/Auth.php on line 218
> >>
> >> => Fatal error: _factory(): Failed opening required
> FW> 'Auth/Container/DB.php' (include_path='.:') in
/www/news/Auth-1.2.3/Auth.php
> FW> on line 218
> >>
> >> Any idea?
> >>
> >>
> >> Frederic
> >>
> >> --
> >> PEAR General Mailing List (http://pear.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>