AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

How do I get PHP errors to display - PHP error_reporting() - Showing all errors and warnings



The error_reporting() function specifies which errors are reported.
PHP has many levels of errors, and using this function sets that level for the current script.

Example: How to fix.
<?php
// Turn off error reporting
error_reporting(0);

// Report runtime errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Report all errors
error_reporting(E_ALL);

// Same as error_reporting(E_ALL);
ini_set("error_reporting", E_ALL);

// Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);
?>

How to solve it?
Display errors could be turned off in the php.ini or your Apache config file.
You can turn it on in the script:
error_reporting(E_ALL);
ini_set('display_errors', 1);

Example: I was able to get all error via below code:
<?php
ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(-1);
?>





php errors
How do I get PHP errors to display - PHP error_reporting() - php tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Home
PHP Introduction
PHP Install
PHP Syntax
PHP Variables
PHP Echo and Print
PHP Data Types
PHP String Function
PHP Constants
PHP Operator Types
PHP If Else and Elseif
PHP Switch
PHP While Loops
PHP Loop For Do Foreach
PHP Array
Convert Array to String
PHP Function
PHP GET and POST
PHP Date/Time Functions
PHP Login
PHP Delete Element
PHP eregi_replace()
PHP mysql_query()
PHP Errors to Display
PHP Loop For Do Foreach

PHP forms
PHP Form Example
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Warning: mysqli_fetch_array() expects pa...
HTML div style property...
CSS bold, Style, Property...
CSS background image size to fit screen ...
PHP convert array to string with commas...
PHP array to comma separated string with...
How to put text in image HTML...
How to insert text in html code using ja...
PHP array_key_exists() Function...
Bootstrap Templates...
Bootstrap Text...
Bootstrap Accordion...
Bootstrap Scrollspy...
Bootstrap Carousel...
Bootstrap Modal...
Bootstrap Responsive Layout...
Bootstrap Fluid Layout...
Bootstrap Fixed Layout...
Bootstrap Grid...
Bootstrap Input...