[PHP] Did I have to sign up for the mailing list to post here?
If you're reading this now, then yes is probably the answer to my titular question. My last two attempts to post quietly disappeared into the ether with nary a warning, and I wasn't subscribed before. I'd be happy simply using a news reader rather than getting regular e-mailings. Will I be able to unsubscribe from the mailing list without losing the ability to post here via news reader? -Kerry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with readfile() and HTTP headers (vs. server-side include)
I'm trying to figure out how to make readfile() or include() work more like a server-side #include, in terms of HTTP headers. I'm taking some web pages that used server-side includes, that in turn invoked CGI scripts, and replacing these pages with PHP pages. For the most part, I don't need a lot of the old CGI code anymore, but I'd still like to be able to invoke a CGI from a PHP page with similar results as when I did the same thing with SSI. The problem that I'm seeing is with HTTP headers. When I use the readfile() or include() functions in PHP, PHP seems to creating its own new headers, rather than passing along the headers from its own environment. As an example of what I'm talking about, here's a CGI that displays, among other things, the HTTP headers that your web browser provides: http://www.shetline.com/cgi-bin/serverinfo.cgi When I directly invoke the above from my browser, to no surprise at all I get this result: HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) When I try to use readfile() or include(), however, what I get back is: HTTP_USER_AGENT: PHP/4.2.3 PHP is supplying its own user agent, rather than the user agent that invoked the PHP page in the first place. Here's what the test page source looks like (from http://www.shetline.com/testphp.php): PHP Test <% readfile("http://www.shetline.com/cgi-bin/serverinfo.cgi";); %> Below is an example of a page using SSI, that produces the desired result: SSI TEst Is there any way, short of getting down to sockets and hard-coding the whole transaction, to get readfile(), include(), or something else that's relatively painless, to pass on the same HTTP environment that my PHP page operates within to a page that my PHP page invokes? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] test - please ignore
My last post didn't appear -- just testing before I try to repost. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with readfile() and HTTP headers (vs. server-side include)
I'm trying to figure out how to make readfile() or include() work more like a server-side #include, in terms of HTTP headers. I'm taking some web pages that used server-side includes, that in turn invoked CGI scripts, and replacing these pages with PHP pages. For the most part, I don't need a lot of the old CGI code anymore, but I'd still like to be able to invoke a CGI from a PHP page with similar results as when I did the same thing with SSI. The problem that I'm seeing is with HTTP headers. When I use the readfile() or include() functions in PHP, PHP seems to creating its own new headers, rather than passing along the headers from its own environment. As an example of what I'm talking about, here's a CGI that displays, among other things, the HTTP headers that your web browser provides: http://www.shetline.com/cgi-bin/serverinfo.cgi When I directly invoke the above from my browser, to no surprise at all I get this result: HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) When I try to use readfile() or include(), however, what I get back is: HTTP_USER_AGENT: PHP/4.2.3 PHP is supplying its own user agent, rather than the user agent that invoked the PHP page in the first place. Here's what the test page source looks like (from http://www.shetline.com/testphp.php): PHP Test <% readfile("http://www.shetline.com/cgi-bin/serverinfo.cgi";); %> Below is an example of a page using SSI, that produces the desired result: SSI Test Is there any way, short of getting down to sockets and hard-coding the whole transaction, to get readfile(), include(), or something else that's relatively painless, to pass on the same HTTP environment that my PHP page operates within to a page that my PHP page invokes? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php