I am trying to build a blog on GoDaddy and have the following:
a config file that looks like this (very simple):
<?php
//put full path to smart.lass.php
require('/SA/smarty/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = '/SA/smarty/templates';
$smarty->compile_dir = '/SA/smarty/templates_c';
$smarty->cache_dir = '/SA/smarty/cache';
$smarty->config_dir = '/SA/smarty/configs';
$blog_title="Sample Blog"
?>
In my SA directory on the web server, I have a smarty directory that has the most updated stable file downloads and a php directory that is the most up to date php install i could find.
The problem is my index file looks something like this:
<?php
// example of auth_http the also returns additional information about the user
require_once('config.php');
require_once('db_login.php');
require_once('Auth/HTTP.php');
//we use the same connection string as the pear db functions
$AuthOptions = array(
'dsn'=>"mysql://$user:$pass@$host/$db",
'table'=>"users",// your table name
'usernamecol' =>"username", //the table username column
'passwordcol' =>"password",//the table password column
'crypttype'=>"md5", //password encryption type in your db
'db_fields'=>"*"//enabling fetch for other db columns
);
$authenticate = new use_authentication("db", $AuthOptions);
//set the realm name
$authenticate->setRealm('Member Area');
//authentication failed error message
$authenticate->setCancelText('<h2>Access Denied</h2>');
//require authentication
$authenticate->start();
//compare username and password to stored values
if ($authenticate->getAuth()){
session_start();
$smarty->assign('blog_title',$blog_title);
$smarty->display('header.tpl');
//setup session variable
$SESSION['username']=$authenticate->username;
$SESSION['first_name']=$authenticate->getAuthData('first_name');
$SESSION['last_name']=$authenticate->getAuthData('last_name');
$SESSION['user_id']=$authenticate->getAuthData('user_id');
echo "Login successful. Great to see you ";
echo $authenticate->getAuthData('first_name');
echo " ";
echo $authenticate->getAuthData('last_name').".<br />";
$smarty->display('footer.tpl');
}
?>
It's bombing on the " require_once('Auth/HTTP.php');" on line 5 and I do not understand where to look to find the 'http.php' file or whether I've screwed my directory structure up.
Any responses are appreciated. Thanks in advance.