sugarCRM view PHP error/warning/notice

One quick way to view PHP error, warning or notice in sugarCRM system is to turn on error_reporting in php.

You can do thisĀ  within sugarCRM if you have limited access to php.ini file.

Add this code to the top of index.php file in sugarCRM

  1. <?php
  2. if(!defined('sugarEntry'))define('sugarEntry', true);
  3.  
  4. //debug setting.
  5. ini_set('display_errors',1);
  6. error_reporting(E_ALL);
  7.  
  8. //......the rest of php code in index file

Now, if you have any error in your php code, you’ll see it on sugarCRM webpages.

Make sure you remove the debug setting code once you are done with debugging sugarCRM.

This entry was posted in PHP and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>