setup apache and php on Mint
-
28-10-2019 - |
Question
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
I have done and created a test page test.php but the browser doesn't show any information
test.php content
<!--?php
phpinfo();
?-->
But the apache alone works (the browser loads the http://localhost/ just fine)
Solution
It should be:
<?php
phpinfo();
?>
Your current code seems like a malformed HTML comment.
OTHER TIPS
Well, PHP open and close tags are <?php
and ?>
. Instead of php tags, you have a html comment (<!--
and -->
). Your test.php
should look like this:
<?php phpinfo(); ?>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow