phpinfo()

azet

New member
Joined
Feb 3, 2006
Messages
4
Hello,

do someone know if is possible to cut some phpinfo() output? For example to hide when it was compiled, or information about OS?

Best regards,
Bart.
 
phpinfo() is a built-in function.

I suppose you could write your own functions that display only the information you want displayed.

But that wouldn't keep anyone else from writing phpinfo() into their own php program.

Jeff
 
phpinfo() is an internal php command so you cannot change its output.
Ofcourse php is open source so you could make any changes yourself (in your case comment out a few lines in ext/standard/info.c) and recompile php. But i don't think many of us would want to do this if it means changing sourcecode and recompiling php.

There are some things you can hide though. For example, to hide the apache version information you could set "ServerSignature Off" and add "ServerTokens ProductOnly" in httpd.conf (info)
To hide some php information set "expose_php = Off" in php.ini.
You can even disable the phpinfo function completely if you want by adding phpinfo to the "disable_functions" line in php.ini
 
Thanks, Aspegic, for eliminating my issue with writing your own. I don't know PHP well enough to know you can disable built-in functions.

Jeff
 
Back
Top