Enabling Php Error Reporting Apache
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company apache php error reporting level Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs php enable error reporting ini_set Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, php enable error reporting on page just like you, helping each other. Join them; it only takes a minute: Sign up PHP doesn't show any kind of errors [duplicate] up vote 18 down vote favorite 2 This question already has an answer here: enabling php apache windows PHP errors NOT being displayed in the browser [Ubuntu 10.10] 9 answers I have a PHP server at home for development. It is running: Ubuntu 9.10 Apache 2.2.12 PHP 5.3.2-0.dotdeb.1 MySql 5.0.7-dev Currently the settings in the php.ini for displayiong errors are: display_errors = on error_reporting = E_ALL But I do not see any errors in my php script. Also very strange is that phpinfo() shows me this: display_errors Off I checked the php.ini
Enabling Mysql Apache
file, and restarted the apache server many times, but with no luck. Does anybody knows how this is possible? edit: When I localy set this: ini_set('display_errors', 'on'); I do receive errors. php apache share|improve this question edited Apr 15 '10 at 20:01 asked Apr 15 '10 at 19:55 iSenne 77231222 marked as duplicate by Joe, Mureinik, Carpetsmoker, tig, ProgramFOX Nov 29 '14 at 17:23 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. @user - No, that is a duplicate of this. This question is a year older and includes more details. –ArtOfWarfare Nov 29 '14 at 17:14 add a comment| 3 Answers 3 active oldest votes up vote 26 down vote accepted Is the display_errors parameter listed more than once in your php.ini file? If its defined more than once, the second instance of it will override the first. share|improve this answer answered Apr 15 '10 at 20:45 thetaiko 6,34511744 Tnx again for the clear thinking :) –iSenne Apr 16 '10 at 6:56 +1: I've run into this before and yet didn't think of it. Whoops. –Powerlord Apr 16 '10 at 14:51 +1: In Debian display_errors exist in 2 places in php.ini. One where i
Generators References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an
Enabling Perl Apache
Apache module Session Security Filesystem Security Database Security Error Reporting Using enabling php iis Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions php.ini error reporting Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Safe Mode Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's http://stackoverflow.com/questions/2648533/php-doesnt-show-any-kind-of-errors Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Credit Card Processing Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine http://php.net/manual/en/function.error-reporting.php Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation Keyboard Shortcuts? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search(current page) / Focus search box restore_error_handler » « error_log PHP Manual Function Reference Affecting PHP's Behaviour Error Handling Error Handling Functions Change language: English Brazilian Portuguese Chinese (Simplified) French German Japanese Korean Romanian Russian Spanish Turkish Other Edit Report a Bug error_reporting (PHP 4, PHP 5, PHP 7)error_reporting — Sets which PHP errors are reported Description int error_reporting ([ int $level ] ) The error_reporting() function sets the error_reporting directive at runtime. PHP has many levels of errors, using this function sets that level for the duration (runtime) of your script. If the optional level is not set, error_reporting() will just return the current error reporting level. Parameters level The new error_reporting level
Start here for a quick overview of the site Help Center Detailed answers to any http://serverfault.com/questions/509559/change-php-error-reporting-to-hide-warnings-for-specific-site-only-debianubunt questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for error reporting system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Change php error reporting to hide warnings for specific site only [Debian|Ubuntu] up vote 3 down vote php error reporting favorite 1 Imagine a couple of sites-enabled available from /etc/apache2/sites-available. (Only Debian-based distros work like this.) Is it possible to mute warning messages from php scripts from a specific site, without touching the actual htdocs? Normally there are a couple of solutions to achieve someting related: Add an error_reporting() directive e.g. error_reporting(E_ERROR); to the scripts executed. Set php_flags in .htaccess files like so: php_flag display_errors off Use ini_set inside scripts: ini_set('display_errors', 'Off'); ini_set('display_startup_errors', 'Off'); error_reporting(0); Prepend @ to functions that throw warnings or errors. Change php.ini to actually say error_reporting = E_ALL ^ E_WARNING display_errors = 1 However, these all mean touching the htdocs or having the change applied globally. Imagine the htdocs are mounted read-only. How would I suppress warnings (or notices) for certain sites only? I am assuming Debian/Ubuntu has a2ensite specific configurations for a reason and I am hoping I can alter those. There is a log_level directive in the example 'site availabl