pinkychukkles Posted May 7, 2006 Share Posted May 7, 2006 [!--fonto:Arial--][span style=\"font-family:Arial\"][!--/fonto--]G'day,I'm running Win XP (SP2) & PHP Version 5.1.2I've done some extensive searching on the net, this board and others but can't find what the problem is. It must be something really simple (I hope!).I downloaded a newsbox script from [a href=\"http://www.squidfingers.com\" target=\"_blank\"]squidfingers.com[/a], installed it on the root directory for a website I'm designing on my own machine but I get the following error whilst running the install.php script:[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Notice: Undefined index: SESSION_USER in C:\Documents and Settings\Pinky\My Documents\TipTop3.0\admin\install.php on line 7Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\Pinky\My Documents\TipTop3.0\admin\install.php:7) in C:\Documents and Settings\Pinky\My Documents\TipTop3.0\admin\install.php on line 8[/quote]The code is refers to from the install.php script is [code]require_once ("../includes/configure.php");session_start ();if ($_SESSION["SESSION_USER"] != $config["admin_username"]) { header ("Location: index.php"); exit;}require_once ("../includes/admin.php");require_once ("../includes/connect.php");[/code]but there is also some script on the admin.php file where it authenticates the user, that code is [code]// ----------------------------------------------------------------------// Authenticate Userfunction admin_login () { global $config; session_start (); if (empty ($_SESSION["SESSION_USER"])) { $username = $_REQUEST["username"]; $password = $_REQUEST["password"]; if ($username != $config["admin_username"] || $password != $config["admin_password"]) { print_admin_header (); print_admin_login ((empty ($username) && empty ($password)) ? "Please Login." : "Incorrect Username or Password."); print_admin_footer (); exit; } else { $_SESSION["SESSION_USER"] = $config["admin_username"]; } }}[/code]Someone on another website where I went to for advice, suggested it could be because my register_globals was set to ON in the ini.php file but that's not the case as it's defaulted to OFF. I'm wondering whether it could just be a setting on my localhost.Any help much appreciated.Thanks,pinky[!--fontc--][/span][!--/fontc--] Quote Link to comment Share on other sites More sharing options...
pinkychukkles Posted May 9, 2006 Author Share Posted May 9, 2006 [!--fonto:Arial--][span style=\"font-family:Arial\"][!--/fonto--]Now I [i]think[/i] I've got it almost licked, after feeling like I've been bashing my head against a php wall for the past few days. It's something probably to do with the settings in my php.ini file, with sessions and possibly a bit of permission problems thrown in. Basically my flatmate who runs Win2k & php4.3.1 had it working first time on his pc, so I un-installed php5.1.2 on my pc and installed the older version, grabbed a copy of his php.ini file et voilá! I got the admin login screen...but now I can't connect to my database but suspect that again that could be down to some settings in the php.ini file to do with MySQL but hoping to nail that tonight.If this smacks of a total common problem with a simple setting within php.ini or I've totally missed the point, please let me know! Thanks.[!--fontc--][/span][!--/fontc--] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.