We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Variables not passed when page changesRSS

2 replies

Last post Aug 22, 2008 02:21 PM by TimmHenson

  • Variables not passed when page changes

    Aug 22, 2008 12:14 PM|TimmHenson|LINK

    i'm running IIS 6 on 2003 server with php 5.2.6 and MySQL 5

    at first i thought it was just not creating sessions, but i can see that it is creating sessions for phpmyadmin just fine. Thats about the only thing that works good in fact, every problem i have is not being had by the phpadmin mysql administration scripts.

    in my own code, most cookies are not all being created, only one, a cookie with an IP address:
    setcookie("ipcook", $_SERVER['REMOTE_ADDR'], time()+ 2*3600);

    just a note: before i changed my method, i was using $REMOTE_ADDR and it would not work

    cookies that have other values are not created at all:
    setcookie("groupc", 1, time()+2*3600);

    i am unable to use links that call variables to switch pages and forms do not submit data (to or from the database) or read cookie or session data or read variables in the url, rendering any searches i've written useless and all authentication broken. now all of the scripts i am using  and have written work fine everywhere else. most of them are on my own homepage, and others are from my local IIS 5 on XP, PHP 5.2.3 & MySQL 5. on that server everything works perfectly.

    i have tried reinstalling PHP, MySQL, and IIS, ive checked my IIS Permissions more than a few times (which im more confused at permissions now than i was before), and ive tried to make every setting and every feature identical to the previous functional server.

    what i'm wondering now is, were there some changes in the way that IIS 6 handles php code that i don't know about or did i wake up a couple days ago and forget everything i ever knew.

  • Re: Variables not passed when page changes

    Aug 22, 2008 01:51 PM|ma_khan|LINK

     Did you try to run your App in IIS 5 Isolation mode on windows server 2003 and check if your it is functional then??


  • Re: Variables not passed when page changes

    Aug 22, 2008 02:21 PM|TimmHenson|LINK

    i didnt run it on the IIS 5 on the 2k3 server... since it installed IIS 6 automatically when i asked for IIS, i just decided to use that figuring "how different can it be?" but as i was waiting for this response i did start my php.ini over again, basically pulling a new one from the php 5.2.6 zip file and then re-setting all the variables to what i wanted them to be. i compared the current one on the server and i found that the value for 'register globals' was set wrong

    "register_globals = O"

    not 0 or Off... no.. it was set to the letter O..
    i think i meant to set it to On and i went a bit too fast.
    making sure that register globals was on seemed to have fix the problems entirely. i think this tells me that my code is a bit shabby since the actual note around register_globals says they are going to try and faze it out due to security issues.

     thanks for your help ma_khan.