Linux Apache Error Reporting
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 Business Learn more about hiring developers or apache show errors posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss apache display errors instead of 500 Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes php not showing errors in browser a minute: Sign up enable error reporting for apache server in linux up vote 0 down vote favorite I've created a php file in my localhost, but when I tried to test it I got this message from navigator :
Php.ini Error Reporting
Server error The website encountered an error while retrieving http://localhost/ex_exam_2012/affiche_note.php?cin=SY3422. It may be down for maintenance or configured incorrectly. normally apache server should show me where there is the probelm, in Windows I never got this problem, but this is my first time to test a php file in Linux, I Gooled about itg and I founs this question to enable displaying errors : PHP production server - turn on error messages So I changed this to values : error_reporting = ubuntu php.ini location E_ALL And : display_errors = On but I still have that probelm, how can I solve it ? php linux apache share|improve this question asked Apr 21 '13 at 17:22 user2280288 2728 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote That's just a generic message that tells you there was a problem. You need to look at Apache's error_log file to find out what happened. It's often found in /var/log/apache, but different Linux distributions sometimes change the location of this error log. share|improve this answer answered Apr 21 '13 at 17:37 user166560 I want apache to show me the error in navigator as in Windows –user2280288 Apr 21 '13 at 17:47 What's "navigator"? Are you talking about the web browser? It won't show you internal server errors like that in the browser (even in Windows). –user166560 Apr 21 '13 at 17:52 for example if there is some error in some variable declaration, when I test the page he shows me that there is a probelm with that variable and the line where there is the ptoblem –user2280288 Apr 21 '13 at 18:17 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you
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 php enable error reporting Us Learn more about Stack Overflow the company Business Learn more about hiring
Apache Loglevel
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Php.ini Error_reporting
Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP doesn't show any kind of http://stackoverflow.com/questions/16134000/enable-error-reporting-for-apache-server-in-linux errors [duplicate] up vote 18 down vote favorite 2 This question already has an answer here: 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 http://stackoverflow.com/questions/2648533/php-doesnt-show-any-kind-of-errors 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 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 78231222 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,35511744 T
Start 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 http://serverfault.com/questions/509559/change-php-error-reporting-to-hide-warnings-for-specific-site-only-debianubunt 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 http://php.net/manual/en/errorfunc.configuration.php a question and answer site for 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 error reporting 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 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 linux apache error 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 available' configuration, but this handles the amount of messages logged. Not the messages output by the php scripts. Manually adding sections in php.ini or apache2.conf or httpd.conf will also work. If it is possible. See also: http://www.php.net/manual/en/function.error-reporting.php apache-2.2 ubuntu php share|improve this question edited Feb 25 '15 at 5:13 masegaloeh 14.2k72566 asked May 21 '13 at 13:54 Redsandro 2201211 add a comment| 3 Answers 3 active oldest votes up vote 8 down vote accepted If you have access to the apache v
and Objects Namespaces Errors Exceptions 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 Apache module Session Security Filesystem Security Database Security Error Reporting Using Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions 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 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 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 Resource Types » « Installation PHP Manual Function Reference Affecting PHP's Behaviour Error Handling Installing/Configuring Change language: English Brazilian Portuguese Chinese (Simplified) French German Japanese Korean Romanian Russian Spanish Turkish Other Edit Report a Bug Runtime Configuration The behaviour of these functions is affected by settings in php.ini. Errors and Logging Configuration Options Name Default Changeable Changelog error_reporting NULL PHP_INI_ALL display_errors "1" PHP_INI_ALL display_startup_errors "0" PHP_INI_ALL log_errors "0" PHP_INI_ALL log_errors_max_len "1024" PHP_INI_ALL Available since PHP 4.3.0. ignore_repeated_errors "0" PHP_INI_ALL Available since PHP 4.3.0. ignore_repeated_source "0" PHP_INI_ALL Available since PH