Re: [cgiwrap-users] cgiwrap php continued
Brought to you by:
nneul
From: Nathan N. <nn...@um...> - 2001-09-04 21:05:31
|
For testing purposes, can you create the following cgi and run it in both cgiwrap and normal: --- #!/bin/sh echo Content-type: text/plain echo "" printenv --- Just for the hell of it, you might also try --- #!/bin/sh echo Content-type: text/plain echo "" echo "execcing script:" exec /path/to/php /path/to/script.php --- Brian Allen wrote: > > Thanks for the feedback. Unfortunately, I still haven't been able to > get php to work with cgiwrap on a netscape enterprise server or an > apache server. My next plan was to truss the output of cgiwrap as I > called my script, hello.php, and compare it to the truss output of a cgi > script, test.cgi, which is known to work with cgiwrap. > > Here is the interesting part of the truss output from the good test.cgi > call: > > 23001: open("/users/systems/ballen/www/cgi-bin/test.cgi", O_RDONLY) > = 3 > > Here is the corresponding line in the hello.php call: > > 22981: open("/users/systems/ballen/www/cgi-bin", O_RDONLY) = 3 Is your hello.php marked executable? I'd have to see the rest of the truss output for this to be very useful info though. > Notice that the script name, hello.php, was not passed to cgiwrap so it > could be opened. I have seen one mention of this possible problem at > this website by Piotr Klaban where it says: > > "There is new variable SCRIPT_FILENAME necessary with new php > version" > http://www.klaban.torun.pl/patches/cgiwrap/ > > I was hoping Piotr or someone else could elaborate on this. > > To work around this I ran a test and set the following variables: > setenv REQUEST_METHOD GET > setenv QUERY_STRING "" > setenv PATH_INFO /ballen/test.cgi > setenv SCRIPT_FILENAME test.cgi > > Then I ran ./cgiwrap from the commandline (I made sure to use the > correct --with-httpd-user and --with-cgi-dir when compiling cgiwrap). > It worked, and here is the output: > testing > > Then I did a similar test with the following variables: > setenv REQUEST_METHOD GET > setenv QUERY_STRING "" > setenv PATH_INFO /ballen/hello.php > setenv SCRIPT_FILENAME hello.php > > Then I ran ./cgiwrap from the commandline, but I received no output so > that idea did not work. > > Could someone please explain exactly what this SCRIPT_FILENAME problem > is and then how to work around it? > (Note: I'm not convinced it's entirely a php problem because when I type > ./php hello.php I see the php output, thus php does work by itself.) > > Thank you very much for all feedback. > Brian Allen I think the underlying problem is that php is re-execcing the script or something, despite being executed directly. I know the current 3.7 and cvs cgiwrap has osme code in it to set script_filename. > > _______________________________________________ > cgiwrap-users mailing list > cgi...@li... > https://lists.sourceforge.net/lists/listinfo/cgiwrap-users -- ------------------------------------------------------------ Nathan Neulinger EMail: nn...@um... University of Missouri - Rolla Phone: (573) 341-4841 CIS - Systems Programming Fax: (573) 341-4216 |