CodeLobster IDE
http://codelobster.com/forum/

How to trap the phpinfo function event
http://codelobster.com/forum/viewtopic.php?f=3&t=24110
Page 1 of 1

Author:  hoanghuynh [ Mon Jan 15, 2018 2:38 am ]
Post subject:  How to trap the phpinfo function event

I disabled my phpinfo listing on my server. However when i test that i just get an empty page. I had assumed i would get the "not enabled message" displayed via the browser but its not displayed at all, its just an empty page. It is however in my error log but no error code, and i dont want to display errors.

What i would like to do is to trap the attempted execution of phpinfo and then display the message that it has been disabled.

In the phpinfo docs it does show how to trap it via running the same file, in other words if you have one file that you run you can set a $value to a key in phpinfo, then you can check if $value is set, if not then display the message. However this is not what i need to do. I need a domain global solution not just one file.

So if someone tries to run phpinfo on the domain at all, i would like to trap that and display a message in the browser.

But not sure how to do that as i am unable to find an error code or other hook type event to use for the trap.

Thanks

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/