Site Suggestions Post site suggestions and comments

HALP Server spitting out PHP, not encoding it as HTML before pushing to client

Thread Tools
 
Search this Thread
 
Old September-27th-2007, 09:09 AM
  #1  
Tech/How-To/Northeast Mod
Thread Starter
 
_Kansei_'s Avatar
 
Join Date: Feb 2006
Location: Rochester, New York
Posts: 2,517
_Kansei_ is on a distinguished road
HALP Server spitting out PHP, not encoding it as HTML before pushing to client

Somethin is up with the PHP setup on the server, as the situation in the subject line keeps happening.

Different browsers, different operating systems, different computers, all the same symptom. Firefox won't just display PHP code, so it spits it out as a file download. This happens when I click basically anything on the site, including sometimes submitting a new post or thread. --but obviously it doesn't happen all the time.
_Kansei_ is offline  
Old September-27th-2007, 09:51 AM
  #2  
Tech/How-To/Northeast Mod
Thread Starter
 
_Kansei_'s Avatar
 
Join Date: Feb 2006
Location: Rochester, New York
Posts: 2,517
_Kansei_ is on a distinguished road
It took four tries just to get back to this thread lol

see attached screenshot. It took over 50 clicks (I stopped counting) to get the photo attached.

If no one else here is a PHP programmer, could someone let me see the output of phpinfo(); so I can do some diagnostics myself?
Attached Thumbnails HALP Server spitting out PHP, not encoding it as HTML before pushing to client-php.jpg  
_Kansei_ is offline  
Old September-27th-2007, 10:17 AM
  #3  
Spam Czar!!
 
KrayzieFox's Avatar
 
Join Date: Aug 2004
Location: Cedar Falls, Iowa
Posts: 2,315
KrayzieFox is on a distinguished road
Dude I dunno what's going on with you but I'm not having any problems at all.
KrayzieFox is offline  
Old September-27th-2007, 01:18 PM
  #4  
Registered User
 
sumo_Bob's Avatar
 
Join Date: Mar 2007
Location: Birmingham, AL
Posts: 378
sumo_Bob is on a distinguished road
happens on occasion, to many php based pages, dunno what causes it.... Try hitting CRTL + F5, and see if that solves it.
sumo_Bob is offline  
Old September-27th-2007, 02:20 PM
  #5  
Registered User
 
jsusanka's Avatar
 
Join Date: Aug 2007
Posts: 66
jsusanka is on a distinguished road
that is usually a misconfiguration with the web server - doesn't know how to handle files with the php extension. it is either that or php extensions to the web server are not installed.

this is site is running apache on linux so make sure you have the following line in your config file for apache

DirectoryIndex index.php

also make sure the config file is loading php module. the modules should be a directory of of /etc/ called apache2/mod* or /etc/httpd/mod*

anyway hope this helps.
jsusanka is offline  
Old October-2nd-2007, 04:00 PM
  #6  
Administrator
 
IB ATEST's Avatar
 
Join Date: Jul 2007
Posts: 16
IB ATEST is on a distinguished road
Apache was crashing on one of the two web servers due to a problem with one of the modules. As the process would die, the connection would close. The crash apparently happened early enough in the connection process that Apache was not able to send content type headers to the browser. (Usually the server will say, "This is an HTML file" in a way that the browser understands.) Because it didn't get that header info, it would revert to its internal handler, which is very simple - it looks up the extension (in this case .php) to figure out what program to open it with.

You don't actually get sent the PHP source code, but it looks like you do because your browser is offering to open the content (in this case a zero-length file) for you in a text editor.

In any case, it should be fixed now.
IB ATEST is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Cone420
Mazda3/Mazdaspeed3
3
January-14th-2009 07:08 PM
chiefmg
Off-Topic
1
October-11th-2007 08:46 AM
misbehave
3rd Gen Protege/MazdaSpeed/P5/MP3
2
September-3rd-2003 12:32 AM
pr0tege5
3rd Gen Protege/MazdaSpeed/P5/MP3
18
May-4th-2002 07:53 PM
mazdaspeedwest
Site Suggestions
5
October-19th-2001 11:26 AM

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


Quick Reply: HALP Server spitting out PHP, not encoding it as HTML before pushing to client



All times are GMT -5. The time now is 11:09 PM.