|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80530 Make phpinfo not output complete webpages
Submitted: 2020-12-17 21:48 UTC Modified: 2020-12-17 22:31 UTC
From: admin at dpwco dot com Assigned:
Status: Open Package: Unknown/Other Function
PHP Version: 7.4.13 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: admin at dpwco dot com
New email:
PHP Version: OS:


 [2020-12-17 21:48 UTC] admin at dpwco dot com
From manual page:
Actually using PHP 7.4.11

Calling phpinfo function results in function apparently inserting its own /BODY & /HTML tags at function processing end.

These tags show up in "view source" of a served web page, see:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-17 21:52 UTC]
-Status: Open +Status: Not a bug
 [2020-12-17 21:52 UTC]
phpinfo() outputs a complete webpage. Even includes a doctype.

But go ahead and add your own markup if you want. It shouldn't matter. Browsers will find a way to handle it.
 [2020-12-17 22:29 UTC] admin at dpwco dot com
In the past, on previous servers, my markup seemed to override phpinfo function markup -

have just migrated to new server environment, and it no longer works as in the past.

When phpinfo function is embedded in a larger user generated script, it shouldn't be inserting /body & /html tags at end of its processing,

common sense dictates in these situations, there is more user code to follow.

phpinfo function should just wrap its output in a <div></div> wrapper and let the user build their respective page around it.
 [2020-12-17 22:31 UTC]
-Summary: Inserting unwanted HTML tags +Summary: Make phpinfo not output complete webpages -Status: Not a bug +Status: Open -Type: Bug +Type: Feature/Change Request
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 14:01:31 2024 UTC