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.

1
  • 1
    make sure that you had restarted you apache after any modification Commented Jun 26, 2018 at 20:42

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.