Pages

Tuesday, June 23, 2009

SugarCRM Troubleshooting Simplified - Part II

Expanding on my previous post covering some troubleshooting tips for SugarCRM, this article will focus on potential configuration hazards.
A number of problems relating to SugarCRM can be directly attributed to improper PHP configurations. These problems tend to manifest themselves in a variety of ways, but a few common scenarios include:
  • Blank page when using Module Loader, Upgrade Wizard or Installer
  • Blank page after System Check or after accepting license at install time
  • Inability to upload files, i.e. Notes attachments, module or patch install packages, etc.
If you are experiencing any of the above described problems, you should first confirm that you are using a version of PHP that is supported for use with your version of SugarCRM.
Perhaps the most helpful tool for not only obtaining the version number of your PHP install, but other information as well, is to use the built-in phpinf0() function.
In order to use it, create a PHP file with the following text in it:
phpinfo();
Place the file in the root directory of your SugarCRM install and then view it in your browser. The output will display the configuration settings of your PHP installation.
A page detailing your PHP version number and configuration settings will be generated when you view the PHP file in your browser. If it does not, the likely source of the problem is that PHP is not enabled for your site or directory, which likely also explains why your SugarCRM system may not be functioning.
Once you have the version number for PHP, you can verify it is a supported one by matching it up against the official SugarCRM supported platforms matrix. Make sure that you match it up against the matrix that corresponds with your version of SugarCRM as different versions have differing requirements.
Other important PHP settings relating to SugarCRM include:
(Recommended settings specified in parantheses)
  • memory_limit (64M)
  • session.save_path
  • upload_max_filesize (30M)
Remember, if you make a change to your PHP.INI to adjust any of these or other settings, you must restart your web service in order to apply the changes.

7 comments:

  1. Hi.
    Nice post. However I have PHP5.3.3-7 squeeze8, and my php.ini is fully configured. Yet, every time I try to Upload a Module to install, or even an upgrade package, the modules and upgrade admin areas stop working.
    A turning on debug managed to produce an error message:

    Warning: stat(): stat failed for upload/upgrades/module/PDFforSugarModule1.2-manifest.php occured in /var/www/include/upload_file.php on line 691 [2012-04-29 17:30:57] display_stack_trace caller, file: /var/www/include/utils.php line#: 3021
    [L:](:StackTraceErrorHandler)
    /var/www/include/upload_file.php[L:691](:stat)
    [L:](UploadStream:url_stat)
    /var/www/modules/Administration/UpgradeWizard.php[L:174](:copy)
    /var/www/include/MVC/View/SugarView.php[L:664](:require_once)
    /var/www/include/MVC/View/views/view.classic.php[L:71](SugarView:includeClassicFile)
    /var/www/include/MVC/View/SugarView.php[L:139](ViewClassic:display)
    /var/www/include/MVC/Controller/SugarController.php[L:310](SugarView:process)
    /var/www/include/MVC/Controller/SugarController.php[L:287](SugarController:processView)
    /var/www/include/MVC/SugarApplication.php[L:89](SugarController:execute)
    /var/www/index.php[L:44](SugarApplication:execute)
    Module Loader

    Any Ideas? Thanks in advance.

    ReplyDelete
    Replies
    1. This sounds like a permissions problem. See here:
      http://www.phpfreaks.com/forums/index.php?topic=250142.0

      Delete
    2. That was my first thought... but no.
      Chmod 777 and chown www-data:www-data didn't solve it.
      I even rolled back to PHP 5.2 and still nothing.
      This has been an excellent proof of concept for the usage of my vmware snapshot feature as I can just try and revert to snapshot.
      Still I'm completely out of ideas.
      Thanks anyway

      Delete
    3. Did you solve this Manuel? I have the same issue. Very annoying.

      Delete
  2. I'm having this issue on an instillation that only a couple of months before was working fine. No php.ini or SugarCRM upgrades have happened. I'm seeing these 'stat failed' warnings as I'm trying to import a list of accounts (and it's also happening for a list of contacts I am trying to import.

    ReplyDelete
    Replies
    1. It is hard to advice based on the limited amount of information provided about your problem, but based on this thread, it too sounds like a permissions problem:

      http://forums.phpfreaks.com/topic/156142-solved-warning-filesize-stat-failed/

      Delete
    2. Thanks Angel. Not sure what could have changed, so I have asked my hosting provider to look into it as well. However, I though it may help if I attached what's actually happening in a file for you. Please refer here for the issue.

      http://www.shamiso.net/Presentation1.ppt

      Thanks.

      Delete

Your comments, feedback and suggestions are welcome, but please refrain from using offensive language and/or berating others. Thank you in advance.