Apache + PHP not working
Tofloor
poster avatar
wkdwilliams
deepin
2017-01-20 17:01
Author
I installed PHP and Apache, but PHP is not running correctly. Apache returns the plain text of the PHP file. Is this a bug or am i supposed to manually configure Apache?
Reply Favorite View the author
All Replies
Feng Yu
deepin
2017-01-20 17:23
#1
Did you enable the php extension? You can try this:

  1. sudo a2enmod php7
  2. sudo service apache2 restart
Copy the Code
Reply View the author
wkdwilliams
deepin
2017-01-20 18:28
#2
https://bbs.deepin.org/post/134336
Did you enable the php extension? You can try this:

I currently have PHP5 installed. I will later install PHP7 tho. After running "a2enmod php5" i get an error;

  1. ERROR: Module php5 does not exist!
Copy the Code
Reply View the author
Feng Yu
deepin
2017-01-20 19:35
#3
https://bbs.deepin.org/post/134336
I currently have PHP5 installed. I will later install PHP7 tho. After running "a2enmod php5" i get ...

Deepin is based on Debian sid, which has been removed php5 from official repo. If you were installed php packages from offcial repo, thus a2enmod should work. If you were not, you have to add php extension to apache2 conf manually.

You can follow this guide: http://php.net/manual/en/install.unix.apache2.php
Reply View the author
wkdwilliams
deepin
2017-01-20 19:40
#4
https://bbs.deepin.org/post/134336
Deepin is based on Debian sid, which has been removed php5 from official repo. If you were install ...

After installing PHP 7, apache now works. Thanks for that.
Reply View the author