Centos View Php Error Log
Contents |
Installing, Configuring, Troubleshooting server daemons such as Web and Mail Post Reply Print view Search Advanced search 4 posts • Page view php error log linux 1 of 1 jnojr Posts: 106 Joined: 2007/11/29 23:42:03 Location: San Diego, ubuntu php error logs CA Contact: Contact jnojr Yahoo Messenger AOL Obtaining PHP logs? Quote Postby jnojr » 2008/11/05 22:07:38 I php error log location linux have a CentOS 5 system with:[root@wikisrv-01 wiki]# rpm -q httpdhttpd-2.2.3-11.el5_1.centos.3[root@wikisrv-01 wiki]# rpm -q phpphp-5.1.6-15.el5I want to troubleshoot a PHP problem, and am trying to get PHP logs. In how to check php error logs in linux php.ini, I have:log_errors = Onerror_reporting = E_ALLerror_log = /var/log/php.logI touched /var/log/php.log, chowned it to apache, and restarted httpd But nothing is being written to /var/log/php.log or /var/log/httpd/error_log or anywhere else that I can find. What do I need to do to get PHP logs? Top mickh Posts: 124 Joined: 2008/02/15 09:42:43 Location: Australia Re: Obtaining PHP logs? Quote
View Mysql Error Log
Postby mickh » 2008/11/05 23:44:57 Have a look at the apache logs (/var/www/logs/httpd/error_log), I can usually find any PHP errors listed in there.Update: sorry, I now see you've already looked there! Top saman_artorious Posts: 73 Joined: 2008/09/19 19:03:37 Re: Obtaining PHP logs? Quote Postby saman_artorious » 2008/11/06 13:48:52 You do not need to modify the error_log option path, just leave the way it is; Log errors to specified file.;error_log = filenameall php errors are written to the error_log file in /etc/httpd/logs/error_logby default Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Post Reply Print view 4 posts • Page 1 of 1 Return to “CentOS 5 - Server Support” Jump to CentOS General Purpose CentOS - FAQ & Readme First Announcements CentOS Social User Comments Website Problems CentOS 7 CentOS 7 - General Support CentOS 7 - Software Support CentOS 7 - Hardware Support CentOS 7 - Networking Support CentO
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
View Apache Error Log
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation view sql error log Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just php error log location windows like you, helping each other. Join them; it only takes a minute: Sign up Where does PHP store the error log? (php5, apache, fastcgi, cpanel) up vote 199 down vote favorite 45 I am on shared hosting http://www.centos.org/forums/viewtopic.php?t=28047 and have Cpanel, Apache, PHP is run by fastcgi. Where does PHP store the error log? Is there any other way I can find the error log on shared hosting environment instead of having to go through entire site structure to look for error_log files? I have access to the php.ini (I am using PHP version 5.2.16). error-handling php share|improve this question edited Aug 24 '15 at 9:33 n611x007 3,11022642 asked Feb 26 '11 at http://stackoverflow.com/questions/5127838/where-does-php-store-the-error-log-php5-apache-fastcgi-cpanel 15:43 PHPLOVER 1,946102945 8 On Linux, either /var/log/httpd/error_log or /var/log/apache2/error.log. These files are owned by root, so you need to be root or use sudo to see it, or read it. –Eric Leschinski Aug 7 '14 at 19:49 47 php --info | grep error –sjas Aug 27 '14 at 13:21 1 @sjas -- genius! –the0ther Feb 21 '15 at 20:02 3 For those looking for a Windows solution, use php --info | findstr /r /c:"error_log" to see where the log file is. –Boom May 13 '15 at 17:00 add a comment| 14 Answers 14 active oldest votes up vote 153 down vote accepted Php stores error logs in /var/log/apache2 if php is an apache2 module. Shared hosts are often storing log files in your root directory /log subfolder. But...if you have access to a php.ini file you can do this: error_log = /var/log/php-scripts.log According to rinogo's comment: If you're using cPanel, the master log file you're probably looking for is stored (by default) at /usr/local/apache/logs/error_log If all else fails you can check the location of the log file using share|improve this answer edited Jun 3 at 7:43 answered Feb 26 '11 at 15:52 Adam Arold 14.8k1252108 15 "Php stores error logs in /var/log/apache2 if php is an apache2" not on RHEL etc, where the
Start 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 http://serverfault.com/questions/593308/php-errors-are-not-stored-on-centos-server Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. 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 error log are voted up and rise to the top PHP Errors are not stored on CentOS Server up vote 1 down vote favorite 1 I just adjusted the php.ini on my CentOS 64 Bits VPS in /etc/php.ini to log PHP errors: cat /etc/php.ini | grep php-errors.log error_log = /var/log/php-errors.log I also have log_errors = on I created the log file in /var/log/ and it is CHMOD 644. I php error log also turned on Error reporting E_ALL cat /etc/php.ini | grep error_reporting ; error_reporting error_reporting = E_ALL ; Eval the expression with current error_reporting(). Set to true if you want ; error_reporting(0) around the eval(). Then I restarted the httpd daemon. When I add a file via the WordPress uploader I see it is not uploaded because of a permission issue “cannot-open-file.png” has failed to upload due to an error Unable to create directory wp-content/uploads/2014/05. Is its parent directory writable by the server? , but it is not stored as an error in php-errors.php: pwd /var/log ls -l | grep php -rw-r--r-- 1 root root 0 May 6 06:21 php-errors.log All my other logs in /var/log/httpd are also root:root so I would assume the logging would work. And when I did adjust the file's permissions to apache:apache as suggested I still had no errors in the log file. Even adding error logging on to the .htaccess did not help. I also checked the PHP.ini using phpinfo() . The only ini loaded is the one I adjusted in /etc/php.ini and the user and group it is using is apache - User/Group apache(48)/48 . What am I missing? PS Could be issu