Ask Your Question
0

php not executed in apache

asked 2014-09-14 12:36:39 -0500

roelof1967 gravatar image

updated 2014-09-14 13:54:12 -0500

Hello

Everytime I try to open a local php file on apache I see the code.

How to solve this ?

Roelof

Edit 1: Can posting my apache config file on pastebin maybe help.

edit retag flag offensive close merge delete

Comments

1

Very few information...

  1. which Fedora version ?
  2. have you installed "php" package ?
  3. have you restart apache ?
  4. do you use
remi gravatar imageremi ( 2014-09-14 12:39:41 -0500 )edit

Answers :

1) Fedora 20 2) Yes, I installed php , apache according to this manual : https://www.digitalocean.com/community/tutorials/how-to-install-lamp-linux-apache-mysql-php-on-fedora 3) yes, I restarted apache with systemctl apache2 reload 4) I cannot answer that question because I miss a piece of the question.

roelof1967 gravatar imageroelof1967 ( 2014-09-14 13:10:58 -0500 )edit

@roelof1967 do you make your php file executable?

Jomoos gravatar imageJomoos ( 2014-09-14 22:19:11 -0500 )edit

php file doesn't need to be executable.

Question 4 seems cut because if tag.. do you use deprecated short tag (?) or normal tag (?php)

remi gravatar imageremi ( 2014-09-15 01:07:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-09-14 23:37:26 -0500

aeperezt gravatar image

You need to install mod_php so apache load php on load:

yum install mod_php

systemctl restart httpd.service

that will do it.

Good luck

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-14 12:36:39 -0500

Seen: 1,008 times

Last updated: Sep 14 '14