Click to See Complete Forum and Search --> : PHP anyone? A slight problem


pyro
01-09-2003, 02:31 AM
Originally posted by jpmoriarty
firstly, any chance of a php section to this site? I'm just getting into it and it looks quite fun, but am fairly sure that i'll be lost with out a source of help!Head over to www.phpbuilder.com. There is a huge PHP forums over there. over 35,000 registerd users, I believe. ;)

jpmoriarty
01-09-2003, 03:26 AM
dear all,

firstly, any chance of a php section to this site? I'm just getting into it and it looks quite fun, but am fairly sure that i'll be lost with out a source of help!

Secondly, I'm trying to set up PHP to work with IIS. So far I've got it so that it does work (sort of) in that if I have a blank php file with just the phpinfo() in it then i get the big display that shows me it's all fine. However, when i run one of the scripts that used to run on my apache server, i get a load of errors. It's a simple HTML form that posts (i think) to a php file, and the php does a bit of calculating and displays the answer - nothing too complex at all. The HTML sections of it work, but i keep getting Warning: variable undefined messages about all the variables that are supposed to be coming from the HTML form.

I have a sneaky suspicion that it's probably something to do with permissions on various folders, but could be way off the mark. Anyone have any ideas? (and if it is as i suggest, can someone explain in the most simple terms what I have to do to correct it!!?? I've tried adding execute permissions and all sorts, but am not too sure that it's done properly or safely).

I'm running win XP pro, iis 5.1, and the latest version of PHP.

many many thanks in advance.

Rick Bull
01-09-2003, 05:54 AM
I would image it's because PHP has globals off, which means you can't refer to form elements like $name, instead you have to use $_GET['name'] (for 'get' forms), $_POST['name'] (for 'post' forms) or $_REQUEST['name'] (for either 'get' or 'post' if you're not bothered).

jpmoriarty
01-09-2003, 06:08 AM
ahhh... is that the "register_globals" bit in the ini file? If so i'll try tweaking that when i get back home.

Many thanks

swon
01-09-2003, 11:15 AM
Set register_globals = On in your php.ini file, then it should works fine ;-)