Forum Moderators: coopster
You can disable phpinfo() by going into your php.ini file . If you aren't sure where that is located, then you can print the phpinfo() function and it is written there. The find the place where you can disable functions for security reasons.
The line should read this:
disable_functions = phpinfo
Then restart your server and that function should be disabled.
Hope this helps...
Also review From The Manual [php.net]
phpinfo() should not reveal things like username and password at all. maybe you can only see your username and password from your request. in that case, even if someone would guess the url of the request which leads in display of phpinfo() might see only his/her own requests username and password not yours!
anyway it might be (might) that your shared hoster has got an unsecure php/web setup anyway, so this is not related to the phpinfo function in specific and it makes not so much sense to disable it.
and i guess no hoster on earth will disable phpinfo per default for its customers, because you often need it to setup scripts and apps on the server.
phpinfo() should not reveal things like username and password at all. maybe you can only see your username and password from your request. in that case, even if someone would guess the url of the request which leads in display of phpinfo() might see only his/her own requests username and password not yours!
Correct - it's showing his session variables - they wouldn't be exposed to other users - but it's a good idea to protect the phpinfo anyway - no sense in giving anyone any info about your config.