Customized PHP installation

Forum for you who has PHP installation issues

Moderators: egami, macek, gesf

Post Reply
anaigini45
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Jan 30, 2020 7:13 am

Thu Jan 30, 2020 7:17 am

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

[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.
User avatar
hyper
php-forum GURU
php-forum GURU
Posts: 973
Joined: Mon Feb 22, 2016 5:52 pm

Thu Jan 30, 2020 1:01 pm

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.
anaigini45
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Jan 30, 2020 7:13 am

Fri Jan 31, 2020 12:07 am

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

</FilesMatch>
You need to restart httpd after adding these lines.
Post Reply