User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,009 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,428 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1352 | Replies: 12 | Solved
Reply
Join Date: Jun 2007
Posts: 13
Reputation: zachisevil is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
zachisevil zachisevil is offline Offline
Newbie Poster

PHP downloading?

  #1  
Jun 29th, 2007
Hey how is everybody doing today?
I am a noob in php (i actually just wrote my first php script yesterday) but I am running into a problem. I have a .php file and when I go to it on firefox it tries to either open with a program or save (it is acting like it is a downloadable file or something). IE opens the page fine though, it is a little weird because the whole time I have had problems with IE but not FF. I dont know whether this should be in browser or php so ill just post in both!
thank you for your help!!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 4,711
Reputation: iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light 
Rep Power: 17
Solved Threads: 309
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: PHP downloading?

  #2  
Jun 29th, 2007
What exactly is your php file doing?
Member of: F-ugly code club

Join today don't delay!
Reply With Quote  
Join Date: Jun 2007
Posts: 13
Reputation: zachisevil is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
zachisevil zachisevil is offline Offline
Newbie Poster

Re: PHP downloading?

  #3  
Jun 29th, 2007
http://arbortreeland.com/index2.php

when I go to it in firefox it tries to download the file (you know like if you click on a direct link to an .mp3 file or something it prompts you to open or save).
If I choose to open it in firefox it just opens a blank page and prompts to dl again.
BUT if I use IE it works fine. this does this on all the computers I tried it on so it is not system specific.
Reply With Quote  
Join Date: Aug 2005
Posts: 4,711
Reputation: iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light 
Rep Power: 17
Solved Threads: 309
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: PHP downloading?

  #4  
Jun 29th, 2007
I tested it with firefox on my linux box and it prompts for the open or save option.

How peculiar. Are you using firefox 2.0 out of interest?
Last edited by iamthwee : Jun 29th, 2007 at 3:05 pm.
Member of: F-ugly code club

Join today don't delay!
Reply With Quote  
Join Date: Jun 2007
Posts: 13
Reputation: zachisevil is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
zachisevil zachisevil is offline Offline
Newbie Poster

Re: PHP downloading?

  #5  
Jun 29th, 2007
yeap
Reply With Quote  
Join Date: Aug 2005
Posts: 4,711
Reputation: iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light 
Rep Power: 17
Solved Threads: 309
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: PHP downloading?

  #6  
Jun 29th, 2007
It's not liking something in your code. Hmm. I wonder.
Member of: F-ugly code club

Join today don't delay!
Reply With Quote  
Join Date: Jun 2007
Posts: 13
Reputation: zachisevil is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
zachisevil zachisevil is offline Offline
Newbie Poster

Re: PHP downloading?

  #7  
Jun 29th, 2007
i could paste the code here, but I dont know if you guys would want to debug it for me. Just in case though. NOTE: I dont actually have any php in there, just javascript. I also removed the body content. It works fine if i save it as .html, but it wont preload the images unless it has a .php extension.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
// configure here:
var preload = new Array('atlpics/coral6.jpg', 'atlpics/coral7.jpg', 'atlpics/coral8.jpg' ,'atlpics/coral23.jpg' ,'coral39.jpg' ,'atlpics/coral73.jpg' ,'atlpics/coral97.jpg' ,'atlpics/csid2.jpg' ,'atlpics/csid3.jpg' ,'atlpics/csid4.jpg' ,'atlpics/disaster.jpg' ,'atlpics/disaster2.jpg' ,'atlpics/hitw2.jpg' ,'atlpics/jsima.jpg' ,'atlpics/jsima2.jpg' ,'atlpics/npbcsid.jpg' ,'atlpics/npbcid2.jpg' ,'atlpics/npbcid3.jpg' ,'atlpics/swfmd.jpg' ,'atlpics/swfmd2.jpg' ,'atlpics/swfmd3.jpg');

var loader = new Array();
for(var i = 0; i < preload.length; i++){
   loader[i] = new Image();
   loader[i].src = preload[i];
}
</script>




<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ATL Disaster Recovery</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body>
</body>
</html>
Reply With Quote  
Join Date: Sep 2005
Posts: 674
Reputation: digital-ether has a spectacular aura about digital-ether has a spectacular aura about 
Rep Power: 5
Solved Threads: 39
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Practically a Master Poster

Re: PHP downloading?

  #8  
Jun 30th, 2007
When you send a HTTP Request to the URL, you get the HTTP Response Headers:

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
X-Powered-By: ASP.NET
Date: Sat, 30 Jun 2007 14:28:56 GMT
Content-Type: application/octet-stream
Accept-Ranges: bytes
Last-Modified: Fri, 29 Jun 2007 12:53:49 GMT
ETag: "1077a4894cbac71:3202"
Content-Length: 7111

Notice:

Content-Type: application/octet-stream
Accept-Ranges: bytes

It does not look like your server is not sending out the correct response headers. Its treats the PHP files as a download.

Is PHP even set up on the server? Have you tried other PHP scripts successfully?
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote  
Join Date: Jun 2007
Posts: 2
Reputation: paksender is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
paksender paksender is offline Offline
Newbie Poster

Re: PHP downloading?

  #9  
Jun 30th, 2007
guyz..i juz dont wanna create another thread.. bt, juz wanna say.. m searching for a php scripter/develoter to get help with or hav instant chat .. m interestied in scripting..(learning)
Last edited by paksender : Jun 30th, 2007 at 11:29 am.
Reply With Quote  
Join Date: Jun 2007
Posts: 13
Reputation: zachisevil is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
zachisevil zachisevil is offline Offline
Newbie Poster

Re: PHP downloading?

  #10  
Jun 30th, 2007
thank you so much for helping me paksender....

digital ether: That could quite possible be it.. I was on a windows server and I just switched it to unix but I dont know if it is completely switched right now. But the thing is it works on Internet Explorer so it is confusing.
and what do you mean set up php on the server... I am paying a hosting site and they should do that right? if IE works it should be fine though.....
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 9:38 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC