0

I downloaded a php system [exam system] and I can't open a specific [configuring database] php file because it keep asking to download . I read this stack over this question. I tried it but php module is already active., so what is the additional thing should I do?

Here is my httpd.conf file:

enter image description here

this is the the download dialog appears

enter image description here

I hosted it and it works the problem exist only in local/wamp server.

I'm messing with this about 2 days. Thanks for your help.

Community
  • 1
  • 1
Madhawa Priyashantha
  • 9,633
  • 7
  • 33
  • 60
  • Is the PHP module loaded? – Gerald Schneider Jan 04 '16 at 08:19
  • Btw, you can copy text from the editor and paste it directly in the question, no need for screenshots of text ... – Gerald Schneider Jan 04 '16 at 08:20
  • @GeraldSchneider sorry i thought if it's uncommented then that module is loaded – Madhawa Priyashantha Jan 04 '16 at 08:29
  • @GeraldSchneider this the loaded extensions .http://i.imgur.com/nXRoME3.png – Madhawa Priyashantha Jan 04 '16 at 08:35
  • You should not have a `httpd.conf` in your project file. I assume this is there for reference so you can check that your real `httpd.conf` file has all the correct settings and should then be removed. Read the installation instructions again! – RiggsFolly Jan 04 '16 at 09:32
  • @RiggsFolly yes in project folder there is a httpd file .and in apache there i a another one right?so above preview is file of apache .the content of httpd in project file is this `RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] #Use PHP 5.4 AddHandler application/x-httpd-php54 .php Options -Indexes` – Madhawa Priyashantha Jan 04 '16 at 09:36
  • @RiggsFolly wamp server show my php version is 5.5 .so do i change it to 5.4 ?? i'm so confused.also note that i hosted it in free server and it works it shows page.the problem exist in localhost . – Madhawa Priyashantha Jan 04 '16 at 09:38
  • What version of WAMPServer did you install? And what version of PHP does it contain? – RiggsFolly Jan 04 '16 at 09:44
  • @RiggsFolly wamp 2.5 and php 5.5.12 . i didn't do anything when i host it in free live server .but it works – Madhawa Priyashantha Jan 04 '16 at 09:46

2 Answers2

2

Your are using same handler multiple times in httpd.conf, merge those:

Only put this line related to .php extension, comment rest of the lines & try again after restarting web server:

Addhandler application/x-httpd-php .php .php3
Apul Gupta
  • 3,044
  • 3
  • 22
  • 30
1

From your comment:

the content of httpd in project file is this

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L] 
#Use PHP 5.4 AddHandler application/x-httpd-php54 .php 
Options -Indexes

This is actually what you would expect to see in a .htaccess file.

So try changing the filename from httpd.conf to .htaccess (the leading dot is imporant)

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149