Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: PHP...not reading url variables...

  1. #1
    Maximum Bitrate PoBoy's Avatar
    Join Date
    Jun 2001
    Location
    St. Louis-MO
    Posts
    490

    PHP...not reading url variables...

    For some reason when I pass variables from an HTML form, the next PHP page doesnt get them. The next page has them listed in the URL, but I get "undefined variable" errors. BUT ITS RIGHT THERE IN THE URL!!

    I have it all working at my office, but I came home and tried setting up IIS and PHP...and I get that problem. So I installed Apache...SAME PROBLEM!

    Any ideas??

    PoBoy
    I'm a ghost...email me if you have any questions on my old setup

    My way outdated website: http://www.poboytech.net

    FYI: I sold my 96 4Runner and bought a 1985

  2. #2
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436

    Re: PHP...not reading url variables...

    what version of PHP are u using? version 4.2.2 has quite a few changes with the way form/querystring elements are created.... by default NO $vars are created automatically by passed formelements/etc..... im guessing this is your problem.... it would make sense... you have PHP < 4.2.1 at work so auto variable creation is enabled..... but you downloaded the 'latest' 4.2.2/.3 at home and are having this problem....

    and with very good reason.... its a huge security risk when you think about it.... knowing someones code you can basically alter the value of any variable..... you can change this behaviour, but would reccomend you use the superglobal $_GET and $_POST arrays instead.....


    eg...

    myscript.php?name=magnetik&status=cooldude


    $_GET["name"] = "magnetik"
    $_GET["status"] = "cooldude"


    make sense??? if u need anymore help, PM me....

    EDIT : just browsed the http://php.net site and found the URL I wanted to share with you... ( http://www.php.net/release_4_2_1.php ) look under the 'External variables' section.....

    also noticed that PHP 4.2.3 is now out.... so im upgrading my local win32 webserver as I write this!
    Project - GAME OVER :(

  3. #3
    Maximum Bitrate PoBoy's Avatar
    Join Date
    Jun 2001
    Location
    St. Louis-MO
    Posts
    490

    Wahoo!

    That did it! Thanks Mag!
    I'm a ghost...email me if you have any questions on my old setup

    My way outdated website: http://www.poboytech.net

    FYI: I sold my 96 4Runner and bought a 1985

  4. #4
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    great! look forward to POBOYTECH.NET sometime soon!
    Project - GAME OVER :(

  5. #5
    Maximum Bitrate Jarrod's Avatar
    Join Date
    Jan 2002
    Location
    Melb, Australia.
    Posts
    475
    can someone instruct me on how to get PHP running on my local machine thats running XP Pro?

    I installed IIS using the built in XP component....but after installing it i got no idea how to control it...is there a control panel or sumfen?

    Also, any hints on setting up MySQL on my local machine?

    Thanx guys.
    Jarrod - Holden VX S!

  6. #6
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    IIS is crap IMHO..... I have been doing .ASP dev work for 2 years professionally and I still hate the piece of ****.... avoid it like the plague.... unless your doing corporate work that requires the use of microsoft products/etc... (which was sadly the case with my last job)

    PHP is a much better lang, easier to use, faster, more efficient... better than ASP and pretty much all other scripting langs, plus its open source, multi-platform and free........!! having said that forget using IIS, go for the apache option..... or what I run locally... http://www.xitami.com/ - try getting IIS running in under 1MB of space..... ha!

    there are plenty of good sites on the net for setting up the classic PHP/APACHE/MySQL option.... give google a shot.... if your still searching, ill try to dig something up.....
    Project - GAME OVER :(

  7. #7
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    Project - GAME OVER :(

  8. #8
    FLAC
    Join Date
    May 2002
    Location
    Sef'Kylar
    Posts
    1,421
    I don't know if newer versions of PHP have better implimentation, but my problem with php is the crappy pattern matching protocol.
    Since I find php to generally be a pain in the butt in this regard I tend to blend perl and PHP.
    aka Kumaneko
    "Don't make me moderate your ***!"
    Maxima of Doom - project thread - photo gallery
    mp3car system is currently FUBAR and finances do not allow for a correction of that situation
    Real computer hackers use a rotary cutting tool on their motherboard.

  9. #9
    Maximum Bitrate PoBoy's Avatar
    Join Date
    Jun 2001
    Location
    St. Louis-MO
    Posts
    490
    First things first, It will take a bit of tweaking to get it working propperly on IIS (or even IIS working for that matter). Dont expect it to work right out of the bag. IIS is great, when it wokrs.

    Follow these directions for PHP, then if it doesnt work, ask away...

    I am running 2K Server, but I am going to assume IIS on XP is very similar. IIS manager is in "Administrative Tools".

    First make sure that your IIS is working, ie. give a browser your IP (or 127.0.0.1) and see if you get a webpage.

    Second, install PHP. I just DLed the latest WINDOWS Binary and installed it no probs. Stop IIS if you are having trobles.

    Third, set up permissions. The folder that contains your PHP pages needs to have script/execute permissions for your "web user" (IUSER-MACHINENAME).

    Fourth, open IIS (in Administrative Tools) and go to Properties for your website. Click Home Directory Tab and then Configuration. Make sure that .php extension is there. You may have to add it. Just "ADD" .php and direct it to the php.exe file (C:\php\php.exe)

    -------------------------------------------------
    MYSQL -> Follow directions on web for installing it on windows machine. Then get EMS MySQL Manager to control it. Well you dont have to get EMS, but ITS THE BEST! Thanks Magnetic!
    Need it? Look around my website...

    -------------------------------------------------
    That is what I know from my experiences the last few months. I may have skipped something, but its working

    PoBoy
    I'm a ghost...email me if you have any questions on my old setup

    My way outdated website: http://www.poboytech.net

    FYI: I sold my 96 4Runner and bought a 1985

  10. #10
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    Originally posted by PoBoy
    -------------------------------------------------
    MYSQL -> Follow directions on web for installing it on windows machine. Then get EMS MySQL Manager to control it. Well you dont have to get EMS, but ITS THE BEST! Thanks Magnetic!
    Need it? Look around my website...

    -------------------------------------------------


    PoBoy
    thanks.... whats the latest version you 'own'...... I have 1.7.5.1, do you have a newer version?
    Project - GAME OVER :(

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •