Bluehost.com Web Hosting $6.95

Re: [PHP] Shouldn't script errors show in my browser?

This is a discussion on Re: [PHP] Shouldn't script errors show in my browser? within the PHP General forums, part of the PHP Programming Forums category; On Fri, 17 Oct 2003 11:29:41 -0400, you wrote: >I hope this question is not too stupid! ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2003
David Otton
 
Posts: n/a
Default Re: [PHP] Shouldn't script errors show in my browser?

On Fri, 17 Oct 2003 11:29:41 -0400, you wrote:

>I hope this question is not too stupid! When I have an error in my script,
>it seems to me that the web server, or in my case the php CGI module I am
>using for testing, should send something back to my browser displaying an
>error message. Instead, I can write any garbage I would like in my php
>script and the browser just shows me a blank page. Is this because I am
>running php as a CGI module?


Try cranking your error reporting level up in php.ini

http://uk2.php.net/manual/en/ref.err...rror-reporting

Check the display_errors directive while you're at it. Don't forget to
restart the webserver.

Also, sometimes errors don't show because they're embedded in HTML.

Eg

<font face="<? echo($fake_variable); ?>">

would return

<font face="<br /><b>Notice</b>: Undefined variable: fake_variable in
<b>file.php</b> on line <b>1</b><br />">

And you'll have to examine the un-parsed HTML to find the error.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:36 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0