php.net |  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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: admin at dpwco dot com
New email:
PHP Version: OS:

 

 [2020-12-17 21:48 UTC] admin at dpwco dot com
Description:
------------
---
From manual page: https://php.net/function.phpinfo
---
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:

https://www.jokesbag.com/connectiontest.php



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-17 21:52 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2020-12-17 21:52 UTC] requinix@php.net
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] requinix@php.net
-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-2025 The PHP Group
All rights reserved.
Last updated: Mon Mar 10 22:01:33 2025 UTC