Discussions















                                          
User   Password   remember     (register)  ?

How to show errors PHP ?


Back to questions answers.


guest-phpcode    (2008-10-12)
How to show errors PHP ?

By default, your server shouldn't show your php scripts errors as it would be an obvious security hole. To avoid to change the option in the php.ini file, this small code should allow you to see the errors in your scripts on your server :

ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
error_reporting(E_ALL);



Finally if you want to modify the php.ini file, this is where it happens :

; - display_errors = Off [Security]
; With this directive set to off, errors that occur during the execution of
; scripts will no longer be displayed as a part of the script output, and thus,
; will no longer be exposed to remote users. With some errors, the error message
; content may expose information about your script, web server, or database
; server that may be exploitable for hacking. Production sites should have this
; directive set to off.

; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On



guest-hoila    (2008-11-05 20:48:18)
Display errors PHP

ini_set('display_errors', 1);


... is enough.


ficgs
Suggestions

 Let php show all errors [php] [error] [display] [report]
snippets.dzone.com/posts/show/1718

 How To Display PHP Errors In My Script Code When Display_errors Is Disabled
www.wallpaperama.com/forums/how-to-display-php-errors-in-my-script-code-whe

 Show PHP errors - PHP - Snipplr
snipplr.com/view/3/show-php-errors/

 Show errors on form page - Support - PHP Form Processor - FormToEmail.com
formtoemail.com/support/show_errors_on_form_page.php

  error_reporting() does not show error - bytes
bytes.com/groups/php/536526-error_reporting-does-not-show-error

 PHP show error : php, show, errors
www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Da

 The Joyent Community / … make PHP-errors show?
discuss.joyent.com/viewtopic.php?id=239



ficgs
More suggestions

This is a collaborative page, you may change the order of these suggestions by registering, then clicking the icons before the titles.


 PHP doesn´t show errors / MySQL User and Host not set - Dev Articles
forums.devarticles.com/mysql-development-50/php-doesn-t-show-errors-mysql-u

 MAMP Forum • Information
forum.webedition.de/phpBB/viewtopic.php?f=2&t=523

 PHP Show Errors | Elegant Code
www.inkbird.net/php/php-show-errors

  Tabs & Settings dont show. Errors in logs. - SugarCRM Forums
www.sugarcrm.com/forums/showthread.php?p=162288

 how to capture and show error in oop php to user? - TalkPHP
www.talkphp.com/advanced-php-programming/3399-how-capture-show-error-oop-ph

 DevNetwork Forums • Information
forums.devnetwork.net/viewtopic.php?f=18&t=11516

 Entropy.ch Discussion Forums :: View topic - PHP doesn´t show errors / MySQL User and Host not set
www.entropy.ch/phpbb2/viewtopic.php?t=327

 Can I make PHP show error messages?
www.helpingwebmasters.com/free-hosting-general-support/can-i-make-php-show-

 How to display errors in PHP - Humanitarian-FOSS Project @ Trinity College, Hartford CT
www.cs.trincoll.edu/hfoss/wiki/How_to_display_errors_in_PHP

 Php Error .htaccess Solution
www.trap17.com/index.php/php-error-htaccess-solution_t44268.html

 No errors, even tho display errors is enabled. - PHP, Apache, MySQL, Windows : WampServer
www.wampserver.com/phorum/read.php?2,51492

  PHP on Mac doesn't show error messages - PHP - Web Development
forums.whirlpool.net.au/forum-replies-archive.cfm/317747.html

 Download Let php show all errors - Let php show all errors - override default config to show the errors - Softpedia
webscripts.softpedia.com/script/Snippets/Let-php-show-all-errors-26162.html

 Re: don't show error messages. how?
archives.postgresql.org/pgsql-php/2002-04/msg00068.php

 How to Enable PHP Display Errors - Free Hosting, Paid Hosting, Reseller Hosting & WebMasters Forum
byet.net/showthread.php?t=2170

  PHP Display Errors Error Reporting Debugging Etc | breakthrough design
www.gobdg.com/blog/2008/10/15/php-display-errors-error-reporting-debugging-

 CodeSnippets: Show Errors in PHP [php] [error] [debug]
codesnippets.joyent.com/posts/show/1032

 Display Errors | PHP Reference Book Blog
www.phpreferencebook.com/tag/display-errors/

 symfony framework forum: symfony 1.1 => SOLVED Problem with admin generator - Show error when edit fails
forum.symfony-project.org/index.php/m/63151/

 MDB2 do the first query, but show error in the querys before - Codewalkers
forums.codewalkers.com/pear-packages-47/mdb2-do-the-first-query-but-show-er

 freeCap CAPTCHA - Feature #3050: display errors off in captcha.php per default - TYPO3 Forge
forge.typo3.org/issues/show/3050

  How to make php show warnings & errors???? - PHP Development
www.justskins.com/forums/how-to-make-php-show-warnings-and-errors-3153.html

  Show Error when i enable Google Adsense Revenue Sharing v0.1 | Page 2 | Pligg CMS Forum
forums.pligg.com/bug-report/11244-show-error-when-i-enable-google-adsense-r

 Force to show Error 404 -page whit PHP - SitePoint Forums
www.sitepoint.com/forums/showthread.php?t=543896

 PHPXRef 0.7 : Mambo 4.6.5 : Variable Reference: $showerrors
mambo-developer.org/api/_variables/showerrors.html



Response  
  Smilies

Guest name   (optional)       Register for more options.



Trackbacks : If you talked about this article in your blog or website, you may instantly get a backlink 
  There's no trackback at the moment.









 

FICGS message




Discussions



 


Q / A : You may write any question (and answer) in 10 languages :


 

Buttons: Facebook, Twitter, MySpace, Google, Technorati, Yahoo buzz... Ficgs Facebook Myspace Twitter Google Technorati Stumble upon Delicious Digg Yahoo buzz Wikio Furl Reddit Linkedin Squidoo Newsvine Yahoo My Web Blogmarks Comments Blinklist Email

Write upside down !
(works with Twitter, Facebook, MySpace, Youtube, MSN, Yahoo, Bebo, Hi5...)






Tip of the day :

Protect your files on Megaupload or Rapidshare, and promote your website !

You may use this free tool : Protect your links




FICGS is also a Free Internet Correspondence Games Server.

Here you can play Chess, Go & Poker Texas Holdem online for free in rated class tournaments and a unique world championship.

Free Internet Chess & Go Server


Feel free to link to FICGS :