Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: phpinfo.

phpinfo: Difference between revisions

From MoodleDocs
No edit summary
mNo edit summary
 
(22 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<html><head>
The phpinfo display contains information about the configuration of your PHP installation. This is useful for checking:
<style type="text/css"><!--
* that your PHP installation meets Moodle's system requirements.
body {background-color: #ffffff; color: #000000;}
* the values that are currently applied to your server's PHP install, e.g. File upload limits
body, td, th, h1, h2 {font-family: sans-serif;}
* that you have installed the required modules needed for Moodle to work, e.g. the LDAP module for LDAP authentication.
pre {margin: 0px; font-family: monospace;}
 
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
==Table of contents==
a:hover {text-decoration: underline;}
__TOC__
table {border-collapse: collapse;}
 
.center {text-align: center;}
== Displaying phpinfo in Moodle==
.center table { margin-left: auto; margin-right: auto; text-align: left;}
 
.center th { text-align: center !important; }
To view the phpinfo information:
td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
* In Moodle version 1.7 or greater, choose Location: ''Administration > Server > PHP info''
h1 {font-size: 150%;}
 
h2 {font-size: 125%;}
== Displaying phpinfo outside of Moodle ==
.p {text-align: left;}
 
.e {background-color: #ccccff; font-weight: bold; color: #000000;}
To view the phpinfo information:
.h {background-color: #9999cc; font-weight: bold; color: #000000;}
* Create a file called info.php using your text editor, containing this single line:
.v {background-color: #cccccc; color: #000000;}
 
i {color: #666666; background-color: #cccccc;}
<code php>
img {float: right; border: 0px;}
<?php phpinfo(); ?>
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
</code>
//--></style>
 
<title>phpinfo()</title></head>
* Save this file as info.php
<body><div class="center">
* Upload this file into the root web accessible folder on your server.
* Now open this file in your browser. For example <nowiki>http://<server-name>/info.php</nowiki>.
 
==Sample output==
This is a sample output displayed.
 
 
<table border="0" cellpadding="3" width="600">
<table border="0" cellpadding="3" width="600">
<tr class="h"><td>
<tr class="h"><td>
<a href="http://www.php.net/"><img border="0" src="/phpinfo?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" /></a><h1 class="p">PHP Version 4.3.3</h1>
[http://www.php.net/ http://www.php.net]
 
<nowiki>=PHP Version 4.3.3= </nowiki>
</td></tr>
</td></tr>
</table><br />
</table><br/>
<table border="0" cellpadding="3" width="600">
<table border="0" cellpadding="3" width="600">
<tr><td class="e">System </td><td class="v">Windows NT DANLAPTOP0106 5.1 build 2600 </td></tr>
<tr><td class="e">System </td><td class="v">Windows NT MYLAPTOP0106 5.1 build 2600 </td></tr>
<tr><td class="e">Build Date </td><td class="v">Aug 24 2003 22:01:16 </td></tr>
<tr><td class="e">Build Date </td><td class="v">Aug 24 2003 22:01:16 </td></tr>
<tr><td class="e">Server API </td><td class="v">Apache </td></tr>
<tr><td class="e">Server API </td><td class="v">Apache </td></tr>
<tr><td class="e">Virtual Directory Support </td><td class="v">enabled </td></tr>
<tr><td class="e">Virtual Directory Support </td><td class="v">enabled </td></tr>
<tr><td class="e">Configuration File (php.ini) Path </td><td class="v">C:\WINDOWS\php.ini </td></tr>
<tr><td class="e">Configuration File (php.ini) Path </td><td class="v">C:\WINDOWS\php.ini </td></tr>
<tr><td class="e">PHP API </td><td class="v">20020918 </td></tr>
<tr><td class="e">PHP API </td><td>20020918 </td></tr>
<tr><td class="e">PHP Extension </td><td class="v">20020429 </td></tr>
<tr><td class="e">PHP Extension </td><td>20020429 </td></tr>
<tr><td class="e">Zend Extension </td><td class="v">20021010 </td></tr>
<tr><td class="e">Zend Extension </td><td>20021010 </td></tr>
<tr><td class="e">Debug Build </td><td class="v">no </td></tr>
<tr><td class="e">Debug Build </td><td>no </td></tr>
<tr><td class="e">Thread Safety </td><td class="v">enabled </td></tr>
<tr><td class="e">Thread Safety </td><td>enabled </td></tr>
<tr><td class="e">Registered PHP Streams </td><td class="v">php, http, ftp, compress.zlib   </td></tr>
<tr><td class="e">Registered PHP Streams </td><td>php, http, ftp, compress.zlib</td></tr>
</table>
</table>
</body>
 
</html>
...
 
This output goes on for about 5 pages.
 
==See also==
* [http://www.php.net/ini.core PHP reference] describing the core PHP.INI directives
* [[PHP FAQ]]
 
[[es:phpinfo]]
[[fr:phpinfo]]
[[pt:phpinfo]]
[[pl:phpinfo]]
[[ja:phpinfo]]
 
[[Category:Developer|Phpinfo]]
[[Category:Administrator]]

Latest revision as of 18:23, 8 March 2010

The phpinfo display contains information about the configuration of your PHP installation. This is useful for checking:

  • that your PHP installation meets Moodle's system requirements.
  • the values that are currently applied to your server's PHP install, e.g. File upload limits
  • that you have installed the required modules needed for Moodle to work, e.g. the LDAP module for LDAP authentication.

Table of contents

Displaying phpinfo in Moodle

To view the phpinfo information:

  • In Moodle version 1.7 or greater, choose Location: Administration > Server > PHP info

Displaying phpinfo outside of Moodle

To view the phpinfo information:

  • Create a file called info.php using your text editor, containing this single line:

<?php phpinfo(); ?>

  • Save this file as info.php
  • Upload this file into the root web accessible folder on your server.
  • Now open this file in your browser. For example http://<server-name>/info.php.

Sample output

This is a sample output displayed.


http://www.php.net

=PHP Version 4.3.3=


System Windows NT MYLAPTOP0106 5.1 build 2600
Build Date Aug 24 2003 22:01:16
Server API Apache
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS\php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety enabled
Registered PHP Streams php, http, ftp, compress.zlib

...

This output goes on for about 5 pages.

See also