Php Turn On Error Reporting Ini_set
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 error reporting php ini about Stack Overflow the company Business Learn more about hiring developers or posting ads
Php Display_errors
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow
Php Error Types
is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How do I get PHP Errors to display? up vote 679 down
Php Error Reporting Not Working
vote favorite 204 I have checked my PHP ini file and display errors is set and also error reporting is E_ALL. I have restarted my apache web server. I have even put these lines at the top of my script and it doesn't even catch simple parse errors. For example, I declare variables with a "$" and I don't close statements";". But all my scripts show a blank page on php hide errors these errors, but i want to actually see the errors in my browser output. error_reporting(E_ALL); ini_set('display_errors', 1); What is left to do? php error-reporting share|improve this question edited Mar 9 at 7:16 Maninderpreet Singh 1,7111524 asked Jun 27 '09 at 19:09 Abs 13.4k68209356 3 I've yet to nail down exactly why this works sometimes and not others, but for anyone wanting to quickly toggle errors in a php script (or enable them via a $_REQUEST parameter) these two lines will work most of the time. –brandonscript Oct 28 '13 at 20:15 well you can see details of the error by enabling xdebug from php ini file. –jewelhuq Jan 13 at 10:14 add a comment| 13 Answers 13 active oldest votes up vote 1359 down vote accepted This always works for me: ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); However, this doesn't make PHP to show parse errors - the only way to show those errors is to modify your php.ini with this line: display_errors = on share|improve this answer edited Oct 23 '15 at 12:24 tleb 1,173721 answered Jan 29 '14 at 11:25 Fancy John 14k2915 4 why is this not the best answer? –özg Jul 4 '14 at 11:52 13 @özg Becaus
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 php display errors off About Us Learn more about Stack Overflow the company Business Learn more about php error message hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss php hide warnings 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 a minute: Sign up error_reporting(E_ALL) does not produce http://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display error up vote 24 down vote favorite 3 This is my php script- ' ;. $thisdoesnotexist); ?> Which obviously should show something if it were to be executed. All I see is an empty page. Why is error_reporting(E_ALL) not working? ' ;. $thisdoesnotexist); ?> Does not help either. All I get is an http://stackoverflow.com/questions/16933606/error-reportinge-all-does-not-produce-error empty page. I've been to php.ini and set display_errors = On and display_startup_errors = On. Nothing happens. php share|improve this question edited Jun 5 '13 at 7:20 asked Jun 5 '13 at 7:07 Samik Sengupta 56761333 How is display_errors setup? –PeeHaa Jun 5 '13 at 7:09 check display_errors setting –Roman Newaza Jun 5 '13 at 7:09 Does not help, as I've reflected in my question edit. –Samik Sengupta Jun 5 '13 at 7:11 You can check your syntax first by running php -l
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies http://stackoverflow.com/questions/5438060/showing-all-errors-and-warnings of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss 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 a minute: error reporting Sign up Showing all errors and warnings up vote 140 down vote favorite 33 UPDATE 2: I have now removed the following from the .php file: I have set display_erros in php.ini as follows: display_errors = On error reporting is set to the following in php.ini error_reporting = E_ALL | E_STRICT After restarting apache, I still get php turn on no errors/warnings. UPDATE 1: I have changed error_reporting in php.ini from: error_reporting = E_ALL & ~E_DEPRECATED to error_reporting = E_ALL | E_STRICT After which I restarted apache, e.g. /etc/init.d/apache2 restart But the page will still not display errors/warnings of any kind. ORIGINAL QUESTION: The following script is generating an warning because the $err being inside the if statement. Why is this warning not being displayed on the php page in a web browser? I have to look at apache logs to see the warning. Also, if I delibarately change the "insert into" to "delete into", it does not display an error on the php page. Why are the errors not displaying on the actual php page?