ngreenwood6 Posted August 2, 2008 Share Posted August 2, 2008 I am using the newest version of wamp (http://www.wampserver.com/en) on my windows xp machine. I am using a login script made at (http://phpeasystep.com/workshopview.php?id=6). I am not able to get it to work on my machine. I have signed up for free web hosting and it works fine on the free hosting server with the same files. The problem is that when I go to a page on my local server that should require login it is not requiring it, but on the server it does. Is there a setting in wamp that you have to set for it to initialize something? Any help is appreciated. Link to comment https://forums.phpfreaks.com/topic/117794-solved-wamp-in-windows/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 2, 2008 Share Posted August 2, 2008 That code is using old depreciated session functions (that were turned off in php4.2 in the year 2002 when register_globals were turned off.) Link to comment https://forums.phpfreaks.com/topic/117794-solved-wamp-in-windows/#findComment-605856 Share on other sites More sharing options...
ngreenwood6 Posted August 2, 2008 Author Share Posted August 2, 2008 I just tried enabling register globals under the php settings. However, this still did not make a difference. Is there anything else to check for? Also, is there an better login script to use. I like the fact that it only has one file that has the actual data in it (checklogin.php) and I can just add: <? session_start(); if(!session_is_registered(myusername)){ header("location:main_login.php"); } ?> to the pages that i want secured. Do you know of anything like this? Link to comment https://forums.phpfreaks.com/topic/117794-solved-wamp-in-windows/#findComment-605865 Share on other sites More sharing options...
PFMaBiSmAd Posted August 2, 2008 Share Posted August 2, 2008 Register_globals have been completely removed in upcoming php6, so it is necessary to either fix your code to work with out the depreciated functions or to find or make a different script. The problem with register_globals is they allow session variables to be set by simply putting a GET parameter on the end of the URL, so a hacker could log into your script by putting ?myusername=somevalue onto the url. For the present time, you could turn register_globals on while you are correcting the script. Did you check using a phpinfo() statement that they actually were turned on? You must stop and start your web server to get any changes made to php.ini to take effect. Also, add the following two lines immediately after your first opening <?php tag, because even with register_globals on, you might be having session problems - ini_set ("display_errors", "1"); error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/117794-solved-wamp-in-windows/#findComment-605869 Share on other sites More sharing options...
ngreenwood6 Posted August 2, 2008 Author Share Posted August 2, 2008 I checked it in php info and it says register globals is on. I also tried adding the code you told me and i still get nothing. Any other suggestions? Link to comment https://forums.phpfreaks.com/topic/117794-solved-wamp-in-windows/#findComment-605897 Share on other sites More sharing options...
PFMaBiSmAd Posted August 2, 2008 Share Posted August 2, 2008 Some of the code is using short open tags <? Either check what the phpinfo() short_open_tag value is or change any <? to <?php Beyond this, you would need to post your actual code for someone to see what php configuration specific things it is doing. Link to comment https://forums.phpfreaks.com/topic/117794-solved-wamp-in-windows/#findComment-605899 Share on other sites More sharing options...
JasonLewis Posted August 2, 2008 Share Posted August 2, 2008 Here are some tutorials from Pixel2Life that may be of some use to you: http://www.pixel2life.com/tutorials/count/61193/php_simple_membership_system/ http://www.pixel2life.com/tutorials/count/58759/creating_a_user_login_and_registration_system/ http://www.pixel2life.com/tutorials/count/56803/simple_member_login_script/ Link to comment https://forums.phpfreaks.com/topic/117794-solved-wamp-in-windows/#findComment-605900 Share on other sites More sharing options...
ngreenwood6 Posted August 2, 2008 Author Share Posted August 2, 2008 The short open tags did it. Thanks. Also thanks for the links to some other tutorials. Link to comment https://forums.phpfreaks.com/topic/117794-solved-wamp-in-windows/#findComment-606197 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.