back to phpList.org

Export subscribers and PHP7

Recently, I tried to use the Export Subscribers function in phpList 3.5.2 without success. I have searched this forum for solutions without success.

After clicking on the menu item, the selection criteria would appear. After clicking the Export button, the busy icon would appear quickly followed by the All Done message.
I expected a popup asking for ‘file name and location’ or ‘view or save file’ to appear but never did. Realizing that I was able to use Export Subscribers in an earlier version of phpList, I downgraded to that version without success. I then realized that I had upgraded to PHP7 a few months ago. Lo and behold, the Export Subscriber function worked once I switched back to PHP5.4.

I am hoping someone who understands PHP and/or its php.ini file can figure out the dependence on PHP. I run phpList on a hosted site.
Thank you.

@mslamkin If you can switch back to using php 7, try using the browser developer tools to see whether there are any http or javascript errors being shown when you run the export.

I’m sorry but I am not sure what I am looking for. I opened up the web developer tools in Firefox and monitored the network activities when using the Export Subscribers button with both PHP5.6 and PHP7.3.

For PHP5.6, which works fine, the last event is:
/lists/admin/?page=pageaction&action=export&ajaxed=true&tk=…

For PHP7.3, which skips displaying the save or view window, the last event, which keeps repeating is:
/lists/admin/?page=pageaction&action=export&ajaxed=true&tk=…

Eventually, this throws a mySQL error code: 1226.

Is there anything reported on the phplist event log page? I don’t know whether the mysql error is the cause of the problem or just a symptom.
In Firefox developer tools I don’t get repeated events, just one event that takes a long time. On the Console tab, were there any javascript errors shown?

There is nothing in the phpList event log.
There weren’t any javascript errors in the Console tab. Only one relating to the use of the non standard property “zoom" which I found in some stylesheets.

I guess I will downgrade to PHP 5.6 when I want to export subscribers.
BTW, there are other places in phpList, Statistics Overview, for example, where exporting to a CSV file works fine.

@mslamkin One possibility, do you have a timezone defined?

You can try the Subscribers plugin to export subscribers, though it doesn’t include all of the subscriber fields that the core phplist export does.

I checked, I have TimeZone plugin enabled. Same behavior whether the plugin in is enabled or disabled.
I also have Subscribers plugin enabled. Tried using the export (Excel icon) function there and got the “Exporting, this may take a while” message. Waited for over 5 minutes and nothing further happened. My search criteria selected only 2 subscribers from a total of 300 subscribers. Gave up at that point.
Thank you for your suggestions though.

@mslamkin It’s a bit baffling. As you initially suggested there might be a difference in the php configuration between 5.6 and 7.
I can take a look at your phplist to see whether anything looks wrong. If you’d like me to do that then send a private message with the access details.

I am okay with just downgrading PHP when I have the infrequent need to export subscribers. When I searched the topics for export subscribers, several other users reported the same results for phpList as far back as 2015. Not sure what they ended up doing. Let’s call it an unresolved bug for now. I wonder how often it is actually used!