|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
authentication script problems
Hi,
I'm a php newbie trying to setup a user authentication a script that I downloaded from http://www.bgdev.goto.bg/bgdev_login.php and I'm having some problems with the admin section. There's not much in the way of support on the site in question so I just wondered if anyone would mind helping me out here. When I try to view the admin page I get this error message 'error 500: Internal Server Error with admin script'. I get the same error message when I try to access any file in the admin directory called 'loginadmin'. Any directories above this directory level, ie the main user authentication scripts, are fine. The full admin code looks like this: index.php PHP Code:
login.php PHP Code:
users_db.php PHP Code:
messages_db.php PHP Code:
Can anyone see any likely reason why the server is having problems with this set of scripts. I've already spoken to my ISP and they can't see anything wrong. I'm just wondering if it might be something to do with my php.ini file but I'm just guessing really as I'm quite new to this level of scripting. I havn't really used 'header' files before either so I wouldn't have a clue where to start debugging. Any help greatly appreciated. Thanks! |
|
#2
|
|||
|
|||
|
Use these
Try to use these files i think this will work but you have to create a form with 2 fields named
username password Thanks |
|
#3
|
|||
|
|||
|
Thanks, I'll give them a try
![]() I've tracked the above problem to the following lines in the 'login.php' script: if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $LOGIN) && ( $PHP_AUTH_PW == "$PASSWORD" )) ) { header("WWW-Authenticate: Basic entrer=\"Form2txt admin\""); header("HTTP/1.0 401 Unauthorized"); error("&"); If I delete this I can access the admin pages and they work. I'm not sure why tho. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > authentication script problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|