PHP ERRORs, WARNINGS ,and DEPRECATED notices on new install

I have a new install of SuiteCRM (installed over SugarCRM 6.5) and I am getting ERRORS, WARNINGS, and DEPRECATED notices in my php error log file. Note - I changed the error level reporting to see these issues.

I have attached a segment of the log file. Here are some selected extracts…

Tue Mar  4 01:29:13 2014 [4726][1][WARN] Image dashboard.png not found
Tue Mar  4 01:29:13 2014 [4726][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Tue Mar  4 01:29:52 2014 [7533][1][DEPRECATED] Formatting correction: Accounts->date_modified had formatting automatically corrected. This will be removed in the future, please upgrade your external code
Tue Mar  4 01:29:52 2014 [7533][1][DEPRECATED] SugarBean.php: preprocess_fields_on_save() is deprecated
Tue Mar  4 01:29:52 2014 [7533][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php

SuiteCRM seems to work fine although I am completely new to this solution so I may have missed something.

Are these bugs or are the indicative or an install / configuration issue?

Thanks.

Hi Saturnus,

SugarCRM outputs many warnings, notices, deprecated messages. To ensure your CRM runs smoothly and to minimise error, install SuiteCRM on the compatible Server/MySQL/PHP versions and set the following recommended permissions:

sudo chown -R www-data:www-data .

sudo chmod -R 755 .

sudo chmod -R 775 cache custom modules themes data upload config_override.php

Thanks,

Will.

1 Like

Hi Saturnus.

What Will has suggested should get rid of the “not found” errors. You should probably run the installer again (no need to deploy the SuiteCRM code again) but be aware that running the installer again will clean out anything you have added to your CRM.

To get rid of warnings and deprecated messages, find “error_reporting” in your php.ini file and make it the same as the following or add it if it is not there at all.

error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT

To get rid of the “SugarSearchEngineQueueManager” error, follow the instructions from this forum post.
This fix apparently also fixes issues with workflow emails not being sent so it is well worth applying.

Finally, if the installer confirmation page shows “foreach” errors then make sure that the default MySQL storage engine is set to MyISAM in my.ini instead of “INNODB”. Delete your existing database and create a new one and run the installer again.

Cheers

Bruce

1 Like

Will, Bruce,

Thanks very much for the quick responses. I will work through the changes you suggested over the weekend and update you on the status.

Thanks.

I changed the directory permissions, updated my php.ini, and reinstalled.

Unfortunately I still have reports like these…

Sun Mar  9 17:46:24 2014 [3678][1][WARN] Image CreateFP_Event_Locations.gif not found
Sun Mar  9 17:46:24 2014 [3678][1][WARN] Image FP_Event_Locations.gif not found
Sun Mar  9 17:46:24 2014 [3678][1][WARN] Image CreateAOR_Reports.gif not found
Sun Mar  9 17:46:24 2014 [3678][1][WARN] Image AOR_Reports.gif not found
Sun Mar  9 17:46:24 2014 [3678][1][WARN] Image dashboard.png not found
Sun Mar  9 17:46:32 2014 [4260][1][WARN] Image icon_Home_32.png not found
Sun Mar  9 17:46:32 2014 [4260][1][WARN] Image icon_Home_32.png not found
Sun Mar  9 17:46:32 2014 [4260][1][WARN] Image CreateFP_Event_Locations.gif not found
Sun Mar  9 17:46:32 2014 [4260][1][WARN] Image FP_Event_Locations.gif not found
Sun Mar  9 17:46:32 2014 [4260][1][WARN] Image CreateAOR_Reports.gif not found
Sun Mar  9 17:46:32 2014 [4260][1][WARN] Image AOR_Reports.gif not found
Sun Mar  9 17:46:32 2014 [4260][1][WARN] Image dashboard.png not found
Sun Mar  9 17:46:33 2014 [4351][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Sun Mar  9 17:46:34 2014 [4351][1][WARN] Image CreateFP_Event_Locations.gif not found
Sun Mar  9 17:46:34 2014 [4351][1][WARN] Image FP_Event_Locations.gif not found
Sun Mar  9 17:46:34 2014 [4351][1][WARN] Image CreateAOR_Reports.gif not found
Sun Mar  9 17:46:34 2014 [4351][1][WARN] Image AOR_Reports.gif not found
Sun Mar  9 17:46:34 2014 [4351][1][WARN] Image dashboard.png not found

I am not sure if this is relevant but one issue I have is that this install is on shared hosting, and at least for my web sites on the same server I need to install php.ini into all the sub-directories also. However if I do that for sugarcrm it doesn’t work, and I get my php settings displayed on the screen. So now I have php.ini only in the top directory where the suitecrm install is.

Anyway apart from the errors and warnings suitecrm seems to work ok – I can at least use it.

Hi saturnus,

Warnings/deprecated notices are part of SugarCRM. There are many of these messages, but these are not “Errors” as such which would prevent the application from running. The warnings and other messages can be resolved.

Thanks,

Will.

Hi Will,

So these are “normal” warnings and notices with a “good” SuiteCRM / SugarCRM install?

Do you get these warnings also when you have the Log Level in Admin / System Settings / Logger Settings set to Warn?

It’s just surprising to me that image files are not found so I thought there is either a bug or a problem with my install.

Thanks.

Hi Saturnus,

Yes, this is normal. There are many warnings/notices in SugarCRM. These can be resolved.

In regards the images, you could check if they are in the CRM directory/in their correct location. It may be that they are in the CRM but there is an entrypoint/link pointing to a wrong location that is deprecated.

Thanks,

Will.

Just doing a few spot checks I can see that those files are not in include/images or in themes/Suite7/images.

I am also getting repeated fatal php errors when I import contacts from a csv file.

Mon Mar 10 19:22:32 2014 [3568][1][FATAL] error loading relationship project_resource
Mon Mar 10 19:22:32 2014 [3568][1][ERROR] Unable to find relationship projects_contacts_resources
Mon Mar 10 19:22:32 2014 [3568][1][FATAL] project_resource for projects_contacts_resources failed to load

Also all UTF-8 characters are not imported correctly even if I set UTF-8 as the character set in the import settings.

I am having a real problem with SuiteCRM incorrectly importing special characters (e.g. öäå). I have lots of international contacts and the UTF-8 import doesn’t seem to work correctly.

This is what I have done so far:

  1. I checked the data in the csv file using notepad++ and all special characters have been saved to the csv file correctly (using Excel).
  2. I have checked that my php.ini specifies default_charset = “UTF-8” and I have confirmed this with phpinfo.
  3. I have set System Settings / Locale / Database Collation to utf8_general_ci.

Have I missed something?

Does the suiteCRM import non-English UTF-8 characters correctly?

I just imported some leads with special characters in the name and everything seems to have been imported correctly. Perhaps it’s only a problem with contact imports? Or perhaps it’s an issue with the way Microsoft Outlook 2013 exports csv records.

My php error log is being filed alarmingly quickly!!

I have a cron job

cd /home/username/public_html/crm; php -f cron.php > /dev/null 2>&1

scheduled to run every hour instead of every minute otherwise the situation would be much worse.

As it is I have the following errors or similar every hour in the log

Sat Mar 15 02:00:04 2014 [21030][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone America/Los_Angeles. Please set date.timezone="America/Los_Angeles" in php.ini!
Sat Mar 15 02:00:05 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Sat Mar 15 02:00:05 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Sat Mar 15 02:00:05 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Sat Mar 15 02:00:05 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Sat Mar 15 02:00:08 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Sat Mar 15 02:00:08 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Sat Mar 15 02:00:08 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Sat Mar 15 02:00:08 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Sat Mar 15 02:00:08 2014 [21030][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php

I already have date.timezone set in the log. I read here that there is another timezone setting related to cron that I may have to change but as I am on a shared server I don’t have this may be difficult. I am running several other applications that use MYSQL and this is the only one which has these timezone issues.

From what I have read the SugarSearchEngineQueueManager.php error is due to this feature not being included in CE. So I wonder is this a bug that will be addressed in the next release?

I also have lots of repeated errors like

Fri Mar 14 16:48:17 2014 [16548][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
Fri Mar 14 16:48:17 2014 [16548][1][FATAL] Caught error: Non-static method SecurityGroup::inherit() should not be called statically, assuming $this from incompatible context
Fri Mar 14 16:48:17 2014 [16548][1][FATAL] Caught error: Non-static method SecurityGroup::assign_default_groups() should not be called statically, assuming $this from incompatible context
Fri Mar 14 16:48:17 2014 [16548][1][FATAL] Caught error: Non-static method SecurityGroup::retrieveDefaultGroups() should not be called statically, assuming $this from incompatible context
Fri Mar 14 16:48:17 2014 [16548][1][FATAL] Caught error: Non-static method SecurityGroup::inherit_assigned() should not be called statically, assuming $this from incompatible context
Fri Mar 14 16:48:17 2014 [16548][1][FATAL] Caught error: Non-static method SecurityGroup::inherit_parent() should not be called statically, assuming $this from incompatible context
Fri Mar 14 16:48:17 2014 [16548][1][FATAL] Caught error: Non-static method SecurityGroup::inherit_creator() should not be called statically, assuming $this from incompatible context

So I am wondering are these bugs, because they seem like that to me at the moment.

That is the reason for the error, and if you reinstalled the code, you need to reapply the fix I mentioned earlier. ie: To get rid of the “SugarSearchEngineQueueManager” error, follow the instructions from this forum post.

As for the timezone and caught error stuff, you need to find the php.ini file used when you are calling php from the command line. The instructions for finding that can be found here. Remember you need also to add

error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT

as well as the timezone info to the php.ini file when you find it.

Cheers

Bruce

1 Like

Hi Bruce,

Thanks very much for the comments.

I didn’t get around to applying the fix that you suggested earlier because of the comment in the referenced post.

As i am not using the email functionality the only think I want to do at the moment is get rid of the error.

I’m still looking into the command line php.ini timezone issue and I have raised a ticket with my webhost. However my webhost is based in a different timezone and I think they will be unwilling to change the timezone in the default php.ini.

I have 6 other cron jobs and I don’t have this problem with any other application apart from sugarcrm.

The error_reporting is already set as you mentioned. The errors are ERROR and FATAL so these will still be logged (as they should).

Thanks again for your advice.

I commented out the php code in SugarFTSHooks.php to try and get rid of the “SugarSearchEngineQueueManager” error and I still get the error.

:blush: My mistake! I had neglected to take the second step in the post…

Once I had done that the “SugarSearchEngineQueueManager” error has not appeared in the error log.

Now I just have the timezone issue to deal with.

I finally fixed the timezone issue by changing the cron job to explicitly specify the php.ini to be used.

So I now have

* * * * *  cd /home/username/public_html/suitecrm_folder; php -c php.ini -f cron.php > /dev/null 2>&1

This was a useful link - Introduction to Cron Jobs

1 Like

Well done, you beat me to my next suggestion. B)

Just out of interest, try “which php” from the *nix command line to see where your php.exe really is and you will find, and may have access to, the php.ini that it uses by default.

Cheers

Bruce

Hi Bruce,

Unfortunately this install is on a shared server and I only have cPanel access. I used phpinfo to see get some idea of what was happening.

Another possible fix I came across (but didn’t use in the end so i am not 100% it would have worked) is to add the following line to .htaccess

SetEnv PHPRC /home/username/public_html/suitecrm_folder

If anyone does plan to use this check the conditions as it doesn’t work on all server configs.

Thanks.

In themes (in sugar and in SuiteCrm) following files are missing:
icon_Home_32.png
Report.gif
dashboard.png

You should put these files in images directory
custom/themes/Suite7/images

or

custom/themes/default/images

3 warnings less :slight_smile: