How To Turn On Php Error Reporting In Ubuntu
Contents |
ago mjwittering Like me you maybe using an Ubuntu computer running Apache, MySQL and PHP to develop websites. When ubuntu php error reporting not working developing it is important to see error messages to debug your
Apache Display Errors
code. On occasion I have installed PHP on to Ubuntu computers and by default errors are not
Apache Display Errors Instead Of 500
displayed. As this is not a production web server I updated the php.ini file to display errors. In this post I explain how I updated the php.ini
Enable Php Error Reporting
to display error messages and aid debugging. Open php.ini Start by opening a new terminal window to open the php.ini file. Modifying the php.ini will allow you to tunes the setting to enable more descriptive error messages, logging, and better performance. Enter the following command to begin editing php.ini. This will require the sudo command and apache php error log therefore administrator privileges. sudo nano /etc/php5/apache2/php.ini Display Errors Now scroll down through the file until you find the following line. display_errors = Off Once you have found the display_errors line replace the parameter 'Off' with 'On'. Once you have made the swap save the file and then exit the editor. display_errors = On Restart Apache Now that you have made the change to the php.ini file you need to restart the Apache web server to effect the change. To do this enter the command below into your terminal window to restart the service. Once the service has restarted you will be able to see error message in your PHP scripts instead of blank white pages. sudo /etc/init.d/apache2 restart Links How To Display PHP Errors In My Script Code When Display_errors Is Disabled wallpaperama.com Ubuntu Tips: How do you display PHP error messages? by mjwittering is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Ask Ubuntu BitBucket Delicious DigitalOcean Dribbble Facebook Flickr LinkedIn Twitter
sure you're ubuntu php ini location enabling this only on development server. It's very ubuntu php error log common for any developers to make a mistake while developing, which will php.ini error_reporting result in White Screen of Death (WSOD). WSOD is normally because PHP error reporting is turned Off. Here's how you http://matthewwittering.com/blog/ubuntu-tips/php-error-messages.html can enable error reporting using PHP.ini file: Open PHP.ini file located at "/etc/php5/apache2/php.ini" using your favorite editor Find and update following variables:error_reporting = E_ALL
display_errors = On If you don't have access or write permission to php.ini, you can still http://yogeshchaugule.com/blog/2015/configure-phpini-show-errors-ubuntu enable error reporting using index.php file: Open index.php file located at "/project-root/index.php" using your favorite editor Add below line of code after the first opening PHP tag:error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE); Reference: Blank pages or "white screen of death" (WSOD) php.ini Error Settings How to enable displaying php errors on site Tags:Drupal 7DebuggingUbuntuPHP ychaugule's blog Add new comment Monthly archive October 2016 (1) June 2016 (1) April 2016 (1) March 2016 (1) November 2015 (1) October 2015 (2) July 2015 (1) May 2015 (2) January 2015 (1) September 2014 (1) 1 of 3 ›› Search Loading blog PHP.it contact Drupal.org Linked.In about.me Twitter.com Facebook Add me to Circle Copyright © 2012-2017, Yogesh Chaugule. back up ↑
4 PHP is a Server Side Language 5 10 Cool Things To Do With PHP About.com About Tech PHP/MySQL Troubleshooting PHP Error Reporting Turning on Error Reporting in PHP Gehringj/E+/Getty Images By Angela http://php.about.com/od/troubleshooting/qt/php_error_reporting.htm Bradley PHP/MySQL Expert Share Pin Tweet Submit Stumble Post Share By Angela Bradley If https://www.youtube.com/watch?v=UcK8c1EgBLI you are running into a white page or some other PHP error, but you have no clue what is wrong, you should consider turning on PHP error reporting. This will give you some indication of where or what the problem is. This is a good first step to solving your problem. Here is how to turn php error on PHP errors:To display error messages caused by your PHP script you can include these lines of code:ini_set('display_errors',1); error_reporting(E_ALL);Another way to do it is to edit your php.ini file and include this option:error_reporting = E_ALLTo turn error reporting off for a single document, include this line:error_reporting(0);Read more in depth about different types of error reporting available [view]Help Out! Have a better way... share your code here... or view other's suggestions! php error reporting Show Full Article Related Loading a Blank White Screen Instead of Your PHP Page? Here's How to Fix It How to Tell Which Version of PHP You Have PHP Code Showing Instead of Running Why Don't I See My Code When I View Source? More from the Web Powered By ZergNet Sign Up for Our Free Newsletters Thanks, You're in! About Today Electronics & Gadgets PHP/MySQL You might also enjoy: Healthy Eating Health Tip of the Day Sign up There was an error. Please try again. Please select a newsletter. Please enter a valid email address. Did you mean ? Thank you,,for signing up! PHP/MySQL Learn PHP - PHP Tutorial - Learn PHP Code Learn MySQL with free online tutorials Learn PHP - Advanced PHP - PHP Tutorial PHP & MySQL - Use PHP with MySQL - MySQL from PHP GD Library - PHP GD Library - GD Library Graphics PHP Functions - PHP Code - PHP Commands PHP and MySQL Security PHP and MySQL Basics - PHP and MySQL Info - PHP and MySQL Information Tools and Resources for PHP or MySQL. Troubleshoot PHP Errors - Fix PHP Errors - PHP Error Help Programming Glossary - Programming Terms - Programming Refrence About Tech Follow us: We deliver.
Du siehst YouTube auf Deutsch. Du kannst diese Einstellung unten ändern. Learn more You're viewing YouTube in German. You can change this preference below. Schließen Ja, ich möchte sie behalten Rückgängig machen Schließen Dieses Video ist nicht verfügbar. WiedergabelisteWarteschlangeWiedergabelisteWarteschlange Alle entfernenBeenden Wird geladen... Wiedergabeliste Warteschlange __count__/__total__ PHP - Display all errors PHP on Ubuntu 14.04 Ambar Hasbiyatmoko AbonnierenAbonniertAbo beenden8585 Wird geladen... Wird geladen... Wird verarbeitet... Hinzufügen Möchtest du dieses Video später noch einmal ansehen? Wenn du bei YouTube angemeldet bist, kannst du dieses Video zu einer Playlist hinzufügen. Anmelden Teilen Mehr Melden Möchtest du dieses Video melden? Melde dich an, um unangemessene Inhalte zu melden. Anmelden Statistik 211 Aufrufe 1 Dieses Video gefällt dir? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 2 0 Dieses Video gefällt dir nicht? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 1 Wird geladen... Wird geladen... Wird geladen... Die Bewertungsfunktion ist nach Ausleihen des Videos verfügbar. Diese Funktion ist zurzeit nicht verfügbar. Bitte versuche es später erneut. Veröffentlicht am 23.04.2016in windows i can see the PHP errors, but in ubuntu, i can't see ..to fixing, you must edit php.ini and set display_errors = On- sudo vi /etc/php5/php.ini- find display_errors and set : On- save and restart apache (sudo service apache2 restart) Kategorie Menschen & Blogs Lizenz Standard-YouTube-Lizenz Mehr anzeigen Weniger anzeigen Wird geladen... Anzeige Autoplay Wenn Autoplay aktiviert ist, wird die Wiedergabe automatisch mit einem der aktuellen Videovorschläge fortgesetzt. Nächstes Video Install LAMP Stack (Linux, Apache, MySQL, PHP) in Ubuntu 15.10 - Dauer: 9:34 Brad Traversy 8.347 Aufrufe 9:34 Tutorial Instalar Apache + MySQL + PHP + PHPMyAdmin Ubuntu 12.04.1 completo - Dauer: 12:26 CellSnake007 118.305 Aufrufe 12:26 How to Enable or disable PHP Errors - UBUNTU - Video Tutorial - Dauer: 6:31 Skndr Bajwa 127 Aufrufe 6:31 Codeigniter tutorial - Upload file with codeigniter framework on Centos 7 - Dauer: 12:24 Ambar Hasbiyatmoko 150 Aufrufe 12: