0

I am trying to configure PHP with apache 2.4 and everytime I run the localhost/phpinfo.php, it shows me the code.

browser used: chrome changes in apache server httpd conf file: LoadModule php7_module "C:/php/php7apache2_4.dll" AddHandler application/x-httpd-php .php PHPIniDir "c:/php"

phpinfo file:

<?php phpinfo(); ?>

tried almost all the answers but everytime it is showing me this file content only when running localhost/phpinfo.php

Note: localhost is running fine.

MrTux
  • 32,350
  • 30
  • 109
  • 146
Nagendra Singh
  • 47
  • 1
  • 4
  • 10

1 Answers1

0

This question has been asked and answered many times. There are many potential answers depending on where you got Apache and PHP from.

If you can't troubleshoot, just download XAMPP: https://www.apachefriends.org/index.html

For troubleshooting see: PHP code is not being executed, instead code shows on the page

dagelf
  • 1,468
  • 1
  • 14
  • 25