Hi Andrew,

This error indicates that your path to class.Htpasswd.php3 is wrong.
use this:
include("path/to/class.Htpasswd.php3");

Right now, it's set to look in the php/includes dir.  If the file is
actually in there, then apache might not have perms to read the file (IE:
it's owned by root).

Good luck,
Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

----- Original Message -----
From: "Andrew Schoenherr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 13, 2002 12:54 AM
Subject: [PHP] Error accessing class


> Hello,
>
> PHP Version: 4.1.0, Apache Version: 1.3.12, Server: Linux 7.0
> Class name: class.Htpasswd.php3
>
> Thanks to Jason Wong for pointers on posting to the list, the parse
> error was a simple omission of a quotation mark on my part.
>
> This is the error I am getting...
>
> Warning: Failed opening 'class.Htpasswd.php3' for inclusion
> (include_path='.:/php/includes') in /var/www/html/php/dev/valid_user.php
> on line 9
>
> Fatal error: Cannot instantiate non-existent class: htpasswd in
> /var/www/html/php/dev/valid_user.php on line 10
>
> 7 <body>
> 8  <?php
> 9   include("class.Htpasswd.php3");
> 10  $aHTPasswd = new Htpasswd("/var/www/html/private/.htpassd");
> 11  if (!$aHTPasswd->EXISTS)
> 12   {
> 13     print("authentication error<br>);
> 14   }
> 15   else
> 16   {
> 17    if ( $aHTPasswd->verifyUser( "phpbook", "phpbook" ) )
> 18    {
> 19      print( "phpbook is a valid user<br>" );
> 20    }
> 21    else
> 22    {
> 23      print( "phpbook is not a valid user<br>" );
> 24    }
> 25  }
> 26 ?>
> 27 </body>
> 28 </html>
>
> Any ideas on the error?
>
> Thank you,
>
> Regards,
>
> Andrew Schoenherr
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to