Hello everyone. First post...

I have a strange problem... used to be that Internet Explorer 6 would open PHP files that I had stored on my local machine (which is not a server). I would usually get some kind of "pop-up" warning from IE asking me if I wanted to view the file but then after that I could view the file just fine (minus the actual scripting stuff of course).

Now, whenever I try to open one of these PHP files with IE, I get the hourglass for 2 seconds and then nothing. No IE window, no error. Nothing.

IE will open up on its own and I can browse PHP files on the Internet all day long with no problems. But the ones on my local machine no longer open, where before they would even though I am not running any kind of server technology.

IE will also open HTML and CSS files on the local machine with no problem, just not PHP. Firefox has no issues at all with any files.

I'm running XP SP2 on a very stable machine that is rarely allowed internet access and is very strongly protected with Norton AV, ZoneAlarm and AdAware. I only use IE to check the websites that I personally build so little chance of picking up something nasty on the Net.

I've even tried reloading an older Ghost file that I *knew* didn't exhibit this problem but it does it even with that which is even more peculiar.

Any ideas?

Without some sort of server running, I don't see why it would open a php file, let alone parse it. You should be opening php files that reside on your local system via a text editor.

Thanks for the response.

Actually I build the pages in Dreamweaver and/or Notepad but I need to see how they render (quickly) on my local machine in both Firefox and IE. IE used to do this with a pop-up warning but won't do anything now. Firefox *does* do this with no problem. It's not parsing any of the scripting but it does show the HTML elements in the PHP page so that I can see how the page is going to display visually in browsers.

I work on quite a few sites at the same time and don't want to install a server technoology on my local machine if I don't have to. I just want to create, click and view instantaneously. In Dreamweaver, there is a way to view the pages instantly, but again the IE option doesn't cooperate where Firefox does. It *used* to work so I know it's capable. Just need to figure out what's wrong.

I just found this by browsing in google: You need to change the .php file settings through regedit. Go to start --> run --> regedit --> under HKEY_CLASSES_ROOT, right click on .php file and select New String value. Name it Content Type. Then double click Content Type in the right panel of the window and add text/html under Value data. Hope this helps you. It sure has helped me. Good luck!

commented: Thank you save my day! +8

Thank you for the reply, but if you take a closer look you will see that the original post date is August 2005 :).

Yeah! it works :D

Hi Iro, if you're still around on Daniweb and hope you'll bump on this on Google also, you reply a very old thread. But the solution still works and helps a lot. Thanks buddy.

Still works:) keeping the trend of replying to old topics ( 1337 )

I recently had the same problem too, I could view my .php files in any browser via Dreamweaver but recently it stopped working. A simple fix that has saved me a hell of a lot of time, thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.