hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : index.php downloading?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

index.php downloading?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 05-21-2006, 06:41 AM
Damo06 Damo06 is offline
Junior Guru Wannabe
 
Join Date: Feb 2006
Location: New York
Posts: 51

index.php downloading?


When I go to my index.php it is asking me to download instead of actually viewing the page.

When I try to go into a folder with index.php in it, for example, /forum, it asks me to download 'application/x-httpd-php'

Does anyone know what the problem might be?

I have my own server.

Thanks.

Reply With Quote


Sponsored Links
  #2  
Old 05-21-2006, 08:01 AM
Patrick Patrick is offline
Stairway To Hosting
 
Join Date: Mar 2003
Location: Canada
Posts: 7,959
Do you have the following lines in httpd.conf (usually /usr/local/apache/conf/httpd.conf):

LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

There may be more, but you should have at least those 3 there.

(Assuming you use Apache + PHP4).

__________________

SYN Hosting - Affordable, Reliable & Secure Web Hosting - Proudly In Business Since 2006!

Host Unlimited Websites -/- cPanel -/- Softaculous -/- CloudFlare -/- SSH Access -/- 24/7 Tech Support
http://www.synhosting.com - Need a Canadian budget managed dedicated server? Click here for details.

Reply With Quote
  #3  
Old 05-21-2006, 08:02 AM
SystemV SystemV is offline
Junior Guru Wannabe
 
Join Date: Oct 2002
Posts: 63
Check your httpd.conf and make sure the mimetype/filehandler for PHP is correct. Also, see if any error shows in apache error_log regarding PHP module on apache restart.

Reply With Quote
Sponsored Links
  #4  
Old 05-21-2006, 07:33 PM
Ivan23 Ivan23 is offline
Web Hosting Master
 
Join Date: Apr 2002
Location: Las Vegas
Posts: 797
What CP your running, if you on a DA system then you can just rebuild apache and php

__________________
Looking for IPs? Sick of waiting and need them now?
Web:CleanIPs.com
@Cleanips

Reply With Quote
  #5  
Old 05-21-2006, 09:25 PM
eth00 eth00 is offline
Web Hosting Master
 
Join Date: Apr 2003
Location: NC
Posts: 2,911
Quote:
Originally Posted by Pat H
Do you have the following lines in httpd.conf (usually /usr/local/apache/conf/httpd.conf):

LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

There may be more, but you should have at least those 3 there.

(Assuming you use Apache + PHP4).
It may also be in /usr/local/apache/conf.d/php.conf (or something similiar). That error message just means that apache cannot handle php and downloads it instead of parses it so you just need to add support (the lines above in the quote).

__________________
John W
www.eth0.us

Reply With Quote
  #6  
Old 05-21-2006, 09:54 PM
linktome linktome is offline
Web Hosting Guru
 
Join Date: May 2006
Posts: 307
I met this several times before. It should be your ISP. try to connect to it through a proxy server to see if you can view it without downloading

__________________
Traditional music traveling

Reply With Quote
  #7  
Old 05-22-2006, 05:19 AM
xnu!l xnu!l is offline
New Member
 
Join Date: May 2006
Posts: 3
I had this problem long ago...
Can't remember in details, but it was misconiguration of virtual hosts
So maybe you post part of your vhosts configuration here?

I mean event when
Code:
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php
is already correctly written in httpd.conf

Reply With Quote
  #8  
Old 05-22-2006, 05:34 AM
flashwebhost flashwebhost is offline
Web Hosting Master
 
Join Date: Jan 2002
Posts: 1,346
Problem is PHP not installed properly. Few days back i faced same problem with FreeBSD server after portupgrade. This was due to FreeBSD port mod_php5 is removed from port and do not rebuild required php module.

__________________
WebHostingNeeds.com

Reply With Quote
  #9  
Old 05-22-2006, 05:44 AM
tweakservers tweakservers is offline
Aspiring Evangelist
 
Join Date: Mar 2006
Posts: 415
PHP might have not compiled properly as I have an issue 2 days back when setting up a Cpanel box where client calling index.php are get prompted with the download as you get. Recompile the PHP solve the issue.

__________________
Tweakservers | Professional Windows Server Setup & Security Hardening
Authorised Reseller For SmarterTools, Paessler PRTG, SSL Certificate & STH Website Malware Scanning
Twitter @tweakservers

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
ISPs Launch Copyright Alert System to Curb Infringement Web Hosting News 2013-02-27 16:14:36
DEMO VIDEO: Idera Continuous Data Protection (Part 2) Whir Tv 2012-09-25 11:52:56
Web Host Hostpoint Launches Site Builder Using CM4All Sites Web Hosting News 2011-12-12 17:14:12
Cisco Study Estimates Cloud Traffic Will Grow 12-Fold by 2015 Web Hosting News 2011-11-30 21:29:02
Intel Invests $5 Million in Cloud Management Software DynamicOps Web Hosting News 2011-09-09 16:11:46


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?