I’m attempting to import around 2900 contacts from a CSV file. I’ve been careful to ensure the fields have been correctly defined.
During the import process the message is displayed:
Importing records 101 to 200 of 2908 …
The import progresses to the end but then bombs out. When I go to check the number of contacts, the total is only around 800 records.
Looking at the logs in the file … I get the following error message:
[Mon Sep 04 11:34:11.476436 2023] [php:error] [pid 11207] [client 192.168.100.163:50975] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /var/www/html/SuiteCRM-7.13.4/modules/Import/views/ImportListView.php:130\nStack trace:\n#0 /var/www/html/SuiteCRM-7.13.4/modules/Import/views/view.last.php(188): ImportListView->display()\n#1 /var/www/html/SuiteCRM-7.13.4/modules/Import/views/view.last.php(140): ImportViewLast->getListViewTableFromFile()\n#2 /var/www/html/SuiteCRM-7.13.4/include/MVC/View/SugarView.php(210): ImportViewLast->display()\n#3 /var/www/html/SuiteCRM-7.13.4/include/MVC/Controller/SugarController.php(432): SugarView->process()\n#4 /var/www/html/SuiteCRM-7.13.4/include/MVC/Controller/SugarController.php(363): SugarController->processView()\n#5 /var/www/html/SuiteCRM-7.13.4/include/MVC/SugarApplication.php(101): SugarController->execute()\n#6 /var/www/html/SuiteCRM-7.13.4/index.php(52): SugarApplication->execute()\n#7 {main}\n thrown in /var/www/html/SuiteCRM-7.13.4/modules/Import/views/ImportListView.php on line 130, referer: http://suitecrm.aosgrp.net/index.php
It is possible that there is an input record that is causing the import to fail ? There must be a way to find out which record is causing the process to fail.
It really helps if you include your SuiteCRM and PHP versions in every new thread, it’s the “basic coordinates” for troubleshooting anything.
From the looks of that error, I’d start by checking PHP version issues. If that doesn’t help and you really need to go and find a guilty record, use the bisection method.
SuiteCRM 7.13.4 (supported version of PHP is 7.4, 8.0. I have version 8.1.2
SuiteCRM 7.14 was just released. Perhaps I should try the installation again with this version which will match the version of PHP I currently have installed ?
With respect to the contacts, it looks like I had a filter on. After clearing the filter and reverting to a previous state (prior to the first import attempt) I managed to import 2217 contacts out of a total of 2908. The ‘bisection’ method looks like a good technique. Pity the system doesn’t provide some output of where the error occurs.
@jg007 You have to go with PHP 8.0 or 7.4. No other way. Otherwise you will see errors and unexpected behavior everywhere.
If you are going with fresh installation, then the good approach is to go with LTS/ESR version of SuiteCRM. Going with the latest version is never recommended for any production requirements.
And last thing, for import, check the imported records, let say in your case you are successfully importing 800 records, then check record no 801 and 802 in the CSV file, you can see the problem there. By the way
I think changing the PHP version will make your import process successful skipping these errors.
I ended up going for SuiteCRM 7.14 which seems to have reduced the number of errors I’m getting and works with PHP 8.1 according to the compatibility matrix.
This is not a production environment as I’m currently setting up an evaluation for a number of users. No doubt there is an upgrade process that I can follow in the future, correct ?
yes yes you can go with updated version when you want. So your problem resolved? If not then you can instantly join me over skype and i can help you.
Thanks
Do you recommend I still change it to the value you’ve suggested ?
The original errors I reported have disappeared. I occasionally get the following messages but it’s infrequent:
[Tue Sep 05 13:52:05.878450 2023] [php:notice] [pid 1538] [client 192.168.100.163:59342] PHP Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) in /var/www/html/SuiteCRM-7.14.0/include/MVC/SugarApplication.php on line 609, referer: http://suitecrm.aosgrp.net/index.php?action=index&module=Contacts&searchFormTab=basic_search&query=true&clear_query=true
[Tue Sep 05 14:04:10.705350 2023] [php:notice] [pid 1285] [client 192.168.100.163:60353] PHP Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) in /var/www/html/SuiteCRM-7.14.0/include/MVC/SugarApplication.php on line 609, referer: http://suitecrm.aosgrp.net/index.php?module=Administration&action=index
[Tue Sep 05 14:04:17.302591 2023] [php:notice] [pid 1287] [client 192.168.100.163:60354] PHP Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) in /var/www/html/SuiteCRM-7.14.0/include/MVC/SugarApplication.php on line 609, referer: http://suitecrm.aosgrp.net/index.php?module=Administration&action=index
[Tue Sep 05 14:51:55.837537 2023] [php:notice] [pid 2814] [client 192.168.100.163:51011] PHP Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) in /var/www/html/SuiteCRM-7.14.0/include/MVC/SugarApplication.php on line 609, referer: http://suitecrm.aosgrp.net/index.php?action=ajaxui
[Tue Sep 05 15:20:27.179765 2023] [php:notice] [pid 2799] [client 192.168.100.163:54037] PHP Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) in /var/www/html/SuiteCRM-7.14.0/include/MVC/SugarApplication.php on line 609, referer: http://suitecrm.aosgrp.net/index.php?module=Home&action=index
I attempted a new CSV file import with no errors have been reported in the file /var/log/apache2/suitecrm_error.log
By the way I’m impressed with the responsiveness of this comminity forum. Compared to other forums I have to wait weeks or not get any assistance at all.
I appreciate the help from the community so far. Thank you.