0

I just get some troubles with my php files. I host my website from my computer and I get an index.html file which link to other php files for my website, in firefox when I go from the index files to php files its working fine but with chrome when I go to the php files links I just get the source of the php file display on the webpage. Why?

this is what my webpage looks like

6
  • what if you try a simpler php snippet tag like <?php (new line) ?> Also , I see you're going to a www address, probably you're not running the web server yourself. You could contact your web provider and ask them if they even support php, and if they say yes, then show them what's going on and ask them what's happening
    – barlop
    Jul 17, 2016 at 13:04
  • What webserver technology are you using? Apache? IIS?
    – Burgi
    Aug 9, 2016 at 11:01
  • @barlop the DNS record for that domain is pointing to a domestic IP address in France. It is highly likely the OP is self-hosting.
    – Burgi
    Aug 9, 2016 at 11:15
  • @Burgi By "domestic" do you mean only one IP allocated, rather than a block? And suppose he was self hosting and he's in france,and ran a small business? i'm sure most small businesses don't use multiple public IPs. (though granted most wouldn't self host). Can you elaborate on domestic - how you concluded that, and why that'd suggest to you not self hosting. He does say " I host my website from my computer"
    – barlop
    Aug 9, 2016 at 12:37
  • @barlop it appears to belong to an ISP that provides broadband to homes. who.is/dns/alexandreamiel.in
    – Burgi
    Aug 9, 2016 at 12:42

1 Answer 1

0

Sounds like a problem with the configuration of your webserver. Perhaps you have some server-side code that responds to different browsers in different ways? To confirm, you're accessing your server via http://localhost/... and not via file:///...?

[EDIT] If you have configured your domain www.example.com, could it be that Firefox is redirecting you from example.com to www.example.com automatically, whereas Chrome isn't? In other words, could there be different behaviour from your server depending on whether the user accesses via these two different URLs? I think that Firefox may do this redirection automatically if you don't explicitly type the http://.

2
  • 1
    Look at the first tab, it says www. so it's not file:/// And to say it's a problem with the configuration of his web server doesn't tell him what to do so isn't very useful especially not as any kind of answer. And it assumes it's his web server, which isn't necessarily the case, especially when it's http://somedomainotherthanlocalhost
    – barlop
    Jul 17, 2016 at 13:02
  • 1
    "I host my website from my computer"...
    – jdpipe
    Jul 17, 2016 at 23:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .