Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

morloderex's avatar

PHP header is showing the PHP version

Hello @JeffreyWay

On all your pages here at laracasts.com you have a header on the request that is showing us your PHP version, and for security reasons i recommend that you do NOT send out this header (X-Powered-By)

Or if you do have a reason to show us this information could you then give me that?

Because i see this as a security risk

0 likes
6 replies
bashy's avatar

To be honest, it may be a small risk but if someone wants to exploit it, they will try anyway.

Most exploiters have a script to run to check for them regardless of the version shown.

rapliandras's avatar

By the way it's clear from the URL structure, that laracasts runs on Laravel. And Laravel requires PHP 5.4+, Since 5.4 nothing big has happened with PHP regarding security. So even hiding it wont make any difference.

bashy's avatar

One that could be hidden is the nginx version, there's only two exploits for 1.6.0 and I'm not sure they'd every be used since it's local network exploit.

morloderex's avatar

@rapliandras: Yes, you can say that but it's an suggestion for security by not showing the version number here you do not expose yourself by making it easy for the attacker.

@bashy: Yes, I know it's a very small risk if any but hiding sensitive informations like version numbers is ALWAYS the best option regarding security.

Please or to participate in this conversation.