homepage Welcome to WebmasterWorld Guest from 54.167.173.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP erasing page on script errors
pfp script errors
roclimb




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

Hi,
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.
Thanks

 

omoutop




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

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).

roclimb




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

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?

omoutop




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved