Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP erasing page on script errors

pfp script errors



6:58 pm on Jan 18, 2012 (gmt 0)

5+ Year Member

Im really new to PHP and have a webpage with html and PHP on it. I have a login script that works well. When I tried to modify the PHP code I removed a .md5 from in front of $Pass and the whole page disappears on testing on a local server. When I put .md5 back by page displays fine on the local test in browser.

My question: is it normal for php to erase a whole page of PHP and Html just because of one small piece of code missing in PHP?

I would think the PHP login would just not work not make the whole page disappear?

Any insight would be greatly welcome.


9:42 am on Jan 19, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

i don't think your page is erased. It seems that the code you removed generates some error and you just can't see it.

Try to enable your error reporting either in your page or your php.ini and see what's going on.

The md5() function creates one-way encryption. You may have remove it from your variable, but you still use the same variable for getting data from your database. I assume that your data are encrypted already or that the var generates the error because it has illegal data in it (special characters, sql commands or anything harmful in your code).


6:37 pm on Feb 9, 2012 (gmt 0)

5+ Year Member

thnaks for the reply. I dont understand though why my html wont display on the page. It seems like with any php page on my local server if I have a PHP error on a page with php and html, the whole page goes blank(completely white) with no html, images or anything at all displaying. IF I fix the PHP code error, everything reappears and my webpage looks fine.

So why wouldn't the html display?


7:05 am on Feb 10, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

the script stops executing on error
if your error reporting is set to off, you wont see any error on screen, just a blank page.

Featured Threads

Hot Threads This Week

Hot Threads This Month