Results 1 to 3 of 3
July 14th, 2004, 12:25 PM #1
- Join Date
- January 17th, 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 ae.pl 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\ae.pl?ssi&type=browse&mode=magazines&): failed to open stream: No such file or directory in C:\Inetpub\webwiseroot\search.php on line 208
Warning: main(): Failed opening 'cgi-bin\ae.pl?ssi&type=browse&mode=magazines&' 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\ae.pl" Then we get:
Parse error: parse error, unexpected T_DO in c:\inetpub\cgi-bin\ae.pl 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!
July 14th, 2004, 01:32 PM #2
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.: "http://www.mydomain.com/cgi-bin/ae.pl?ssi&PARAMETERS") and then print that string.
Do not use the PHP include() function since PHP will then try to parse the input as PHP.
per: David CusimanoAffiliate Tools: Datafeed Merge
July 14th, 2004, 02:27 PM #3
- Join Date
- January 17th, 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.