PHPList cannot import CSV files

The installed PHPList script application seems to not work with the installed version of PHP. When using the application it is not able to import users via a CSV file. The problem seems to be that the method memory_get_usage() is not compiled into the version of PHP that is installed by Virtualmin(or is this the distribution’s fault?).

Here is a related mantis issue about it over at the makers of PHPList

I tried the described workaround, but it doesn’t seem to work.

It’s up to your distro–even our PHP packages are built with the exact same options as the one provided by the distro. It looks like it is standard in newer versions of PHP…so maybe switching the PHPList over to use PHP5 instead of PHP4 (if you don’t already have PHP5 installed, you can probably install it easily from our repository) will work out the problem.

Seems like defining that function yourself (and maybe just punting and setting it manually rather than trying to figure it out, as the provided fix does) should also work. The comment indicates that it didn’t work for them, but I’m thinking maybe they just didn’t bother to check the errors to see why. It is trivial code…should be easy to fix, even if it’s not perfect.

I think i found a solution. It tries to set the memory_limit INI value via ini_set. This along with the memory_get_usage is not available if it is not configured at compile time. I just removed the action where it even tries to set the memory_limit. The application works fine after that. It’s quite terrible, because even when I force on error reporting for everything it still won’t display the failure in the error_logs.

I have PHP5 installed, but it’s from the fedora repository (I believe). If i force yum to reinstall, will it pull from your repository? Or will I need to specify explicitly to pull from the Virtualmin repo?

No, we only provide what’s missing–so if your OS offers PHP 5, we don’t. Likewise PHP 4. In the case of recent Fedora versions we provide 4, and leave 5 to the experts at Fedora. :wink:

This is likely a temporary mend. I have my servers back, and will be moving off of EC2 shortly. It’s so amazing how dated the Fedora 4 core feels.