Ask Your Question
0

php doesnt runs and browser downloads it

asked 2015-11-19 11:50:11 -0600

7eja5 gravatar image

updated 2015-11-19 13:27:28 -0600

I recently installed lamp in fedora 22 , i was testing out a php script and browser doesnt seem to run it . I checked phpinfo() and got the correct page also i can access phpmyadmin . Is there any problem related to permissions or some .conf file . Thanks for the help in advance .

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-11-20 14:50:46 -0600

7eja5 gravatar image

Yes , I have my files in /var/www/html folder , also I have made a basic php file that displays php info , it works . I made a sign in html page that uses php and mysql to authenticate , but instead of running the php script browser tries to download it . Thanks for the help in advance .

edit flag offensive delete link more

Comments

Just make sure that you reply to other answers using comments. It's gets crowded real quick if you don't. ^^

MetaNova gravatar imageMetaNova ( 2015-11-20 16:49:13 -0600 )edit
0

answered 2015-11-20 11:59:35 -0600

dabame gravatar image

Where is your .php file located? By default, apache is configured to serve files from /var/www/html/ . Put your file in that folder then point your browser to localhost/<filename>.php

edit flag offensive delete link more

Comments

Well, not sure then. The .conf file for php should be in /etc/httpd/conf.d/php.conf

# mod_php options
<IfModule  mod_php5.c>
    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    <FilesMatch \.php$>
        SetHandler application/x-httpd-php
    </FilesMatch>

I'd double check you have the SetHandler set appropriately and that it is uncommented. Other than that I'm sorry I can't be more help

dabame gravatar imagedabame ( 2015-11-20 15:31:13 -0600 )edit

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: 2015-11-19 11:50:11 -0600

Seen: 64 times

Last updated: Nov 20 '15