Quote from: skaero;36210What'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
zlibZLib 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:
QuoteZipArchive Object ( [status] => 0 [statusSys] => 0 [numFiles] => 0 [filename] => /tmp/attachmentsa4pB4e [comment] => )
No changes were made to original
ziparchive.php
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.