Enable Php Error Ubuntu
Contents |
ago mjwittering Like me you maybe using an Ubuntu computer running Apache, MySQL and PHP to develop websites. When enable php error logging htaccess developing it is important to see error messages to debug
Enable Php Error Reporting
your code. On occasion I have installed PHP on to Ubuntu computers and by default errors are
Enable Php Error Display
not 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 Error File
php.ini 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 apache display errors command and 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 Dribbbl
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 turn on error reporting php ubuntu hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask apache display errors instead of 500 Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. apache php error log Join them; it only takes a minute: Sign up PHP errors NOT being displayed in the browser [Ubuntu 10.10] up vote 44 down vote favorite 11 I'm new to PHP and the whole LAMP stack but I've managed to http://matthewwittering.com/blog/ubuntu-tips/php-error-messages.html get it up and running on my Ubuntu 10.10 system. Everything seems to be working with the exception of error reposting in the browser which I just can't seem to get working (and which I can't work without!). I've read a number of article and other threads which indicate that the following values should be applied in the file /etc/php5/apache2/php.ini: display_errors = On display_startup_errors = On I've restarted apache2 and even restarted my computer but for the life http://stackoverflow.com/questions/5050426/php-errors-not-being-displayed-in-the-browser-ubuntu-10-10 of me I just can't get it working. I've even tried using phpinfo() function which reports that these settings are as I've set them so I know it's picking up the correct configuration file but nothing! Any help would be welcome. php apache apache2 lamp ubuntu-10.10 share|improve this question edited Oct 7 '11 at 16:20 user212218 asked Feb 19 '11 at 11:07 JLove 6781930 What does phpinfo() say about Local value of these settings? What is error_reporting value? How do you check for errors? –Your Common Sense Feb 19 '11 at 12:09 Are you expecting an error or otherwise forcing an error to occur so that you can test this? If so, how are you doing this? Also, what is the exact version of PHP you are running? Be sure to restart apache every time you change a config in PHP. (Restarting the machine is not necessary.) –bogeymin Feb 19 '11 at 12:15 possible duplicate of PHP doesn't show any kind of errors –ArtOfWarfare Nov 29 '14 at 17:14 add a comment| 9 Answers 9 active oldest votes up vote 39 down vote Don't just enable the first occurrence of display_errors in the php.ini file. Make sure you scroll down to the "real" setting and change it from Off to On. The thing is that if you settle with changing (i.e. uncomment + add = On) by
sure you're http://yogeshchaugule.com/blog/2015/configure-phpini-show-errors-ubuntu enabling this only on development server. It's very common for any developers to make a mistake while developing, which will https://www.youtube.com/watch?v=hm0wdR0iCiA result in White Screen of Death (WSOD). WSOD is normally because PHP error reporting is turned Off. Here's how you php error 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 enable php error 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 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) July 2014 (2) 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 ↑
Du kan ändra inställningen nedan. Learn more You're viewing YouTube in Swedish. You can change this preference below. Stäng Ja, behåll den Ångra Stäng Det här videoklippet är inte tillgängligt. VisningsköKöVisningsköKö Ta bort allaKoppla från Läser in ... Visningskö Kö __count__/__total__ Ta reda på varförStäng How to Enable or disable PHP Errors - UBUNTU - Video Tutorial Skndr Bajwa PrenumereraPrenumerantSäg upp2222 Läser in ... Läser in ... Arbetar ... Lägg till i Vill du titta på det här igen senare? Logga in om du vill lägga till videoklippet i en spellista. Logga in Dela Mer Rapportera Vill du rapportera videoklippet? Logga in om du vill rapportera olämpligt innehåll. Logga in Transkription Statistik 129 visningar 3 Gillar du videoklippet? Logga in och gör din röst hörd. Logga in 4 0 Gillar du inte videoklippet? Logga in och gör din röst hörd. Logga in 1 Läser in ... Läser in ... Transkription Det gick inte att läsa in den interaktiva transkriberingen. Läser in ... Läser in ... Rankning kan göras när videoklippet har hyrts. Funktionen är inte tillgänglig just nu. Försök igen senare. Publicerades den 20 jan. 2016This video shows how you could enable or disable errors in PHP codes on Ubuntu Kategori Utbildning Licens Standardlicens för YouTube Visa mer Visa mindre Läser in ... Annons Automatisk uppspelning När automatisk uppspelning är aktiverad spelas ett föreslaget videoklipp upp automatiskt. Kommer härnäst How to install and run Apache web server in Ubuntu Linux - Längd: 9:53. danscourses 225 575 visningar 9:53 Gearman 1: Server Installation - Ubuntu and PHP - Längd: 5:53. Brent Farris 344 visningar 5:53 Beginner PHP Tutorial - 14 - Error Reporting - Längd: 5:33. thenewboston 154 919 visningar 5:33 Advanced Debugging in PhpStorm - PhpStorm Video Tutorial - Längd: 5:49. JetBrainsTV 25 364 visningar 5:49 Install PHP to an Apache web server in Ubuntu Linux - Längd: 6:28. danscourses 56 772 visningar 6:28 Composer desactivar Xdebug - Längd: 4:24. CarverOnAir 248 visningar 4:24 Enable PHP Extensions with EasyApache on WHM - Längd: 5:09. Linglom.com 9 162 visningar 5:09 Install OpenGL, FreeGLUT On Windows With CodeBlocks - OpenGL Tutorial - Längd: 8:27. augustee 41 970 visningar 8:27 PHP - Display all errors PHP on Ubu