diff --git a/.travis.yml b/.travis.yml
index dc21b90b3ec..4f8cd9de851 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -254,6 +254,7 @@ before_script:
fi
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+ - echo "extension = zip.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php
index 16825530374..807cc34c626 100644
--- a/htdocs/admin/system/phpinfo.php
+++ b/htdocs/admin/system/phpinfo.php
@@ -169,6 +169,17 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
}
}
+print '
| Zip support | ';
+
+if (!class_exists('ZipArchive'))
+{
+ print ' '.$langs->trans("ErrorPHPDoesNotSupportZip");
+}
+else
+{
+ print ' '.$langs->trans("PHPSupportZip");
+}
+
print ' |
';
print '';
diff --git a/htdocs/install/check.php b/htdocs/install/check.php
index 9d197c752dc..6fb01d5329c 100644
--- a/htdocs/install/check.php
+++ b/htdocs/install/check.php
@@ -127,7 +127,7 @@ if (!function_exists("imagecreate"))
{
$langs->load("errors");
print '
'.$langs->trans("ErrorPHPDoesNotSupportGD")."
\n";
- // $checksok=0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
+ // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
}
else
{
@@ -140,7 +140,7 @@ if (!function_exists("curl_init"))
{
$langs->load("errors");
print '
'.$langs->trans("ErrorPHPDoesNotSupportCurl")."
\n";
- // $checksok=0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
+ // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
}
else
{
@@ -163,7 +163,7 @@ if (!function_exists("utf8_encode"))
{
$langs->load("errors");
print '
'.$langs->trans("ErrorPHPDoesNotSupportUTF8")."
\n";
- // $checksok=0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
+ // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
}
else
{
@@ -178,7 +178,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
{
$langs->load("errors");
print '
'.$langs->trans("ErrorPHPDoesNotSupportIntl")."
\n";
- // $checksok=0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
+ // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
}
else
{
@@ -186,6 +186,16 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
}
}
+if (!class_exists('ZipArchive'))
+{
+ $langs->load("errors");
+ print '
'.$langs->trans("ErrorPHPDoesNotSupport", "ZIP")."
\n";
+ // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
+}
+else
+{
+ print '
'.$langs->trans("PHPSupport", "ZIP")."
\n";
+}
// Check memory
$memrequiredorig = '64M';
diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang
index 708b3bac479..1b173656a47 100644
--- a/htdocs/langs/en_US/install.lang
+++ b/htdocs/langs/en_US/install.lang
@@ -16,6 +16,7 @@ PHPSupportCurl=This PHP supports Curl.
PHPSupportCalendar=This PHP supports calendars extensions.
PHPSupportUTF8=This PHP supports UTF8 functions.
PHPSupportIntl=This PHP supports Intl functions.
+PHPSupport=This PHP supports %s functions.
PHPMemoryOK=Your PHP max session memory is set to %s. This should be enough.
PHPMemoryTooLow=Your PHP max session memory is set to %s bytes. This is too low. Change your php.ini to set memory_limit parameter to at least %s bytes.
Recheck=Click here for a more detailed test
@@ -25,6 +26,7 @@ ErrorPHPDoesNotSupportCurl=Your PHP installation does not support Curl.
ErrorPHPDoesNotSupportCalendar=Your PHP installation does not support php calendar extensions.
ErrorPHPDoesNotSupportUTF8=Your PHP installation does not support UTF8 functions. Dolibarr cannot work correctly. Resolve this before installing Dolibarr.
ErrorPHPDoesNotSupportIntl=Your PHP installation does not support Intl functions.
+ErrorPHPDoesNotSupport=Your PHP installation does not support %s functions.
ErrorDirDoesNotExists=Directory %s does not exist.
ErrorGoBackAndCorrectParameters=Go back and check/correct the parameters.
ErrorWrongValueForParameter=You may have typed a wrong value for parameter '%s'.
diff --git a/test/phpunit/ExportTest.php b/test/phpunit/ExportTest.php
index 9e0b4659293..a9e1db601b2 100644
--- a/test/phpunit/ExportTest.php
+++ b/test/phpunit/ExportTest.php
@@ -235,6 +235,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
$model='csv';
// Build export file
+ print "Process build_file for model = ".$model."\n";
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
$expectedresult=1;
$this->assertEquals($expectedresult, $result,'Error in CSV export');
@@ -242,6 +243,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
$model='tsv';
// Build export file
+ print "Process build_file for model = ".$model."\n";
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
$expectedresult=1;
$this->assertEquals($expectedresult, $result, 'Error in TSV export');
@@ -249,6 +251,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
$model='excel2007new';
// Build export file
+ print "Process build_file for model = ".$model."\n";
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
$expectedresult=1;
$this->assertEquals($expectedresult, $result, 'Error in Excel2007new export');