Jump to content

Firefox displaying PHP source code??


spikypunker

Recommended Posts

Currently testing a site thats almost built, am going to be including php on a sidebar on all pages so thought it'd be easier to just make all pages .php, however when i upload and try and view, in Firefox it just displays the source code on screen! It does it on other computers, but works fine in IE! ARRGGGHH

 

Anyone have a clue?

 

Kind Regards, Chris

Link to comment
Share on other sites

wow, that was interesting. i got code too. weird man just weird. are you sure your host supports php? idk man.

 

Well thats the thing, there's not any php on the page yet! I've done this before, save the page as a .php page because i know that i'll be inserting php elements later in the build and never had a problem before!

 

It works fine in IE, but not firefox! grr

 

http://www.thebookhive.co.uk

Link to comment
Share on other sites

Well it's hosted with 123reg so must support it, but it could be disabled? Thier phoneline is closed today so will have to speak to them on monday. But it still kinda doesnt make sense seeing that it works in IE?

 

YA KNOW WHAT, i'm starting to like the new IE over Firefox dammit....

 

Anyone else have any ideas?

 

Thanks for your help so far dudes, peace

Link to comment
Share on other sites

yes i do have another idea. ie is evil and we don't want to lose you to the dark side.

 

Well it's hosted with 123reg so must support it, but it could be disabled? Thier phoneline is closed today so will have to speak to them on monday. But it still kinda doesnt make sense seeing that it works in IE?

 

YA KNOW WHAT, i'm starting to like the new IE over Firefox dammit....

 

Anyone else have any ideas?

 

Thanks for your help so far dudes, peace

Link to comment
Share on other sites

I had a similar problem and it turned out to be a issue with where dreamweaver thought the file was regardless of where it actually was. I ended Up having to move the files into a seperate folder inside Dreamweaver and letting it update the pointers and then I moved back updating the pointers again, then it worked fine. Hope this helps...

Link to comment
Share on other sites

Riiiiight ok, so the server has PHP disabled and Firefox and the others display as text, but IE tries to display it as HTML right.

 

So i'm gonna have to contact hosters on monday? I've only just started this project and havent talked to them yet, the client arranged all that side of things this time.

Link to comment
Share on other sites

Riiiiight ok, so the server has PHP disabled and Firefox and the others display as text, but IE tries to display it as HTML right.

 

So i'm gonna have to contact hosters on monday? I've only just started this project and havent talked to them yet, the client arranged all that side of things this time.

ah indeed. i wont do an account on another host. either i host it or sell the files. wont fool around with setting up on another host or any of that jaz. because when it fouls up down the road they want you to come in and play tech support for free. i feel for ya.

Link to comment
Share on other sites

Yeah but i have to set up some MySql stuff and they wouldnt have a clue! lol, na but it's all good, am trying to make my way in the freelance world so therefore will be as helpfull as possible and do as much as i can...then charge for it haha.

 

Lol, but yeah, i do have my own unlimited space and when i'm getting work through the new design website i will be telling my clients I prefer to host for them, but this one was a guy setting up a company and already had the domain and space.

 

But anyway thanks for the help, looks like its just the hosters disabling PHP! Probably a feature that wasnt included in the base package, anyway at least it's not my fault!

 

 

Cheers dudes!

Link to comment
Share on other sites

just add this at top?

 

<?php 

here

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTNL 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>

 

Try that :D

 

edit: take the php stuff off or add code there and yes if you missed that it IS your fault

Link to comment
Share on other sites

Riiiiight ok, so the server has PHP disabled and Firefox and the others display as text, but IE tries to display it as HTML right.

 

So i'm gonna have to contact hosters on monday? I've only just started this project and havent talked to them yet, the client arranged all that side of things this time.

you host is only a monday to friday gig?  man, change that in a hurry before things really get rolling.  you need that customer support 24/7.

 

i concur with the other comments .. check .htaccess and such.

Link to comment
Share on other sites

Na id taken all tags out just to see why it wasnt working.

 

The client chose their own package before they contacted me for design and build. They're with 123-reg, and yes it's only mon-fri phone support. I phoned them up and basically PHP isnt included in their basic package, so i had to advise my client they need to upgrade for an extra £2.50 a month!

 

Cheeky

 

Link to comment
Share on other sites

  • 9 months later...

hi spikypunker,

 

in the httpd.conf file, look for the "IfModule mime_module section" and at the end of this section add the following line :

 

AddType application/x-httpd-php .php

 

Worked for me so hope this help you.

 

Here is the section for my conf :

 

<IfModule mime_module>

    #

    # TypesConfig points to the file containing the list of mappings from

    # filename extension to MIME-type.

    #

    TypesConfig conf/mime.types

 

    #

    # AddType allows you to add to or override the MIME configuration

    # file specified in TypesConfig for specific file types.

    #

    #AddType application/x-gzip .tgz

    #

    # AddEncoding allows you to have certain browsers uncompress

    # information on the fly. Note: Not all browsers support this.

    #

    #AddEncoding x-compress .Z

    #AddEncoding x-gzip .gz .tgz

    #

    # If the AddEncoding directives above are commented-out, then you

    # probably should define those extensions to indicate media types:

    #

    AddType application/x-compress .Z

    AddType application/x-gzip .gz .tgz

 

    #

    # AddHandler allows you to map certain file extensions to "handlers":

    # actions unrelated to filetype. These can be either built into the server

    # or added with the Action directive (see below)

    #

    # To use CGI scripts outside of ScriptAliased directories:

    # (You will also need to add "ExecCGI" to the "Options" directive.)

    #

    #AddHandler cgi-script .cgi

 

    # For type maps (negotiated resources):

    #AddHandler type-map var

 

    #

    # Filters allow you to process content before it is sent to the client.

    #

    # To parse .shtml files for server-side includes (SSI):

    # (You will also need to add "Includes" to the "Options" directive.)

    #

    #AddType text/html .shtml

    AddType application/x-httpd-php .php

    #AddOutputFilter INCLUDES .shtml

</IfModule>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.