Just a method for people who wants to show PHPinfo inside Drupal
PHPinfo Description:
Outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.
go to
Admin>content>create>page (or sniplet)
copy and paste the code below
// Show all information, defaults to INFO_ALL
phpinfo();
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
Input format:
PHP
you can define the path as
php info
(if yo like setup it as mnu item on the admin menu block later on or with otf menu)
>submit
voila! here is the php menu on your server on;
Comments
additional note
While not a bad thing, note that phpinfo has tables and stuff so the page displaying this may cause some slight formatting differences on your site. On mine, all the text was reduced in size and a few other minor differences.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mount
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
security
outsider shouldn't see the phpinfos so do not "publish" the node, as the admin you can see "unpublished" nodes without problems
-micha
work in progress with Drupal 4.6: langmi.de
You are both right, solutions would be...
sepeck,
you are right, PHPinfo built in PHP and it has its default table and css
Maybe someone with coding skills can get the PHPinfo stripped from tables and css and put into Drupal with some method or maybe with with a phpinfo.module ?
micha_1977
absolutely, PHPinfo should not be public its not wise if its visible by other than the admin.
solution would be
Options>not published (there is not such a option on drupal yet)
User comments>Disabled
Only viewable by > Admin (there is not such a option on drupal yet)
above options would be also useful generally if there were added to Drupal
ps: While I can try to make some hacks and have ideas on UI etc. I can not code like you guys they are just some ideas maybe someone can pickup and do something sensible about them so we can all learn and share
**************************************
Damn! I can not code PHP :(
unpublished nodes are possible
just do not check the "Published" box while creating a node
those unpublished nodes will still be accessable via admin/content
-micha
work in progress with Drupal 4.6: langmi.de
correct micha_1977
I made a mistake you are right you can uncheck >published
but I still like to see the option viewable by admin' on;
admin>node>edit
................
Only viewable by;
-anonymous
-authenticated
-demo
>admin
as a Usability/UI addition just for the sake of clarity for ordinary folk like me :)
Maybe its already on the group/user permissions bit not present on submit/edit>content/node
am I missing something?
Heh, no it works just fine,
Heh, no it works just fine, just want to point out the formatting issue. I have this on my root site of my mulitsite install. I just uncheck the published box unless I need to show someone.
Also, you can make a new content type with flexinode and then give someone access rights to that node type and only use it for that.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mount
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Why is there a security problem ?
I'm sorry but I don't understand why is it a problem to have phpinfo() available publicly ?
A famous French ISP (free.fr) allow you to to invoque this function and in fact I think it's very usefull to check the available modules and function...
So I think that this shouldn't be a problem, unless you forget to update your php when some bugs are found...
Security
Security by Obscurity.