Add warning if zip lib missing
This commit is contained in:
parent
4770bdcb79
commit
8f73bce878
@ -254,6 +254,7 @@ before_script:
|
|||||||
fi
|
fi
|
||||||
- sudo a2enmod rewrite actions fastcgi alias
|
- sudo a2enmod rewrite actions fastcgi alias
|
||||||
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
- 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 sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||||
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
||||||
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||||
|
|||||||
@ -169,6 +169,17 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<tr><td>Zip support</td><td>';
|
||||||
|
|
||||||
|
if (!class_exists('ZipArchive'))
|
||||||
|
{
|
||||||
|
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPDoesNotSupportZip");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupportZip");
|
||||||
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -127,7 +127,7 @@ if (!function_exists("imagecreate"))
|
|||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportGD")."<br>\n";
|
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportGD")."<br>\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
|
else
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ if (!function_exists("curl_init"))
|
|||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCurl")."<br>\n";
|
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCurl")."<br>\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
|
else
|
||||||
{
|
{
|
||||||
@ -163,7 +163,7 @@ if (!function_exists("utf8_encode"))
|
|||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."<br>\n";
|
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."<br>\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
|
else
|
||||||
{
|
{
|
||||||
@ -178,7 +178,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
|
|||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportIntl")."<br>\n";
|
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportIntl")."<br>\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
|
else
|
||||||
{
|
{
|
||||||
@ -186,6 +186,16 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!class_exists('ZipArchive'))
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupport", "ZIP")."<br>\n";
|
||||||
|
// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "ZIP")."<br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Check memory
|
// Check memory
|
||||||
$memrequiredorig = '64M';
|
$memrequiredorig = '64M';
|
||||||
|
|||||||
@ -16,6 +16,7 @@ PHPSupportCurl=This PHP supports Curl.
|
|||||||
PHPSupportCalendar=This PHP supports calendars extensions.
|
PHPSupportCalendar=This PHP supports calendars extensions.
|
||||||
PHPSupportUTF8=This PHP supports UTF8 functions.
|
PHPSupportUTF8=This PHP supports UTF8 functions.
|
||||||
PHPSupportIntl=This PHP supports Intl functions.
|
PHPSupportIntl=This PHP supports Intl functions.
|
||||||
|
PHPSupport=This PHP supports %s functions.
|
||||||
PHPMemoryOK=Your PHP max session memory is set to <b>%s</b>. This should be enough.
|
PHPMemoryOK=Your PHP max session memory is set to <b>%s</b>. This should be enough.
|
||||||
PHPMemoryTooLow=Your PHP max session memory is set to <b>%s</b> bytes. This is too low. Change your <b>php.ini</b> to set <b>memory_limit</b> parameter to at least <b>%s</b> bytes.
|
PHPMemoryTooLow=Your PHP max session memory is set to <b>%s</b> bytes. This is too low. Change your <b>php.ini</b> to set <b>memory_limit</b> parameter to at least <b>%s</b> bytes.
|
||||||
Recheck=Click here for a more detailed test
|
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.
|
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.
|
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.
|
ErrorPHPDoesNotSupportIntl=Your PHP installation does not support Intl functions.
|
||||||
|
ErrorPHPDoesNotSupport=Your PHP installation does not support %s functions.
|
||||||
ErrorDirDoesNotExists=Directory %s does not exist.
|
ErrorDirDoesNotExists=Directory %s does not exist.
|
||||||
ErrorGoBackAndCorrectParameters=Go back and check/correct the parameters.
|
ErrorGoBackAndCorrectParameters=Go back and check/correct the parameters.
|
||||||
ErrorWrongValueForParameter=You may have typed a wrong value for parameter '%s'.
|
ErrorWrongValueForParameter=You may have typed a wrong value for parameter '%s'.
|
||||||
|
|||||||
@ -235,6 +235,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
|
|||||||
$model='csv';
|
$model='csv';
|
||||||
|
|
||||||
// Build export file
|
// Build export file
|
||||||
|
print "Process build_file for model = ".$model."\n";
|
||||||
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
|
||||||
$expectedresult=1;
|
$expectedresult=1;
|
||||||
$this->assertEquals($expectedresult, $result,'Error in CSV export');
|
$this->assertEquals($expectedresult, $result,'Error in CSV export');
|
||||||
@ -242,6 +243,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
|
|||||||
$model='tsv';
|
$model='tsv';
|
||||||
|
|
||||||
// Build export file
|
// Build export file
|
||||||
|
print "Process build_file for model = ".$model."\n";
|
||||||
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
|
||||||
$expectedresult=1;
|
$expectedresult=1;
|
||||||
$this->assertEquals($expectedresult, $result, 'Error in TSV export');
|
$this->assertEquals($expectedresult, $result, 'Error in TSV export');
|
||||||
@ -249,6 +251,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
|
|||||||
$model='excel2007new';
|
$model='excel2007new';
|
||||||
|
|
||||||
// Build export file
|
// Build export file
|
||||||
|
print "Process build_file for model = ".$model."\n";
|
||||||
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
|
||||||
$expectedresult=1;
|
$expectedresult=1;
|
||||||
$this->assertEquals($expectedresult, $result, 'Error in Excel2007new export');
|
$this->assertEquals($expectedresult, $result, 'Error in Excel2007new export');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user