The include path in the error message should reflect the same string in the php.ini file. Have you been restarting the Apache webserver after making modifications to the php.ini config?

    Yes I 've.So far this is what i 've done. I double checked for white spaces and output before the header in order to avoid the header() errors and output the header first before any output. I 've used an ob_start(); function in my code for those specific errors. Now am getting this error message in my browser;

    Fatal error: Class 'Auth_HTTP' not found in C:\xampp\htdocs\OReilly\pear\blog\login.php on line 23

    I just don't understand what could be wrong this time around. I certainly do 've the Auth/HTTP file.Why is it bringing this error?

      Does the include_path in the error message reflect the same value that you've given it in your php.ini file? If so, is your PEAR directory listed in that PHP directive?

      loooooooper wrote:

      I 've used an ob_start(); function in my code for those specific errors.

      Get rid of it - ob_start() isn't a fix for this problem, it's a cheap workaround that just sweeps the problem under the rug.

        My PEAR directory is listed in the php directive, the same path that is also included in the 'php.ini' file. The error message i receive does reflect the same value in the .ini file.

        Now my issue is I don't know where to place the smarty template file within the login script because its the cause of all these errors,If i remove it, then a blank page is what i see in the browser still with no login authentication message. If I remove the smart->display ('header')('footer')[which is the output before the default headers()], nothing displays[even after placing it after the header functions] I 've tried to include it in other areas of the file but i get the same error msg.Could someone help me with a correct code snippet. My two scripts (login.php, config.php) 're above.Thank you!

        I 've also removed the ob_start() function and saved the file as an ANSI and this is the current error message;

        Fatal error: Class 'Auth_HTTP' not found in C:\xampp\htdocs\OReilly\pear\blog\login.php on line 23

        I don't understand it cause it already 've Auth and Auth_HTTP installed in pear.

          Are you still getting the error message about failing to open 'Auth/HTTP.php' ? You are still require()'ing that file before line 23, correct?

            Can you re-post an exact copy of all of the errors you are currently receiving?

              This is my current authentication page (login.php)

              <?php
              	#Auth_HTTP returns additional information about the user
              	//include login details
              	require_once('db_login.php');
              
              //include authentication page
              require_once('Auth/HTTP.php');
              
              //include header templates page
              require_once('config.php');
              
              // We use the same connection string as the pear DB functions
              $AuthOptions = array(
              						'dsn' =>"mysql://$db_username:$db_password@$db_hostname/$db_database",
              						'table' => "users",//table name
              						'uernamecol' => "username", //table username column
              						'password' => "password", //table password column
              						'crypttype' => "MD5", //password encryption type in db
              						'db_fields' =>"*" //enabling fetch for other db columns
              					);
              $authenticate = new Auth_HTTP("DB", $AuthOptions);
              
              // 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( )) 
              	{
              		$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');
              	}	
              ?>
              

              And this is my smarty template page (config. php). It's included in the login.php page as require_once('config.php');

              <?php
              	// put full path to Smarty.class.php
              	require('c:\xampp\smarty\libs\Smarty.class.php');
              
              $smarty = new Smarty();
              
              $smarty->template_dir = 'C:/xampp/htdocs/Smarty/templates';
              $smarty->config_dir = 'C:/xampp/htdocs/Smarty/configs';
              $smarty->cache_dir = 'C:/xampp/Smarty/cache';
              $smarty->compile_dir = 'C:/xampp/Smarty/templates_c';
              
              $smarty->assign('blog_title','Coffee Talk Blog');
              $smarty->assign('index','Developer Programme');
              $smarty->assign('loop','Enter into Forums');
              $smarty->assign('date',12,3,2011);
              $smarty->display('header.tpl');
              $smarty->display('footer.tpl');
              ?>
              Now this is the current error message:
              Fatal error: Class 'Auth_HTTP' not found in C:\xampp\htdocs\OReilly\pear\blog\login.php on line 23
              
              Hope this clarifies your question.
              

                Shouldn't the include_path line in the php.ini be ...

                include_path = ".;C:\xampp\php\PEAR\;C:\xampp\Smarty\libs"

                ... rather than ...

                include_path = ".;\xampp\php\PEAR\;C:\xampp\Smarty\libs"

                  It doesn't change anything, it's still the same path that's recognized for the PEAR directory. Anyways, i 've changed it,(included the 'C') and nothings changed.

                    Just checking ... I assume you are restarting apache after every change to ini file.

                    Also, maybe try dropping the trailing slash ...

                    include_path = ".;C:\xampp\php\PEAR;C:\xampp\Smarty\libs"

                      Write a Reply...