Can't import lists
Sendy used to work properly but after the latest 1.1.7 update our install won't import a list. There is no error, the list uploads like it always used to upload. After the upload finishes it takes me back to a page with all lists and shows a progress circle but no matter how long I leave it there no users from the list are imported. I have tried with lists as small as 10 contacts and the results are the same. Keep in mind this worked prior to the upgrade to 1.1.7 for me.
This discussion has been closed.
Comments
Hi @syntress2600,
There are no known bugs at this time with importing lists.
Firstly, are you using a cron job to import CSVs? If so, what is your cron job interval?
Thanks.
Best regards,
Ben
The cron job is: php /var/www/campaign.domain.com/htdocs/scheduled.php > /dev/null 2>&1
The interval is 1 minute.
I can add users to the list manually with the box but importing any size csv file is not working.
Hi @syntress2600,
This cron job is for
scheduled.php
script and it should be run at every 5 minutes.Do you have a cron job for
import-csv.php
(which is the correct script for CSV imports)?Best regards,
Ben
No, do I use the same command swapping just the php file it calls or is there a different command?
Yes. Example:
php /var/www/campaign.domain.com/htdocs/import-csv.php > /dev/null 2>&1
If your host allows you to run a "per minute" cron job, run it every minute (To be clear: per minute cron job for import-csv.php not scheduled.php).
Thanks.
Ben
Ben,
Thank you, I will set that up and see if it fixes the issue. Is there anything else I need to setup on the host for the script to function properly?
I am going to be importing an 8MB csv file with nearly 500k records that I need to create campaigns with. I already setup the server to allow for larger file uploads, any other issues you think I will run int?
Regards,
Lane
Hi Lane,
The only thing I spotted looking at your phpinfo is that your
upload_tmp_dir
has no value. So I'm not sure if your CSV upload will be successful.Thanks.
Best regards,
Ben
That's a PHP value right? It's not defined in sendy.
Nevermind I can confirm it is a server setting.
Ben,
I ran the import again and still nothing. Even with defining the tmp dir and setting up the cron job.
http://cl.ly/image/3S2M1o3z0T1M - this is what it looks like.
The 1 you see in that image is the one I added manually from the input box.
Regards,
Lane
Hi Lane,
What hosting company are you using?
Best regards,
Ben
Firehost, its a managed hosting company with VMware as the vm platform. They will configure any level of customization for this to work.
I suggest testing with a small CSV file with a few records to see if importing works. Right now, I don't know if it's because it's a mega huge volume that's causing import not to work or is it something else.
Adding on to my previous comment, delete the current list (the one that's currently trying to import), then add a new list. Then import a small CSV file to test. Thanks.
I tried a small csv to no avail. I had just 10 records in it.
Ok. Is your server running Apache and Linux? This is the only environment that Sendy was tested and supported on. Thanks.
No, it's nginx and Linux. I'll have to switch to apache if that's the only option.
Before switching to Apache, can you try one last thing. Try executing the import-csv.php directly in your browser and see if the import starts to move?
Isn't there also a command line way of doing this?
The command line way of doing this is the cron job. I'm just wondering if you cron job is working.
I mean is there a way to input the csv from the command line, not just run the import php file after uploading the csv from the web interface. Ideally something like ./import-csv.php < batch.csv -import
When making a self hosted software for the masses, it's hard to do something like this. Some hosts, especially shared ones have lots of restrictions, most does not let PHP run commands via scripts.
If you want an alternative, try running this MySQL query directly in your database:
LOAD DATA LOCAL INFILE '/path/to/your/file.csv' INTO TABLE subscribers FIELDS TERMINATED BY ',' (name, email) SET userID = 1, timestamp = UNIX_TIMESTAMP(), list = id_of_your_list
/path/to/your/file.csv
andid_of_your_list
are what you need to change.For
id_of_your_list
, you can get the id number from the lists table in your database.Note that when using this method, checks like invalid emails, duplicates and previously bounced emails will not be done.