If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Help, Webpage is crashing on localhost

If I view my page as a .html file on my computer, the layout looks fine and runs fine. If I view the file on the localhost as .html file it is also fine, but if I load the page as a .php file on the localhost server then the page crashes (extreme lag)and my web layout is all jumbled on the page?
What should I do?

Does it matter if my PHP code is embedded in a html document. Since the localhost runs the .html file without crashing or having issues? Or does the file have to have a .php extension to run a PHP driven website?

Does it matter if my PHP code is embedded in a html document. Since the localhost runs the .html file without crashing or having issues? Or does the file have to have a .php extension to run a PHP driven website?

Again, if you're not going to show us your htaccess settings or source code how are we supposed to help?

Yes you can put php code in a html page but your server must be configured to run html pages as php.

You don't seem to know a lot about this so I can't help but wonder if your php is incorrectly setup or if you have code that is causing an error. Seeing as you refuse to show us there is not much we can really say to help you.

Make sure that the Apache module on your web server is properly loaded - green light blinks or whatever your Wamp Stack gives as feedback. Problems with the web server usually come up due to conflict with Skype which hogs port 80. Turn off Skype before starting up your Wamp Stack Software.

I forgot about skype using port 80. I remember being annoyed by it moons ago but forgot about it. I always wondered why they chose to use a http port for TCP connections that are not http traffic? Seems a bit odd doesn't it.

I ran into the same problem years ago when I was starting out. My suggestions go along with what others have said..

1.) check your configuration to assure proper setup.
2.) disable all the extra BS that is running if it is not needed while you are testing (yahoo, etc are resource hogs)
3.) Port conflict - That might be a problem, but if you're looking at files on the same machine via a web browser the port shouldn't matter as the browser is looking inside the network.

If I view my page as a .html file on my computer, the layout looks fine and runs fine. If I view the file on the localhost as .html file it is also fine, but if I load the page as a .php file on the localhost server then the page crashes (extreme lag)and my web layout is all jumbled on the page?
What should I do?

Would you send me that .html file so that I can check for you.
Before you convert it to .php file, you should define php syntax at the top of the file itself.
Eg.
<?php