|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-01-20 21:43 UTC] tim dot lokot at s1 dot com dot au
Is it possible to enable future versions of PHP to be run as an SSI directive so that languages like Perl do not have to be used instead for this purpose? Currently PHP sends out the X-Powered-By headers everytime it's run including all the other default headers making it difficult to run PHP as SSI without having all the headers display to the screen. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 19:00:02 2025 UTC |
At least on UN*X systems you can run PHP perfectly as SSI - just do a SSI include <!--#include virtual="phpscript.cgi" --> where phpscript.cgi is a script which first line points to your PHP executable: #!/usr/bin/php which could also be c:\progra~\php\php.exe (I think). Or did I completely misunderstand you? Also the X-Powered-By can be switched off. Either by /usr/bin/php -q which omits all HTTP-headers (such as Content-type and X-Powered-By) or by configuration directive: expose_php = On ; Decides whether PHP may expose the fact that it is installed ; server (e.g., by adding its signature to the Web server header). ; It is no security threat in any way, but it makes it possible ; to determine whether you use PHP on your server or not. Kind Regards, Daniel LorchUnder IIS, you do not have to supply the path to the executable in every script. That's the nature of windows. It works via file extension association. My solution is to create a function called set_expose("off") or whatever fits in with the php naming conventions so that this can be set at runtime from within the script. Thus forcing php to not send out any headers by itself.