Hi izzy,
You believe XAMPP version 1.6.8 was the last version that included this package(DB_Pager and Auth_HTTP). And in XAMPP 1.7.0 the pager.php and the HTTP.php files are both in xampp\php\PEAR folder and you also said that these 2 files are the new versions that have replaced the deprecated files which our friend was trying to install above.
Now, I am using XAMPP for Windows Version 1.7.1. Like you said I see the two files, pager.php and the HTTP.php in xampp\php\PEAR folder. So, should i understand that i don't need to install those packages as i am already using a new version which according to you has replaced the deprecated files in the earlier version??
Below is the code in which I am using Auth_HTTP to authenticate a user and there it has reference to
Auth/HTTP.php file and to the
Auth_HTTP function but it gives me an error with a warning which are posted below:
- Code: Select all
<?php
// Using Auth_HTTP to limit access
require_once('db_login.php');
require_once("Auth/HTTP.php");
// We use the same connection string as the pear DB functions
$AuthOpts = array('dsn' => "mysql://$db_username:$db_password@$db_host/$db_database",
'table' => "users", // your table name
'usernamecol' => "username", // the table username column
'passwordcol' => "password", // the table password column
'cryptType' => "md5" // password encryption type
);
$authenticate = new Auth_HTTP("DB", $AuthOpts);// Set the realm name
$authenticate->setRealm('Member Area');
// Authentication failed error message
$authenticate->setCancelText('<h2>Access Denied</h2>');
// Request authentication
$authenticate->start( );
// Compare username and password to stored values
if ($authenticate->getAuth( ))
{
echo "Welcome back to our site ".$authenticate->username.".";
}
?>
Warning: require_once(Auth/HTTP.php) [function.require-once]: failed to open stream: No such file or directory in D:\Program Files\xampp\htdocs\authenticate.php on line 4
Fatal error: require_once() [function.require]: Failed opening required 'Auth/HTTP.php' (include_path='.;D:\Program Files\xampp\php\pear\') in D:\Program Files\xampp\htdocs\authenticate.php on line 4
Please suggest a clue to how I can get rid of this error and get this code running.