Sendy CSV Import St...
 
Notifications
Clear all

Sendy CSV Import Stuck at Zero

1 Posts
1 Users
0 Reactions
8 Views
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
Topic starter  

A customer on our Managed Sendy Hosting reached out to us today saying that they can't import new subscribers to their list. The claim was that the import process is stuck at 0%. Following is the exact message.

I am trying to upload a CSV file onto Sendy and it is constantly stuck at zero %. The list is not big and has only 2000 contacts. Will you be able to look into this?

So I checked if we have their cronjobs setup properly. They were and then I tried to run import-csv.php manually got an error response.

PHP Warning:  Undefined variable $app in /var/www/user/html/import-csv.php on line 112
PHP Warning:  Undefined variable $current_processing in /var/www/user/html/import-csv.php on line 122
PHP Warning:  Undefined variable $all_lists in /var/www/user/html/import-csv.php on line 334
PHP Fatal error:  Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in /var/www/user/html/import-csv.php:336
Stack trace:
#0 /var/www/user/html/import-csv.php(336): mysqli_num_rows()
#1 {main}
  thrown in /var/www/user/html/import-csv.php on line 336

The first 3 lines are just warnings. Sendy has a lot of them. But the error starts from line #4. I inspected line 336 of import-csv.php file and found following content,

if (mysqli_num_rows($r) == 0)

This doesn't work with PHP 8 and above. We were running PHP 8.1. So I replaced line 336 with following content,

if (!$r || mysqli_num_rows($r)==0)

This solved the error.

This topic was modified 2 years ago 3 times by Tharindu

   
Quote
Topic Tags
Share:
Back to top button