Project

General

Profile

Check php information » History » Version 10

Amber Herold, 05/18/2010 04:15 PM

1 1 Amber Herold
h1. Check php information
2
3
Create the following info.php in your web server document root directory (/var/www/html on CentOS. /srv/www/htdocs on SuSE. You can find its location in httpd.conf mentioned above under the line starting DocumentRoot).
4
5
<pre>
6
<?php
7
phpinfo();
8
?>
9
</pre>
10
11 9 Amber Herold
Execute the following commands, using the appropriate path to your info.php file.
12
13 4 Neil Voss
<pre>
14 5 Neil Voss
sudo touch /var/www/html/info.php
15 6 Neil Voss
sudo chmod 666 /var/www/html/info.php
16
echo "<?php  phpinfo();  ?>" > /var/www/html/info.php
17 8 Neil Voss
sudo chmod 444 /var/www/html/info.php
18 4 Neil Voss
</pre>
19
20 7 Neil Voss
Visit this page at http://HOST.INSTITUTE.EDU/info.php or http://localhost/info.php
21 1 Amber Herold
22 10 Amber Herold
You will see comprehensive tables of php and apache information, including the location of the additional .ini files, extension, include path, and what extension is enabled.
23 1 Amber Herold
24
Here is an example screen shot of the part of the info.php page that tells you where php.ini and other configuration files are.
25
26
!http://emg.nysbc.org/software/leginon/images/images/phpini.png!
27 2 Amber Herold
28
29
______
30
31
[[Install Apache Web Server|< Install Apache Web Server]] | [[Install the MRC PHP Extension|Install the MRC PHP Extension >]]
32 3 Amber Herold
33
______