The problem has nothing to do with what version of php you are using or what addons you are installing.
The problem is that some enviroments, apache is running with mode 111 , which means when it creates a file or directory, it will have permissions of 666, which is read and write ONLY for user, group, world.
When pclzip begins to unzip the file it downloads, on some systems it does not create the directory with permission to execute in that directory and apache cannot perform operations in that directory.
on any unix/linux system, a directory must have execute permissions to do a directory listing.
[root@65-110-41-60 addon_temp]# ls -la
total 12
drwxrwxrwx 3 apache apache 4096 Feb 18 12:23 .
drwxr-xr-x 12 dalvengy dalvengy 4096 Feb 18 11:21 ..
drw-rw-rw- 2 apache apache 4096 Feb 18 12:23 ag_UnitFrames
Notice that it doesnt have execute permissions.
So where is the issue?
Researching the pclzip library, we come across an option that can be used to chmod the directory when you unzip a file. on or around like 230 , there is
" $list = $archive->extract(PCLZIP_OPT_PATH, $path); "
according to the pclzip library you can add the option to set the permission of the directory there,
$list = $archive->extract(PCLZIP_OPT_PATH, $path, PCLZIP_OPT_SET_CHMOD, 0777);
however, that does not work, which is the real problem and will be the required solution.
if that makes sense to anyone, let me know