PHP on localhost
- Started
- Last post
- 3 Responses
- Mick
I've installed PHP4 on my win2K box with IIS (No lectures on using apache please ;))
Most of my scripts are working OK, but quite a few are not. I upload the same scripts to my hosting site and they work fine (hosting co. is also using PHP4).
I know this is hard to debug, but any ideas where to start?
Some errors I am getting are:
- simple form scripts are saying that form fields are empty when I submit them (works fine on my hosting site)
- Some links that are PHP generated are not working on an image gallery script I have. (also works on my hosting site)
- saski0
try setting global vars "on"
- Mick0
You're a legend :)
register_globals set to "on" did the trick.
- unfittoprint0
Due to security issues register_globals are set to off. And should remain like that.
To make every (form or others) variable work when passed to PHP you should include at the beginning:
foreach ($HTTP_POST_VARS as $key => $value) {
$$key = $value;
//echo "$key = $value";
}or
foreach ($HTTP_GET_VARS as $key => $value) {
$$key = $value;
//echo "$key = $value";
}