Help retrieving / exporting users or restoring admin access

I have been on an old version of phplist as I never got round to upgrading - which I do not find intuitive as I am on a shared hosting platform where all applications are installed via existing scripts and I have limited access to the servers.

Recently my site has been suffering from malware issues and after upgrading all applications that were straightforward the malware issues are likely to originate in /affect either PHPList or one other older application that I find challenging to upgrade.

To eliminate the malware issues quickly I decided it would be best to delete both applications and install new versions afresh. To this effect I wanted to export all users from PHPList and then later re-load.

Unfortunately this has been fraught with issues: I could not export to Excel as the export is date-related and the earliest date it would allow me to export from was 2015 which would result in the loss of the majority of users / subscribers. I have since read that there is a workaround to this issue but unfortunately I now can no longer apply it as my situation has moved on!

I then contacted the support desk of the hosting company to help me get access to the database so I can export the users using SQL. Unfortunately accessing the database meant I had to reset the password as the original one appears to have been system-generated (or at the very least I have no idea what it is as I installed PHPList 5 to 10 years ago!). Now the entire PHPList has become inaccessible as the PHPList application clearly has a different password for DB access and I have no way of finding out what that password was and to change it back. The error message I get when trying to access the subscription and the admin functionality is: “Fatal Error: Cannot connect to database, access denied. Please contact the administrator”.

I tried installing a new version of PHPList over the top of the existing one, in case that would overwrite the password but no luck, it won’t let me do that with the automated scripts provided by the hosting company. Error message is not particularly helpful.

I finally managed to get my SQL access working and can successfully run SQL queries that get me user information. However, I use SQL rarely and it will take me a considerable amount of time to get the query improved to the point that it gives me a nice list of users with name, address and a few other key attributes. Nothing fancy but it requires quite a bit of joining tables which is not my speciality.

So here are my questions:

  • Is there a default database password that I could set so I can get back into the admin functionality and use the workaround for setting the start year for the export to 2000?
  • Does anyone have a SQL query that I could use to generate a sensible user dataset for export?
  • Has anyone solved a similar situation successful with a different solution?

Thank you very much and kind regards,

Welcome Shelia to the forums firstly.

As for the inability of phpList to connect to your database now you have changed the password for the Database, if you can access the config.php file, (in a text editor) you should find the old password in the early part of the file, and this should be replaced with the new database password you obtained by resetting the password.

Again, this will depend on how you deleted things, but if you add the following line (if it’s not already there) to the config file, you may find you can access the earlier records to export.

define(‘DATE_START_YEAR’, 2000);

Hi Dragonrider!

Thank you so much for your reply. I have been trying to follow your instructions and eventually managed to get my access to the database back.

I then edited config.php to set the DATE_START_YEAR to 2000. Unfortunately every time I attempt this and I then want to go back into the admin functionality of PHPList the admin link (as well as the mailing list subscription page) come up as blank plages and I cannot log in.

I have done the Edit directly in Filezilla FTP programme (using a Mac) and uploaded the updated config.php file. I can see that the upload was successful. I also made sure the permission were set to allow Read / Write / Execute. Still inccessible.

I can restore my mailinglist directory from the last backup so can easily get the old version of config.php back. However, I am at a loss as to what else I should be doing. Do you have any further suggestions?

Thank you!