Apache not executing PHP on CentOS 7 in browser

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I've installed the following:

[root@localhost conf.d]# yum list installed | grep 'http'
httpd.x86_64                     2.4.6-80.el7.centos.1          @updates
httpd-tools.x86_64               2.4.6-80.el7.centos.1          @updates
[root@localhost conf.d]# yum list installed | grep 'php'
php72.x86_64                     1.0-1.el7.remi                 @remi-safe
php72-php-cli.x86_64             7.2.11-1.el7.remi              @remi-safe
php72-php-common.x86_64          7.2.11-1.el7.remi              @remi-safe
php72-php-json.x86_64            7.2.11-1.el7.remi              @remi-safe
php72-runtime.x86_64             1.0-1.el7.remi                 @remi-safe

PHP works com/tag/fine">fine already via CLI

[root@localhost conf.d]# php -v
PHP 7.2.11 (cli) (built: Oct 10 2018 08:49:35) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Apache also works com/tag/fine">fine

[root@localhost modules]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Jun 27 2018 13:48:59

My issues is Apache doesn't execute PHP and just triggers a download of the PHP file in the browser.

Note: This is on Vagrant running centos/7 box.

Any ideas?

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.