Command Line Interface Error
Contents |
Microsoft Tech Companion App Microsoft Technical Communities Microsoft Virtual Academy Script Center Server and command line interface advantages Tools Blogs TechNet Blogs TechNet Flash Newsletter TechNet windows command line interface Gallery TechNet Library TechNet Magazine TechNet Subscriptions TechNet Video TechNet Wiki Windows Sysinternals Virtual Labs command line interface linux Solutions Networking Cloud and Datacenter Security Virtualization Downloads Updates Service Packs Security Bulletins Windows Update Trials Windows Server 2012 R2 System Center 2012 command line interface windows 7 R2 Microsoft SQL Server 2014 SP1 Windows 8.1 Enterprise See all trials » Related Sites Microsoft Download Center TechNet Evaluation Center Drivers Windows Sysinternals TechNet Gallery Training Training Expert-led, virtual classes Training Catalog Class Locator Microsoft Virtual Academy Free Windows Server 2012 courses Free Windows 8 courses
Cisco Command Line Interface
SQL Server training Microsoft Official Courses On-Demand Certifications Certification overview MCSA: Windows 10 Windows Server Certification (MCSE) Private Cloud Certification (MCSE) SQL Server Certification (MCSE) Other resources TechNet Events Second shot for certification Born To Learn blog Find technical communities in your area Support Support options For business For developers For IT professionals For technical support Support offerings More support Microsoft Premier Online TechNet Forums MSDN Forums Security Bulletins & Advisories Not an IT pro? Microsoft Customer Support Microsoft Community Forums United States (English) Sign in Microsoft System Center Home 2012 Previous Versions Library Forums Gallery We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Virtual Machine Manager 2008 and Virtual Machine Manager 2008 R2 Technical Reference VMM 2008 Error Codes VMM 2008 Error Codes Command-Line Interface Error Messages Command-Line Interface Error Messages
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 http://stackoverflow.com/questions/6387542/php-cli-wont-log-errors ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP CLI won't log errors up vote 28 down vote favorite 7 PHP currently will not log errors produced from the command line. I have : log_errors = On error_log = /var/log/php_errors.log in /etc/php5/cli/php.ini Am I missing a further command line setting to get this working? php command-line-interface error-logging share|improve this question asked Jun 17 '11 at 14:44 bcmcfc 8,9721564132 add a comment| 6 Answers 6 active oldest votes up vote 31 down vote accepted Please check that the user account running PHP CLI has write access to /var/log/php_errors.log. Additionally, you can verify that you are using the correct php.ini file like this: php -a -c /etc/php5/cli/php.ini share|improve this answer edited Jul 23 '14 at 16:41 JakeGould 16.5k62851 answered Jun 17 '11 at command line interface 14:46 George Cummins 20.3k63879 if nothing happens when I run that command does it mean CLI isn't using that php.ini file? –bcmcfc Jun 17 '11 at 15:15 2 I'm not sure what you mean by "nothing happens," but you can determine what config file you are using by using phpinfo() and searching for "Loaded Configuration File" –George Cummins Jun 17 '11 at 15:18 Additionally, remember to use -a, which I left out of the original post (now fixed). –George Cummins Jun 17 '11 at 15:18 I meant it literally; it must have been due to the missing -a. So if it's using the right config file, which it is, and still nothing is being written to the log, then what? –bcmcfc Jun 17 '11 at 15:50 1 After reading from a few different sources and testing locally, I am starting to get the sneaky suspicion that PHP CLI doesn't use the log file, regardless of the directives. Instead, it sends output only to stderr. You can force the issue like this: $php -a >> /var/log/php_errors.log 2>&1. Will that accomplish what you need? –George Cummins Jun 17 '11 at 16:57 | show 4 more comments up vote 13 down vote as a diagnostic you can attempt to force a write to the error log this way. php -c /etc/php5/cli/php.ini -r " error_log('test 123'); " you should now see test 123 in your log tail /var/log/php_errors.log share|improve this answer answere