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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 04:03:38 2021 UTC