Author Topic: [zipdownload]Blank Page  (Read 5907 times)

Offline alcest

  • Newbie
  • *
  • Posts: 2
[zipdownload]Blank Page
« on: August 18, 2011, 05:55:32 AM »
All I get after clicking Download All Attachments is blank page and url:
....3rdparty/roundcube/?_task=mail&_action=plugin.zipdownload.zip_attachments&_uid=XXXXX&_mbox=INBOX

I try to run on cPanel, and PHP config:
zip
Zip    enabled
Extension Version    $Id: php_zip.c,v 1.1.2.49 2009/02/05 19:53:22 pajoye Exp $
Zip version    1.8.11
Libzip version    0.9.0

and

PHP Version 5.2.9

Any idea what's wrong?
« Last Edit: August 18, 2011, 07:42:29 AM by alcest »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
[zipdownlad]Blank Page
« Reply #1 on: August 18, 2011, 04:14:50 PM »
What's in the error log?

Offline alcest

  • Newbie
  • *
  • Posts: 2
[zipdownlad]Blank Page
« Reply #2 on: August 18, 2011, 04:34:05 PM »
Quote from: skaero;36210
What's in the error log?

RC/log/error.log:
[18-sie-2011 22:13:38] PHP Fatal error:  Class 'ZipArchive' not found in /usr/local/cpanel/base/3rdparty/roundcube/plugins/zipdownload/zipdownload.php on line 69



But as You can see:
ZIP:
Zip    enabled
Extension Version    $Id: php_zip.c 308107 2011-02-07 16:20:16Z pajoye $
Zip version    1.9.1
Libzip version    0.9.0

zlib
ZLib Support    enabled
Stream Wrapper support    compress.zlib://
Stream Filter support    zlib.inflate, zlib.deflate
Compiled Version    1.2.3
Linked Version    1.2.3

Directive   Local Value   Master Value
zlib.output_compression   Off   Off
zlib.output_compression_level   -1   -1
zlib.output_handler   no value   no value

PHP Version 5.3.6

System    Linux xxxxxxxxxxx 2.6.28.1-xxxxx #2 SMP Fri Jan 30 09:55:02 UTC 2009 i686
Build Date    Aug 18 2011 22:07:52
Configure Command    './configure' '--disable-fileinfo' '--disable-phar' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-pdo=shared' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'


But ZipArchive class is avaiable for system:
test.php
Quote
if (class_exists('ZipArchive')) {
$tmpfname = tempnam($temp_dir, 'attachments');
      $message = new rcube_message(get_input_value('_uid', RCUBE_INPUT_GET));

      // open zip file
      $zip = new ZipArchive();
      $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE);   
print_r($zip);

}
else {
print "No Class avail.";
}

?>
[/I]

Result:
Quote
ZipArchive Object ( [status] => 0 [statusSys] => 0 [numFiles] => 0 [filename] => /tmp/attachmentsa4pB4e [comment] => )


No changes were made to original ziparchive.php
« Last Edit: August 18, 2011, 04:57:43 PM by alcest »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
[zipdownlad]Blank Page
« Reply #3 on: August 19, 2011, 06:15:13 AM »
I can see your trying to run the plugin from cPanels copy of RoundCube, cPanel runs under a different instance of Apache that doesn't allow for a lot of the standard php classes like the ZipArchive class. If you put the test file in the /usr/local/cpanel/base/3rdparty/roundcube/ folder you'll see that it can't fine the class. Unfortunately I'm not sure how you can change those settings, it maybe better to ask on the cPanel forum.