Os X Php Error Reporting
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the
Osx Php Error Log
workings and policies of this site About Us Learn more about Stack mamp php error log Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
Php Write To Error Log
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; restart apache mac it only takes a minute: Sign up How can I enable PHP errors on OSX Lion? up vote 4 down vote favorite 1 I can't get my setup to display PHP errors. The only thing I see is the WSOD. I've updated my php.ini file: (excerpt from phpinfo()) display_errors On On display_startup_errors On On error_reporting 30719 30719 Any ideas? php display errors php osx-lion wsod share|improve this question asked Feb 7 '12 at 8:23 Yves Van Broekhoven 112113 1 (tip) set error_reporting to -1 to enable all error levels, current and future. –Gordon Feb 7 '12 at 8:30 1 I know this does not answer the original question but it might help you out in the mean while: Did you try checking the PHP error log? –KillerX Feb 7 '12 at 8:30 2 You sure it's not overruled in your script? What happens if you call a simple script like this? ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); echo $some_fake_var;. Should throw a: Notice: Undefined variable: some_fake_var. –Oldskool Feb 7 '12 at 8:50 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted If you're using the default installation of Apache in OSX you need to edit /etc/php.ini however if you're using a MacPorts install you will need to edit /opt/local/etc/php5/php.ini You state your phpinfo() is showing that errors are enabled. If they are not displaying they must be being overridden. Places to check
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
Phpinfo
About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The http://stackoverflow.com/questions/9173006/how-can-i-enable-php-errors-on-osx-lion best answers are voted up and rise to the top Turning on “E_ALL” (errors) in php.ini up vote 0 down vote favorite I've turned on errors in php.ini by removing the ; in front of the comment on line 240 of php.ini (I'm using PHP 5.4.4). I'm using MAMP for my local server to set up a local environment, and I changed the php.ini settings in Applications http://superuser.com/questions/540591/turning-on-e-all-errors-in-php-ini > MAMP > bin > php5.4.4 > conf > php.ini (this is on OS X 10.8). I'm still getting blank screen errors when my PHP is wrong, which is quite often, as I've just started with it. Is this the right place / way to set the errors? osx php mamp php.ini share|improve this question edited Jan 23 '13 at 19:03 terdon 33.6k66299 asked Jan 23 '13 at 17:07 sam 86882341 Please include the actual line you uncommented. The line numbers will be different for different people. –terdon Jan 23 '13 at 19:05 @terdon the line is "E_ALL - All errors and warnings" –sam Jan 23 '13 at 20:16 OK, I see what is wrong. Have a look at my answer. You uncommented the wrong line. –terdon Jan 23 '13 at 20:28 add a comment| 3 Answers 3 active oldest votes up vote 1 down vote accepted The line you have edited is a comment, not a directive. The PHP.ini file has a lot of information to help you out, most of it is only for you to read and not the computer. You need to make sure that the f
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 http://superuser.com/questions/286944/where-is-the-php-log-file-located-on-mac-osx Overflow the company Business Learn more about hiring developers or posting ads with us Super http://php.net/manual/en/install.macosx.bundled.php User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. 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 Where is php error the PHP log file located on Mac OSX? up vote 20 down vote favorite I am having issues with phpMyAdmin on my Mac. I cannot seem to connect to the local MySQL server. When I try to log in I get the following message Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. I am now trying to find the x php error log file. I ran phpinfo() and it tells me that the php.ini file is located in /etc, however when I look I only can see php.ini.default. I proceed to edit php.ini.default by specifying the log file to /tmp/php_errors and enable logging. I tried to log into the MySQL server via phpMyAdmin and I still get the same error. I proceed to /tmp but the error log is not there. Any suggestions on what I may be doing wrong? mac php phpmyadmin share|improve this question edited May 22 '11 at 5:38 Wuffers 11.7k669109 asked May 22 '11 at 5:27 David 96751524 add a comment| 2 Answers 2 active oldest votes up vote 9 down vote accepted Try renaming php.ini.default to php.ini and edit it to enable the logging you want. The changes probably won't take effect until Apache is restarted. Since you are using a Mac, just disable web sharing and re-enable it. share|improve this answer answered May 22 '11 at 6:23 Bandit 76036 add a comment| up vote 24 down vote Apache's logs are located under /var/log/apache2 share|improve this answer answered May 23 '11 at 16:28 Rafael Barbosa 34112 6 When a location isn't specified in php.ini, the PHP error log does seem to be found in /var/log/apache2/error_log by default. Thanks. –Andrew Huey
and Objects Namespaces Errors Exceptions Generators References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database Security Error Reporting Using Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Safe Mode Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Credit Card Processing Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation Keyboard Shortcuts? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search(current page) / Focus search box Compiling PHP on Mac OS X » « Using Packages PHP Manual Installation and Configuration Installation on Mac OS X Change language: English Brazilian Portuguese Chinese (Simplified) French German Japanese Korean Romanian Russian Spanish Turkish Other Edit Report a Bug Using the bundled PHP PHP has come standard with Macs since OS X version 10.0.0. Enabling PHP with the default web server requires uncommenting a few lines in the Apache configuration file httpd.conf whereas the CGI and/or CLI are enabled by default (easily accessible via the Terminal program). Enabling PHP using the instructions below is meant for quickly setting up a local development environment. It's highly recommended to always upgrade PHP to the newest version. Like most live software, newer versions are created to fix bugs and add features and PHP being is no different. See the appropriate MAC OS X installation documentation for further details. The following instructions are gear