Home > DeveloperSection > Forums > authentication not working in php file
jayprakash sharma
jayprakash sharma

Total Post:117

Points:821
Posted on    May-02-2013 3:21 AM

 PHP PHP 
Ratings:


 1 Reply(s)
 1086  View(s)
Rate this:
Hi Everyone!

I have a login system, which redirect user to his workplace after login and i have set the logout button and to clear session i have done this:

This code check for session, which is created after login:

this code in included in workplace area after login.

UPDATE 2:

 <?php
require_once($_SERVER['DOCUMENT_ROOT'].'/ModelBase/connect/auth.php');
 ?>
but after login ; i get this error when i upload it to host:

Re-UPDATE 2: Error after updating require_once statement again:

Fatal error: require_once() [function.require]: Failed opening required '/data/19/1/86/59/1901711/user/2069354/htdocs/xxxxxx/connect/auth.php' (include_path='.:/usr/services/vux/lib/php') in /data/19/1/86/59/1901711/user/2069354/htdocs/xxxxx/xxxxx/xxx/index.php on line 2 
Found the solution myself.. Thanks everyone anyways..

just was missing 1 part of path folder and that fixed up all..

NOTE: When i use this same process over localhost it never shows any error. what should i do ?

Any help would be amazing thank you!


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    May-02-2013 8:15 AM

Hi Jayprakash!

you have error in include file path

try as following

require_once($_SERVER['DOCUMENT_ROOT'].'/ModelBase/connect/auth.php');

I hope it resolve your problem

Don't want to miss updates? Please click the below button!

Follow MindStick