I'm a seasoned PHP developer just starting on CMSMS development. One of my biggest gripes so far is the complete lack of error reporting. I understand that end users don't need to see PHP errors, but I'd think that by setting $config['debug'] = true; I'd get php errors. Instead the page dies silently and I'm forced to debug line by line.
I'm sure I could pull apart the engine(s) and get errors out (perhaps change all the silenced @functions to functions), but I'm hoping there is an easier way.
Getting PHP Errors
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Getting PHP Errors
in cms 1.2, display errors is turned on, and error reporting is set to E_ALL when debug mode is on.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Getting PHP Errors
and if you doubt that they are, you can always add the appropriate lines to config.php temporarily and turn it on yourself.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Getting PHP Errors
Thanks calguy! I'm using 1.1.4.1 (I didn't make the decision here); is there a way to do it there?
Also, I've tried adding error_reporting(E_ALL) a bunch of places, but to no avail. Admittedly I'm too busy getting stuff done to really dive into how the system works.
Thanks for the quick reply all the same.
Also, I've tried adding error_reporting(E_ALL) a bunch of places, but to no avail. Admittedly I'm too busy getting stuff done to really dive into how the system works.
Thanks for the quick reply all the same.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Getting PHP Errors
@ini_set('display_errors',1);
@error_reporting(E_ALL);
Add that into the config.php
Now, if you're still getting a blank page, then your server may not allow you to do an ini_set, in which case you'll have to look at your web control panel, or find some other way of getting the httpd errors.
@error_reporting(E_ALL);
Add that into the config.php
Now, if you're still getting a blank page, then your server may not allow you to do an ini_set, in which case you'll have to look at your web control panel, or find some other way of getting the httpd errors.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.