Results 1 to 3 of 3
  1. #1
    Join Date
    January 18th, 2005
    Well here's a fun one for you! Normally I'm pretty good about working these things out myself, but this ones had me banging my head on a desk for two and a half days straight now!

    First off: We've built a site using AE that's PHP based. That made things quite difficult at first since AE is not too PHP friendly, but with a bit of creativity I've managed to get it working. You can see the results here:

    Well, this was built initially on a Linux/Unix server (not sure which right off the bat), but we've recently aquired our own dedicated server and have decided to use it instead. The new server uses Windows 2003 Server, standard edition, running IIS 6.0. All of the PHP ported over just fine but the CGI scripts.... well, that's where the problem comes in.

    I have a file called search.php which essentially parses the URL into a string that can understand and runs the CGI script with an include (the only way you CAN do it in PHP). The problem is after moving to the new site I'm suddenly getting this any time I try to access that search.php file:

    Warning: main(cgi-bin\ failed to open stream: No such file or directory in C:\Inetpub\webwiseroot\search.php on line 208

    Warning: main(): Failed opening 'cgi-bin\' for inclusion (include_path='.;c:\php\includes;c:\inetpub') in C:\Inetpub\webwiseroot\search.php on line 208

    Now, I've made sure I've set up the include directories correctly, made sure Perl is installed, made sure that the file does indeed exist, checked, double checked, and triple checked all my server settings, scoured the php.ini, etc. yet I can't figure out why it apparently can't see this file! Things get even wierder when you crop out all the ?ssi&type=... stuff, telling it to include JUST "cgi-bin\" Then we get:

    Parse error: parse error, unexpected T_DO in c:\inetpub\cgi-bin\ on line 454

    So, up until this point I'm thinking that I've done something wrong, but suddenly it's able to find the file and read it! It's just crashing on who knows what (probably because I'm not passing in any parameters)

    So my question becomes this: is there any special configuration that needs to be done to accomodate Windows Server 2003, or is it even compatible at all? Is this a known issue, or did I simply really manage to screw things up? Help!

  2. #2
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Toronto, Canada
    In your php file, are you using something like the following?


    Note that the parameter is a partial URL, not a pathname; that is, it starts with a / and contains / (not backslash \).

    I don't know if the virtual() function call is supported on Windows version of PHP. If it isn't, then try calling the PHP file_get_contents() function with a full URL as the "filename" (e.g.: "") and then print that string.

    Do not use the PHP include() function since PHP will then try to parse the input as PHP.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano
    Affiliate Tools: Datafeed Merge

  3. #3
    Join Date
    January 18th, 2005
    Virtual is indeed unsupported in IIS, but the file_get_contents() worked great! By passing it the parsed URL and echoing the results, it gives the exact same results as include did on the old server.

    Thank you!

  4. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Windows XP IIS Server - HELP
    By BurgerBoy in forum Midnight Cafe'
    Replies: 2
    Last Post: October 20th, 2005, 05:08 PM
  2. windows server help
    By coldclimber in forum Scripts
    Replies: 1
    Last Post: May 11th, 2005, 06:59 PM

Posting Permissions

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