Page 1 of 1

Customized PHP installation

Posted: Thu Jan 30, 2020 7:17 am
by anaigini45

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 :
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: Select all

[[email protected] ~]# 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
[[email protected] ~]#
I am not sure what to do next to make sure php is running.

Re: Customized PHP installation

Posted: Thu Jan 30, 2020 1:01 pm
by hyper
Did you install a server?

Try typing
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.

Re: Customized PHP installation

Posted: Fri Jan 31, 2020 12:07 am
by anaigini45
It turns out that adding these below the "Load Module php7_module" in httpd.conf worked :

Code: Select all

<FilesMatch \.php$>

SetHandler application/x-httpd-php

You need to restart httpd after adding these lines.