AUTHENTICATION NOT WORKING IN PHP FILE

jayprakash sharma

Total Post:117

Points:821
Posted by  jayprakash sharma
PHP 
PHP
 1364  View(s)
Ratings:
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!
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: authentication not working in php file

    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!