PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 4, 2022

[FIXED] lamp stack is not working properly in linux mint

 February 04, 2022     lamp, linux-mint, php     No comments   

Issue

I am a newbie to Linux. I was trying to install lamp stack in linux-mint. I used this command sudo apt-get install apache2, and looks like this is working. I enter the localhost in my browser and it shows the apache2 ubuntu default page. but the problem is when I create a info.php file in /var/www/html this directory with some basic PHP code <?php phpinfo(); ?>, instead of showing PHP details and versions, it is showing me the the raw PHP code in the browser <?php phpinfo(); ?>. I've tried some solution from StackOverflow enter image description here

but nothing works. how can I fix this?


Solution

You did not have PHP installed or maybe your php is not enable.

you can do:

For install -> sudo apt-get install php php-mysql

For enable ->

sudo a2enmod php7  
sudo service apache2 restart

this is important sudo service apache2 restart



Answered By - Pardeep
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing