Customized PHP installation

A

Anonymous

Guest
Hi,

I installed PHP (source code) version 7.2.3 in one of our development environments.
I am setting up wordpress, and to test whether or not PHP is working I insert this in the browser :

http://192.168.120.203/wp-admin/install.php
I get this error :

Error: PHP is not running.WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

So how do I ensure that PHP is running. I can see the php version when I run php -v :
Code:
[root@dev-mumo ~]# php -v
PHP 7.2.3 (cli) (built: Jan 27 2020 21:41:21) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[root@dev-mumo ~]#

I am not sure what to do next to make sure php is running.
 
Did you install a server?

Try typing
http://localhost/
or 127.0.0.1
into your browser, this should load a page of some sort, if not go back over the instructions on installing PHP from source that you used, to make sure that you have done everything correctly; PHP does have a built in server, but you need to activate it (again see installation instructions).

Also make sure that you have saved the WP files in the correct directory, this should have been identified during installation.

The IP address that you have used is probably for the machine that you are on, not the browser or server.

PHP can run in terminal (command line), but it doesn't necessarily active a server, it's more normal for the server to activate PHP. Your browser talks to a server NOT PHP.
 
It turns out that adding these below the "Load Module php7_module" in httpd.conf worked :


Code:
<FilesMatch \.php$>

SetHandler application/x-httpd-php

</FilesMatch>

You need to restart httpd after adding these lines.
 
Back
Top