View Issue Details

IDProjectCategoryView StatusLast Update
0016923phpList 3 applicationpluginspublic17-10-13 12:44
Reporterduncanc 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionduplicate 
Product Version3.0.5 
Target VersionFixed in Version 
Summary0016923: Plugin does not install fully when the $tmpdir directory is on a different file system
DescriptionThere is a problem with the php rename() function when the source and destination directories are on different file systems.

See this Ubuntu bug report that I think explains the problem with rename().
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/723330

When installing a plugin this causes the install to appear to be successful but is actually incomplete. The plugin file, e.g. myplugin.php is installed but any subdirectory fails to be copied/moved. A php warning is issued but phplist seems to have error reporting turned-off.

I noticed the problem when installing phplist and plugins for some clients, and it has also been reported in the support forum
http://forums.phplist.com/viewtopic.php?f=35&t=39731&p=97741

My suggestion for a solution is to use a recursive copy (or move) function instead of rename(). There are several examples in the php documentation such as this one http://www.php.net/manual/de/function.copy.php#103732

I have tested using that function in place of rename on line 122 of admin/plugins.php and plugins were completely installed whereas previously only the plugin file was installed, not any subdirectory.

A stop-gap would be to enable error reporting, or at least report warnings, so that it is clearer to the user that something bad has happened.

TagsNo tags attached.

Relationships

duplicate of 0016865 resolvedmichiel plugin installation across partitions fails 

Activities

There are no notes attached to this issue.