Пример #1
0
 protected function checkExternalLibraries()
 {
     global $ms;
     $missing = false;
     ini_set('track_errors', 1);
     @(include_once 'Net/IPv4.php');
     if (isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
         static::raiseError("PEAR Net_IPv4 package is missing!");
         $missing = true;
         unset($php_errormsg);
     }
     if (isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
         print "PEAR Pager package is missing<br />\n";
         $missing = true;
         unset($php_errormsg);
     }
     @(include_once 'smarty3/Smarty.class.php');
     if (isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
         print "Smarty3 template engine is missing<br />\n";
         $missing = true;
         unset($php_errormsg);
     }
     @(include_once 'System/Daemon.php');
     if (isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
         print "PEAR System_Daemon package is missing<br />\n";
         $missing = true;
         unset($php_errormsg);
     }
     ini_restore('track_errors');
     if ($missing) {
         return false;
     }
     return parent::checkExternalLibraries();
 }
Пример #2
0
 public function checkExternalLibraries()
 {
     global $mtlda, $config;
     $missing = false;
     if (!parent::checkExternalLibraries()) {
         $missing = true;
     }
     ini_set('track_errors', 1);
     if ($config->isPdfSigningEnabled()) {
         @(include_once APP_BASE . '/vendor/tcpdf/tcpdf.php');
         if (isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
             $mtlda->write("TCPDF can not be found!", LOG_ERR);
             $missing = true;
             unset($php_errormsg);
         }
         @(include_once APP_BASE . "/vendor/fpdi/fpdi.php");
         if (isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
             $mtlda->write("FPDI can not be found!", LOG_ERR);
             $missing = true;
             unset($php_errormsg);
         }
     }
     if ($config->isPdfIndexingEnabled()) {
         @(include_once APP_BASE . "/vendor/Smalot/PdfParser/Parser.php");
         if (isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
             $mtlda->write("PdfParser can not be found!", LOG_ERR);
             $missing = true;
             unset($php_errormsg);
         }
         @(include_once APP_BASE . '/vendor/tcpdf/tcpdf_parser.php');
         if (isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
             $mtlda->write("TCPDF_PARSER can not be found!", LOG_ERR);
             $missing = true;
             unset($php_errormsg);
         }
     }
     ini_restore('track_errors');
     if (!class_exists('imagick')) {
         $mtlda->write("imagick extension is missing!", LOG_ERR);
         $missing = true;
     }
     if ($missing) {
         return false;
     }
     return true;
 }