Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2007
    Location
    Kansas City, MO
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Browser Weirdness - Firefox works, IE doesn't. Please Help!

    I use the following code in one of my pages to setup and start a game server. It works fine in Firefox, but hangs for 5-10 minutes in IE before continuing on past the pclose($f); part.
    PHP Code:
    <?php
    $f 
    escapeshellcmd("gamerunner.exe -map ".$map." -game ".$game." -time ".$time."");

    $handle popen("$f""r");
    if(!
    $handle) {
        echo (
    "Error launching server..");
    }
    sleep(1);
    pclose($f);
    ?>
    <p>
    Server is launching..
    I am still a novice PHP programmer, pls help!?

  • #2
    Regular Coder PremiumBlend's Avatar
    Join Date
    Apr 2006
    Location
    Marion, Iowa
    Posts
    201
    Thanks
    0
    Thanked 13 Times in 13 Posts
    Just looking at the code, my first question is: What kind of web server are you using? I'm guessing it's either Apache or IIS... but you should do some research on how 'escapeshellcmd()' works on both. I haven't used the function before, but if you haven't researched how it works on the server, it should be your first priority.
    My Website: DumpsterDoggy

  • #3
    Regular Coder the-dream's Avatar
    Join Date
    Mar 2007
    Location
    Northamptonshire, UK
    Posts
    477
    Thanks
    8
    Thanked 4 Times in 4 Posts
    You Should Echo The:
    Code:
    <p>
    Server is launching..
    </p>
    Then is there's an error, It will look cleaner!

    Havent got an answer to your other question! Sorry!

  • #4
    New to the CF scene
    Join Date
    Mar 2007
    Location
    Kansas City, MO
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    No, no error. It works (sorta - see below). I am using XP Pro, Apache, PHP..

    Internet Explorer 6.x+ hangs until it thinks the process has timed-out or finishes. But Firefox works fine, it continues beyond the "Server is launching" to the rest of the page (which is not in the code above, as it's just html).

    With both browsers, it correctly launches my server app. I am just wondering why IE is hanging for an ungodly amount of time before it continues displaying the rest of the html on my page.


  •  

    Posting Permissions

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