Project

General

Profile

Check php information » History » Version 17

Sargis Dallakyan, 06/15/2015 03:44 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 13 Neil Voss
sudo nano /var/www/html/info.php
7
</pre>
8
9 14 Amber Herold
Copy and paste the following code into info.php:
10
11 13 Neil Voss
<pre>
12 1 Amber Herold
<?php
13
phpinfo();
14
?>
15
</pre>
16
17 14 Amber Herold
Restrict access to your info.php file.
18 6 Neil Voss
19
<pre>
20 8 Neil Voss
sudo chmod 444 /var/www/html/info.php
21 4 Neil Voss
</pre>
22
23 7 Neil Voss
Visit this page at http://HOST.INSTITUTE.EDU/info.php or http://localhost/info.php
24 1 Amber Herold
25 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.
26 1 Amber Herold
27 11 Amber Herold
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. This information will be used while installing components of the Web Server.
28 1 Amber Herold
29
!http://emg.nysbc.org/software/leginon/images/images/phpini.png!
30 2 Amber Herold
31
32
______
33
34 16 Amber Herold
[[Start NFS|< Start NFS]] | [[Install SSH module for PHP webserver|Install SSH module for PHP >]]
35 3 Amber Herold
36
______