Jump to content

[SOLVED] wamp in windows


ngreenwood6

Recommended Posts

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

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?

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);

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.