How To View Error Log In Linux
Contents |
Computing Tutorials Open Source Pro LearnWhat is Linux? Training Certification Events Webinars CommunityParticipate
How To Check Logs In Linux Server
Q&A Forums Blogs ResourcesNewsletter Distributions Publications Infographics Photos Videos linux /var/log/messages Jobs elsisi February 16, 2015 Command To Check Error Logs In SSH Forums:Command Line
Linux Log Files Explained
Hello i'am trying to instal a script on my site , but i have an error " Internal Server Error " and i don't how to check log files in unix know what is this so,what's Command To Check Error Logs In SSH for specific user ? i'll usr root to accese , and want to know error logs for a user on my server what's Command To Check Error Logs please ? Print This Log in or register what is /var/log/messages to post comments Like (0 likes) 1 Comments Comments RecommendedDate March 1, 2015 #2 matugm If you are using Apache then try tail -f /var/log/apache2/error.log Top Log in or register to post comments Like Leave this field blank Click Here! Advertisement Training See all LFD450 Embedded Linux Development October 24, 2016 Learn more LFS462 Linux KVM Virtualization October 24, 2016 Learn more LFD430 Developing Linux Device Drivers October 31, 2016 Learn more Newsletter NewsEnterprise Desktop Mobile & Embedded Open Source Linux Kernel DevOps Networking Cloud Computing Tutorials Open Source Pro LearnWhat is Linux? Training Certification Events Webinars CommunityParticipate Q&A Forums Blogs ResourcesNewsletter Distributions Publications Infographics Photos Videos Jobs About Linux.comTerms of Use Privacy Policy Editorial Policy Contact The Linux Foundation is a non-profit consortium enabling collaboration and innovation through an open source development model. Learn More © 2016 The Linux Foundation
that make it easy to view logfiles. The most important command is "tail". Tail can be used to read the last lines from a file. Examples: Get the last 100 lines from
Linux Log Command
the Debian mail log file: tail -n 100 /var/log/mail.log To get all newly added how to check logs in putty lines from a log file in realtime on the shell, use the command: tail -f /var/log/mail.log to quit tail and go
/var/log/syslog
back to the commanline press the keys [ctrl] + [c] If you want to get the last 1000 lines from a log file and they do not fit into your shell window, you can use https://www.linux.com/forums/command-line/command-check-error-logs-ssh the command "more" to be able to view them line by line. tail -n 1000 /var/log/mail.log | more press [space] to go to the next line or [ctrl] + [c] to quit. If you want to search for a specific term in a large file, the command "grep" comes in handy. Example: We search for the email address "[emailprotected]" in the mail log file: grep "[emailprotected]" /var/log/mail.log If you want to http://www.faqforge.com/linux/distributions/debian/linux-how-to-view-log-files-on-the-shell/ view the whole content of file on the shell, use the command "cat". Example: cat /proc/cpuinfo will show you detailed info about the CPU of your computer. Till Basics, Debian, Ubuntu No Comments ← Where is the ISPConfig roadmap? Linux: Get detailed information about server hardware and partitions on the shell → Leave a Reply Cancel reply Your email address will not be published. Required fields are marked *Comment Name * Email * Website CAPTCHA-Code Search Categories Basics CentOS Controlpanels Debian Distributions Email FTP iPad & iPhone ISPConfig 2 ISPConfig 3 Linux & Unix Mac OS X MySQL PostgreSQL Programming Server Ubuntu Uncategorized Virtualisation Vista Webserver Windows Windows 10 Windows 7 Windows 8 XP Tags7 apache boot change consumer Debian default delete desktop disable error files Firefox install ISPConfig 2 ISPConfig 3 key Linux & Unix Linux & Unix manager menu metro mint MySQL OpenVZ password postfix powershell preview registry remove screen script search Shell startup system Thunderbird Ubuntu virtualbox Vista Windows Windows 7 Windows 8 XP Pages Imprint Copyright © 2016 FAQforge. Powered by WordPress. Theme: Spacious by ThemeGrill. We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.O
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 posting ads with us http://unix.stackexchange.com/questions/57441/how-to-view-php-and-server-error-logs Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is http://www.oreilly.com/openbook/debian/book/ch07_04.html a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top how to view php and server error logs? up vote 4 down vote favorite I am getting the WSOD now since editing settings.php; how to php.ini and .htaccess trying to update my site and I need to see error logs to find out what is happening. Also how do you clear cache in command line? Any help appreciated although haven't had much lately I have to admit. error-handling share|improve this question asked Dec 3 '12 at 12:11 freja 1474618 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote First of all: The logs for apache are set in the httpd.conf file. And the logs for PHP (if how to check any) are set in the php.ini file. For the case of PHP, you have to look at the php.ini file, and look for log_errors and error_log variables, that must have these values: log_errors = On error_log = /tmp/php_error.log the last value (/tmp/php_error.log) is just an example. It must be a path to a secure location where you want to store the logs. Make sure that: these two lines are not commented, i.e.: they cannot have any ; before them. after the edit is done, restart apache to load these values. share|improve this answer edited Dec 3 '12 at 16:12 answered Dec 3 '12 at 13:05 nozimica 640419 error_reporting(E_ALL); ini_set('display_errors', '1'); –freja Dec 3 '12 at 13:46 read the above works as well but did not notice any errors in php.ini. I think I need to dump the database which I am also unsure of how to do without making a mess. –freja Dec 3 '12 at 13:48 add a comment| up vote 2 down vote In my experience, PHP's error messages will appear in Apache's error log by default. Try checking there (it's /var/log/apache2/error.log on Debian) for messages mentioning PHP. share|improve this answer answered Dec 3 '12 at 13:26 Brian Marshall 1414 1 I read that too and found a command to reveal error_log but when I looked for it to edit couldn't find. –freja Dec 3 '12 at 13:50 This is great thanks, I found it in /var/log/httpd/error_log and it seems some files are missing like robot.txt so thanks again. &n
and Logs Linux maintains several system logs that help you administer a Linux system by informing you of important events. Probably the most important log is the file /var/log/messages, which records a variety of events, including system error messages, system startups, and system shutdowns. Like most other Linux files, the file contains ASCII text, so you can view it with a text editor or the text processing commands described in Chapter 13. A special command, dmesg, makes it easy to view the log messages related to the most recent system startup. If your system is behaving unusually, use dmesg to quickly see if something went wrong during the system startup sequence. Of course, you must have some way of determining what's usual and unusual among the many messages emitted during system startup. The best way to do so is to print the output of the dmesg command and keep it on hand for comparison with suspicious output. If your system has an attached printer, you can print the output of dmesg by entering the following command: dmesg | lpr Other logs found in the /var/log directory include: apache A directory that contains two log files pertaining to the Apache web server, access.log and error.log. exim A directory that contains several log files pertaining to the exim mail transfer agent. nmb and smb Files that contain log entries pertaining to Samba, the Microsoft-compatible networking server. ppp.log A file the contains log entries pertaining to PPP. 7.3 Starting and Stopping the System and Services 7.5 Setting the System Time and Time Zone Back to: Learning Debian GNU/Linux oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts International | About O'Reilly | Affiliated Companies | Privacy Policy © 2001, O'Reilly & Associates, Inc.