Plugin Exporting Blank Zip File
We are having trouble exporting data with the Portico Preservation Plugin. We were able to install (using the “Install A New Plugin” feature) the plugin version 1.0.0.0 on a dev environment and it works fine. The exported zip file contains data. However when we installed it on our live environment the exported zip file is empty.
System Specifications
We are having trouble determining what is different between the two systems. In theory nothing should be different. Both our live and dev environments run the following.
Software |
version |
OJS |
2.4.5.0 |
OS platform |
Linux |
PHP version |
5.4.32 |
Apache version |
2.4.7 |
Database driver |
mysql |
Database server version |
5.5.39 |
Delete and Reinstall
We have tried to delete (using the delete plugin button in the UI) and reinstall the plugin, but that doesn’t seem to make a difference. Is there a more compete way to delete a plugin other than using the delete button in the UI? When I reinstall the configuration setting from the previous install are retained and prepopulated. The enabled status is also remembered.
We followed the [installation instructions] (https://pkp.sfu.ca/support/forum/viewtopic.php?f=28&t=12228) in the Plugin Gallery.
Permissions
Could this be a permissions issue? We have temporarily opened up the plugins direcotry permissions to 777 using chmod -R 777 plugins
bitnami@ip-10-0-0-66:~/ojs/plugins/importexport$ ll
total 68
drwxrwxrwx 17 bitnami bitnami 4096 Mar 2 22:39 ./
drwxrwxrwx 18 bitnami bitnami 4096 Sep 18 2014 ../
drwxrwxrwx 5 bitnami bitnami 4096 Apr 16 2015 crossref/
drwxrwxrwx 5 bitnami bitnami 4096 Sep 18 2014 datacite/
drwxrwxrwx 3 bitnami bitnami 4096 Sep 18 2014 doaj/
drwxrwxrwx 4 bitnami bitnami 4096 Sep 18 2014 duracloud/
drwxrwxrwx 3 bitnami bitnami 4096 Sep 18 2014 erudit/
drwxrwxrwx 5 bitnami bitnami 4096 Sep 18 2014 medra/
drwxrwxrwx 4 bitnami bitnami 4096 Jan 29 2015 metapress/
drwxrwxrwx 3 bitnami bitnami 4096 Sep 18 2014 mets/
drwxrwxrwx 3 bitnami bitnami 4096 Sep 18 2014 native/
drwxr-xr-x 3 daemon daemon 4096 Mar 2 22:39 portico/
drwxrwxrwx 4 bitnami bitnami 4096 Sep 18 2014 pubIds/
drwxrwxrwx 3 bitnami bitnami 4096 Sep 18 2014 pubmed/
drwxrwxrwx 3 bitnami bitnami 4096 Sep 18 2014 quickSubmit/
drwxrwxrwx 3 bitnami bitnami 4096 Sep 18 2014 sample/
drwxrwxrwx 3 bitnami bitnami 4096 Sep 18 2014 users/
bitnami@ip-10-0-0-66:~/ojs/plugins/importexport$ cd portico/
bitnami@ip-10-0-0-66:~/ojs/plugins/importexport/portico$ ll
total 88
drwxr-xr-x 3 daemon daemon 4096 Mar 2 22:39 ./
drwxrwxrwx 17 bitnami bitnami 4096 Mar 2 22:39 ../
-rw-r--r-- 1 daemon daemon 499 Mar 2 22:39 exportFailure.tpl
-rw-r--r-- 1 daemon daemon 499 Mar 2 22:39 exportSuccess.tpl
-rw-r--r-- 1 daemon daemon 474 Mar 2 22:39 index.php
-rw-r--r-- 1 daemon daemon 843 Mar 2 22:39 index.tpl
-rw-r--r-- 1 daemon daemon 3349 Mar 2 22:39 issues.tpl
drwxr-xr-x 3 daemon daemon 4096 Mar 2 22:39 locale/
-rw-r--r-- 1 daemon daemon 17060 Mar 2 22:39 PorticoExportDom.inc.php
-rw-r--r-- 1 daemon daemon 22744 Mar 2 22:39 PorticoExportPlugin.inc.php
-rw-r--r-- 1 daemon daemon 2225 Mar 2 22:39 PorticoSettingsForm.inc.php
-rw-r--r-- 1 daemon daemon 2494 Mar 2 22:39 settingsForm.tpl
-rw-r--r-- 1 daemon daemon 526 Mar 2 22:39 version.xml
bitnami@ip-10-0-0-66:~/ojs/plugins/importexport/portico$
Other Export Plugins
All of the other export plugins are working correctly. It is only the Portico plug that is blank.
Suggestions
Any help you can offer is greatly appreciated!
1 Like
Hi Troy,
The main problem I can think of is that the production server doesn’t have the zip utility installed, or that your PHP instance doesn’t have zipArchive or zlib support installed. Are you seeing anything in the error logs maybe complaining about that? Is the dev version an exact replica of the problem version?
Further reading from an old thread: https://pkp.sfu.ca/support/forum/viewtopic.php?t=12228#p47625
Cheers,
James
Hi James,
Thanks for the reply. I double checked the phpinfo and the zip and zlib are both enabled on the live and dev servers.
**zip**
Zip enabled
Extension Version $Id: abc21c7f1559e732dba6db94c69ecf638ae5fa3f $
Zip version 1.11.0
Libzip version 0.10.1
**zlib**
ZLib Support enabled
Stream Wrapper compress.zlib://
Stream Filter zlib.inflate, zlib.deflate
Compiled Version 1.2.6
Linked Version 1.2.6
The dev server was a snapshot of the live server a few months ago, but they have slowly migrated apart as PKP and I have been doing some work for ALA on the dev server than hasn’t yet been pushed over to the live server. I don’t think any of the environment or libraries would have changed. However I left ALA back in December so I am not sure what changes PKP has made to the dev server recently. The changes I have made where only to display templates.
When I manually export an issue I get a zip file, but the file won’t open since its file size is 0. A file with the correct file name (LRTS_40_1_1996_2016-03-03.zip in this case) is downloaded but the file is empty. I don’t think the blank file would be created if it was a zip related error, but I am not sure.
Sorry I didn’t include the error code earlier. Looking at the apache error_log I don’t see any zip related errors just file related errors.
[Wed Mar 02 19:45:54.430628 2016] [proxy_fcgi:error] [pid 4856:tid 140299963639552] [client 73.247.186.60:53420] AH01071: Got error 'PHP message: ojs2 has produced an error
Message: WARNING: filesize(): stat failed for LRTS_40_1_1996_2016-03-02.zip
In file: /opt/bitnami/apache2/htdocs/ojs/plugins/importexport/portico/PorticoExportPlugin.inc.php
At line: 381
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.32
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.39
PHP message: ojs2 has produced an error
Message: WARNING: readfile(LRTS_40_1_1996_2016-03-02.zip): failed to open stream: No such file or directory
In file: /opt/bitnami/apache2/htdocs/ojs/plugins/importexport/portico/PorticoExportPlugin.inc.php
At line: 382
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.32
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.39
PHP message: ojs2 has produced an error
Message: WARNING: unlink(LRTS_40_1_1996_2016-03-02.zip): No such file or directory
In file: /opt/bitnami/apache2/htdocs/ojs/plugins/importexport/portico/PorticoExportPlugin.inc.php
At line: 383
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.32
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.39
\xb79\xb7)', referer: https://journals.ala.org/lrts/manager/importexport/plugin/PorticoExportPlugin/issues
I see some empty portico related directories in the temp folder of the live server where it looks like the process failed. I don’t see these orphaned portico directories on the dev server. I am guessing that the plugin deletes them as part of it clean up process, correct?
bitnami@ip-10-0-0-66:~/stack/apache2/files/temp$ ll
total 404
drwxr-xr-x 11 daemon daemon 4096 Mar 2 22:39 ./
drwxrwxrwx 8 root root 4096 Feb 25 2015 ../
drwxr-xr-x 3 daemon daemon 4096 Sep 30 18:17 facebook259c35fea0/
drwxr-xr-x 3 daemon daemon 4096 Sep 30 18:17 googlePluse0b62a8fc8/
-rw-r--r-- 1 daemon daemon 10926 Feb 22 16:36 gz9vynIi
-rw-r--r-- 1 daemon daemon 11581 Mar 2 21:34 gzlppeMt
-rw-r--r-- 1 daemon daemon 10926 Feb 22 23:01 gzNAQYiZ
-rw-r--r-- 1 daemon daemon 10926 Mar 2 22:39 gzrXz35D
-rw-r--r-- 1 daemon daemon 11581 Mar 2 21:30 gzSAHOY6
-rw-r--r-- 1 daemon daemon 10926 Feb 22 22:53 gzU3LcaE
drwxr-xr-x 3 daemon daemon 4096 Jan 23 2015 metapressf8f0d45c28/
drwxr-xr-x 2 daemon daemon 4096 Mar 2 20:37 portico13be6319da/
drwxr-xr-x 2 daemon daemon 4096 Mar 2 20:39 portico2a0ab93074/
drwxr-xr-x 2 daemon daemon 4096 Mar 2 20:38 portico6a1238cb95/
drwxr-xr-x 2 daemon daemon 4096 Mar 2 21:29 portico7883305bc2/
drwxr-xr-x 3 daemon daemon 4096 Feb 22 22:53 portico847f9ed4cd/
drwxr-xr-x 3 daemon daemon 4096 Feb 22 16:36 portico931fef88bd/
-rw-r--r-- 1 daemon daemon 71680 Mar 2 20:37 tar2HFGPo
-rw-r--r-- 1 daemon daemon 71680 Mar 2 20:38 tarEQ0Hpf
-rw-r--r-- 1 daemon daemon 71680 Mar 2 21:29 targr2VUi
-rw-r--r-- 1 daemon daemon 71680 Mar 2 20:39 tarpdpRQV
bitnami@ip-10-0-0-66:~/stack/apache2/files/temp$
Thanks,
Troy