0

I passed the last 3 hours trying to:

  • Install Apache 2.4
  • Install PHP
  • Start Apache 2.4
  • Solve the 300 errors that I got after editing httpd.conf Now, I run a file with this code:

<h1>
<?php
echo "Hello World";
?>
</h1>

I go to http://localhost/test.php and it doesn't work. Screenshot I don't know what's the problem, I tried to fix it but with no success. Why did it make my code a comment? Thanks in advance.

  • Your screenshot could have been copy and pasted as text to the question. Also, the screenshot does not show the same code as what you have in the question. What happens when you go to `http://localhost/` - does that work? – Tigger Jan 05 '22 at 23:49
  • It appears a written "It works!". –  Jan 05 '22 at 23:51
  • The screenshot is the same code. –  Jan 05 '22 at 23:52
  • it look like your apache configuration doesn't include PHP check this documentation start from step 7 https://www.php.net/manual/en/install.unix.apache2.php – Youssef Jan 06 '22 at 00:33
  • How can I connect the Apache2.4 monitor to MySQL? –  Jan 06 '22 at 17:03

0 Answers0