There is a difference in the default way php installs between 4.1.x and 4.2... the newer version comes with register_globals Off in the php.ini file. Simple solution, change this value to On in your php.ini file, and restart.
However, you scripts will be a lot more secure if you leave register_globals Off, and adapt your PHP scripts to suit the new methods using $_GET, $_POST, $_SESSION, $_COOKIES, etc etc. If you passed $id around in a URL before, then the new system would require you to refer to $id as $_GET['id']. So if you put this at the top of your script, everything should work: $id = $_GET['id']; There's a whole page dedicated to migrating from php4.1.x to php 4.2, which includes information on this new system. FWIW, it's also been discussed on the list MANY times... just do a search for "register_globals" in the archives. this should give you some more info: http://www.php.net/manual/en/reserved.variables.php#reserved.variables.serve r on 13/06/02 1:53 PM, Vegitas Pride ([EMAIL PROTECTED]) wrote: > I've had many troubles with my php, now I'm a beginner > when it comes to php. I had installed Apache 1.3.2, > and was trying to run simple php4. You know with > index.php?id=yourpage with the code on the page being > <?php include ("$id.html"); ?> See what happened is my > hard-drive crashed and I lost all my programs ect. I > managed to save my code for Apache, but with no luck > am able to use php like I want again. I installed php > 4.2.0 I believe, and well I was looking and with my > old httpd.conf, I used a php4 ScriptAlias, well it > pointed to some wierd place that I don't recall > installing. Is there a different php.exe for php4? Do > you understand, I think I'm in the dark here, and I > just need to know what I'm doing wrong. Thanks. > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php