Вход Регистрация
Файл: adultscript-2.0.3-pro/files/libraries/framework/test.php
Строк: 572
<?php
defined
('_VALID') or die('Restricted Access!');

define('MAX_EXECUTION_TIME'7200);
define('MAX_INPUT_TIME'7200);

class 
VTest
{
    
// errors are mainly for debugging...
    
private $errors            = array();
    private 
$warning        false;

    private 
$required        = array();
    private 
$optional        = array();
    private 
$recommended    = array();
    private 
$media            = array();
    private 
$cli            = array();
    
    private 
$vcfg;
    
    public 
$is_install        FALSE;
    
    public function 
__construct()
    {
        
$this->vcfg = array('video_max_size' => 2);
        if (!
defined('_INSTALL')) {
            
$this->vcfg VF::cfg('module.video');
        }
    }
    
    public function 
get_required_results()
    {
        
$this->required['php']    = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'PHP Version >= 5.2'
        
);
        
        if (
version_compare(PHP_VERSION'5.2''<')) {
            
$this->required['php']['status']    = false;
            
$this->required['php']['error']        = 'You need at least PHP 5.2 to run Adult Video Script!';
            
$this->errors[]                        = 'required.php';
        }
        
        
$this->required['mysql']    = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'MySQL Support'
        
);
        
        if (!
function_exists('mysql_connect')) {
            
$this->required['mysql']['status']    = false;
            
$this->required['mysql']['error']    = 'Function mysql_connect() not found. You system does not appear to have support for MySQL in PHP.';
            
$this->errors[]                        = 'required.mysql';
        }
        
        
$this->required['gd']    = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'GD (Image Manipulation) Support'
        
);
        
        if (
function_exists('gd_info')) {
            
$info gd_info();
            if (!isset(
$info['JPG Support']) OR !$info['JPG Support']) {
                if (!isset(
$info['JPEG Support']) OR !$info['JPEG Support']) {
                    
$this->required['gd']['status']    = false;
                    
$this->required['gd']['error']    = 'GD extension is installed, however support for JPEG not found!';
                    
$this->errors[]                    = 'required.gd.jpeg';
                }
            }
            
            if (!isset(
$info['PNG Support']) OR !$info['PNG Support']) {
                
$this->required['gd']['status']    = false;
                
$this->required['gd']['error']    = 'GD extension is installed, however support for PNG not found!';
                
$this->errors[]                    = 'required.gd.png';
            }
            
            if (!isset(
$info['GIF Read Support']) OR !$info['GIF Read Support']) {
                
$this->required['gd']['status']    = false;
                
$this->required['gd']['error']    = 'GD extension is installed, however for reading GIF images not found!';
                
$this->errors[]                    = 'required.gd.gif.read';
            }

            if (!isset(
$info['GIF Create Support']) OR !$info['GIF Create Support']) {
                
$this->required['gd']['status']    = false;
                
$this->required['gd']['error']    = 'GD extension is installed, however for creating GIF images not found!';
                
$this->errors[]                    = 'required.gd.gif.create';
            }
            
            if (!isset(
$info['FreeType Support']) OR !$info['FreeType Support']) {
                
$this->required['gd']['status']    = false;
                
$this->required['gd']['error']    = 'GD extension is installed, however support for Freetype is missing!';
                
$this->errors[]                    = 'required.gd.freetype';
            }
        } else {
            
$this->required['gd']['status']    = false;
            
$this->required['gd']['error']    = 'You need support for GD >= 2.0.1 in PHP!';
            
$this->errors[]                    = 'required.gd';
        }
        
        
$this->required['curl']    = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Client URL Library (cURL) Support' 
        
);
        
        if (!
function_exists('curl_init')) {
            
$this->required['curl']['status']    = false;
            
$this->required['curl']['error']    = 'Your system doesnt not have support for cURL in PHP.';
            
$this->errors[]                        = 'required.curl';
        }
        
        
$this->required['ftp']    = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'File Transfer Protocol (FTP) Support'
        
);
        
        if (!
function_exists('ftp_connect')) {
            
$this->required['ftp']['status']    = false;
            
$this->required['ftp']['error']        = 'Your system does not have support for FTP in PHP.';
            
$this->errors[]                        = 'required.ftp';
        }
        
        
$this->required['simplexml']    = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'SimpleXML Support'
        
);
        
        if (!
function_exists('simplexml_load_file')) {
            
$this->required['simplexml']['status']         = false;
            
$this->required['simplexml']['error']        = 'Your system does not have support for SimpleXML!';
            
$this->errors[]                                = 'required.simplexml';
        }
        
        
$this->required['pcre']            = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'PCRE UTF8/Unicode Support'
        
);
        
        if (
extension_loaded('pcre')) {
            if (!
preg_match('/^[pLpN-_]++$/u''admin')) {
                
$this->required['pcre']['status']        = false;
                
$this->required['pcre']['error']        = 'PCRE does not have support for UTF8 and/or Unicode properties!';
            }
        } else {
            
$this->required['pcre']['status']         = false;
            
$this->required['pcre']['error']        = 'Your system does not have support PCRE!';
            
$this->errors[]                            = 'required.pcre';
        }
        
        
$this->required['file']    = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Web Server Access to configuration files',
            
'warning'    => 1,
            
'install'    => 1
        
);
        
        
$cfg_file BASE_DIR.'/config.php';
        if ((!
file_exists($cfg_file) OR !is_writable($cfg_file)) AND
            (!
is_writable(BASE_DIR))) {
            
$this->required['file']['status']    = false;
            
$this->required['file']['error']    = 'Configuration file (config.php) or '.BASE_DIR.' directory not writable! You can continue the installation as the configuration settings will be displayed at the end!';
        }
        
        
$this->required['dirs'] = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Web Server Access to directories'
        
);
        
        
$dirs = array(
            
'/sitemaps',
            
'/tmp/cache',
            
'/tmp/cache/config',
            
'/tmp/cache/config/module',
            
'/tmp/cache/config/plugin',
            
'/tmp/cache/config/template',
            
'/tmp/cache/output',
            
'/tmp/cache/language',
            
'/tmp/downloads',
            
'/tmp/images/',
            
'/tmp/logs',
            
'/tmp/sessions',
            
'/tmp/thumbs',
            
'/tmp/uploads',
            
'/tmp/emails',
            
'/media/banners',
            
'/media/users',
            
'/media/users/orig',
            
'/media/videos/flv',
            
'/media/videos/mp4',
            
'/media/videos/cat',
            
'/media/videos/tmb',
            
'/media/videos/vid'
        
);
        
        if (
$this->is_install) {
            
$dirs[] = '/media/videos/mobile';
            
$dirs[] = '/media/photos';
            
$dirs[] = '/media/photos/orig';
            
$dirs[] = '/media/photos/thumbs';
            
$dirs[] = '/media/pornstars';
        } else {
            if (!
defined('_INSTALL')) {
                if (
VModule::enabled('photo')) {
                    
$dirs[] = '/media/photos';
                    
$dirs[] = '/media/photos/orig';
                    
$dirs[] = '/media/photos/thumbs';
                }
        
                if (
VModule::enabled('pornstar')) {
                    
$dirs[] = '/media/pornstars';
                }
                
                if (
VModule::enabled('mobile')) {
                    
$dirs[] = '/media/videos/mobile';
                }
            } else {
                if (
file_exists(BASE_DIR.'/media/photos')) {
                    
$dirs[] = '/media/photos';
                }
                
                if (
file_exists(BASE_DIR.'/media/photos/orig')) {
                    
$dirs[] = '/media/photos/orig';
                }
                
                if (
file_exists(BASE_DIR.'/media/photos/thumbs')) {
                    
$dirs[] = '/media/photos/thumbs';
                }
                
                if (
file_exists(BASE_DIR.'/media/pornstars')) {
                    
$dirs[] = '/media/pornstars';
                }
                
                if (
file_exists(BASE_DIR.'/media/videos/mobile')) {
                    
$dirs[] = '/media/videos/mobile';
                }
            }
        }
        
        
$failed = array();
        foreach (
$dirs as $dir) {
            if (!
file_exists(BASE_DIR.$dir) OR !is_writable(BASE_DIR.$dir)) {
                
$failed[] = $dir;
            }
        }
        
        if (
$failed) {
            
$this->required['dirs']['status']    = false;
            
$this->required['dirs']['error']    = 'The '.implode(', '$failed).' directories must be writable by the web server!';
            
$this->errors[]                        = 'required.dirs';
        }
        
        return 
$this->required;
    }
    
    public function 
get_optional_results()
    {
        
$this->optional['opcache'] = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Zend OPcache Support'
        
);
        
        if (!
function_exists('opcache_reset')) {
            
$this->optional['opcache']['status']    = false;
            
$this->optional['opcache']['error']        = 'While this extension is optional, it will speed up overall script/site functionality!';
        }
        
        
$this->optional['mbstring']    = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Multibyte String (mbstring) Support'
        
);
        
        if (!
extension_loaded('mbstring')) {
            
$this->optional['mbstring']['status'] = false;
            
$this->optional['mbstring']['error']  = 'While optional, if you plan to have UTF-8 text on your site Multibyte String will increase the speed of the site!';
        }

        
$this->optional['json'] = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'JavaScript Object Notation (JSON) Support'
        
);
        
        if (!
function_exists('json_encode')) {
            
$this->optional['json']['status'] = false;
            
$this->optional['json']['error']  = 'While this extension is optional, it will speed up ajax requests!';
        }
        
        return 
$this->optional;
    }
    
    public function 
get_recommended_results()
    {
        
$this->recommended['safe_mode'] = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Safe Mode (Off)',
            
'warning'    => 1
        
);
        
        if (
ini_get('safe_mode') != '' && ini_get('safe_mode') == 'On') {
            
$this->recommended['safe_mode']['status']    = false;
            
$this->recommended['safe_mode']['error']    = 'PHP Safe Mode is On. This will prevent the script from running correctly (it partially works)!';
        }
        
        
$this->recommended['open_basedir'] = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Open Basedir (Off)',
            
'warning'    => 1
        
);
        
        if (
ini_get('open_basedir') != '') {
            
$this->recommended['open_basedir']['status']     = false;
            
$this->recommended['open_basedir']['error']        = 'PHP Open Basedir is On. While this setting does not prevent the script from running correctly, you must make sure all media binaries are in the open_basedir path!';
        }
        
        
$this->recommended['display_errors'] = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Display Errors (Off)',
            
'warning'    => 1
        
);
        
        if (
ini_get('display_errors') == '1') {
            
$this->recommended['display_errors']['status']    = false;
            
$this->recommended['display_errors']['error']    = 'PHP Display Errors is On. While this setting does not prevent the script from running correctly, it should be disabled on production servers!';
        }
        
        
$this->recommended['file_uploads'] = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'File Uploads (On)',
            
'warning'    => 0
        
);
        
        if (
ini_get('file_uploads') != '1') {
            
$this->recommended['file_uploads']['status']    = false;
            
$this->recommended['file_uploads']['error']        = 'PHP File Uploads is Off. This setting will disable the upload for the administrator and users!';
            
$this->errors[]                                    = 'recommended.uploads';
        }
        
        
$this->recommended['magic_quotes_runtime'] = array(
            
'status'    => true,
            
'error'        => '',
            
'message'    => 'Magic Quotes Runtime (Off)',
            
'warning'    => 1
        
);
        
        if (
ini_get('magic_quotes_runtime') == '1') {
            
$this->recommended['magic_quotes_runtime']['status'] = false;
            
$this->recommended['magic_quotes_runtime']['error']     = 'PHP Magic Quotes Runtime is On. While this setting does not prevent the script from running correctly, it will add ' to generated content!';
        }
        
        $this->recommended['
register_globals'] = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'Register Globals (Off)',
            '
warning'    => 1
        );
        
        if (ini_get('
register_globals') == '1') {
            $this->recommended['
register_globals']['status'] = false;
            $this->recommended['
register_globals']['error']  = 'PHP Register Globals in On. While this setting does not prevent the script from running correctlyit is generally recommend you disable Register Globals!';
        }
        
        $this->recommended['
upload_max_filesize'] = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'Upload Maximum Filesize',
            '
warning'    => 1,
            '
system'    => 1
        );
        
        $max_size = ini_get('
upload_max_filesize');
        if ((int) $max_size < $this->vcfg['
video_max_size']) {
            $this->recommended['
upload_max_filesize']['status']    = false;
            $this->recommended['
upload_max_filesize']['error']  = 'The maximum size of an uploaded file setting in PHP is lower than the setting in the Video configurationFiles bigger than '.$max_size.' MB will fail to upload!';
        }
        
        $this->recommended['
post_max_size'] = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'Post Maximum Size',
            '
warning'    => 1,
            '
system'    => 1
        );
        
        $max_size = ini_get('
post_max_size');
        if ((int) $max_size < ($this->vcfg['
video_max_size'] +20)) {
            $this->recommended['
post_max_size']['status'] = false;
            $this->recommended['
post_max_size']['error']  = 'The maximum size of the form elements setting in PHP is lower than the setting in the Video configurationFiles bigger than '.$max_size.' MB will fail to upload!';
        }
        
        $this->recommended['
max_execution_time'] = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'Maximum Execution Time',
            '
warning'    => 1,
            '
system'    => 1
        );
        
        $max_time = ini_get('
max_execution_time');
        if ((int) $max_time < MAX_EXECUTION_TIME) {
            $this->recommended['
max_execution_time']['status'] = false;
            $this->recommended['
max_execution_time']['error']  = 'The maximum script execution time setting in PHP is lower than '.MAX_EXECUTION_TIME.'Some functions (big file uploadbig file video conversion...) will not work correctly!';
        }
        
        $this->recommended['
memory_limit'] = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'Memory Limit',
            '
warning'    => 1,
            '
system'    => 1
        );
        
        $memory_limit = ini_get('
memory_limit');
        if ((int) $memory_limit < ($this->vcfg['
video_max_size']+2)) {
            $this->recommended['
memory_limit']['status']    = false;
            $this->recommended['
memory_limit']['error']        = 'The PHP memory limit setting is lower than '.($this->vcfg['video_max_size']+2).'File larger than '.($this->vcfg['video_max_size']+2).' will fail to uploadThis setting affects the script only if PHP was compiled with --enable-memory-limit!';
        }
        
        $this->recommended['
disable_functions'] = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'Disabled Functions',
            '
warning'    => 1
        );
        
        $disable_functions    = ini_get('
disable_functions');
        if ($disable_functions != '') {
            $disable_array    = explode('
,', $disable_functions);
            foreach ($disable_array as $function) {
                $function = trim($function);
                if ($function == '
exec' OR $function == 'escapeshellarg' OR
                    $function == '
escapeshellcmd') {
                    $this->recommended['
disable_functions']['status']    = false;
                    $this->recommended['
disable_functions']['error']    = 'PHP functions 'exec()' and/or 'escapeshellarg' and/or 'escapeshellcmd' are disabledThis function is required for the script to work properlyVideo uploadvideo embeddingvideo importing and other features will not workPlease remove 'exec''escapeshellcmd' and 'escapeshellarg' from the disabled functions list in php.ini!';
                }
            }    
        }
        
        return $this->recommended;
    }
    
    public function get_cli_results()
    {
        $php_cli_path        = VF::cfg_core_item('
php_cli_path');
        $this->cli['
php']    = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'PHP Cli >= 5.2 ('.$php_cli_path.')',
            '
warning'    => 0
        );
        
        $cmd    = escapeshellcmd($php_cli_path).' 
-"echo PHP_VERSION,'*',php_sapi_name();"';
        exec($cmd, $output);
        if ($output) {
            $result = $output['
0'];
            $result    = explode('
*', $result);
            if (!isset($result['
0']) OR !isset($result['1'])) {
                $this->cli['
php']['status']    = false;
                $this->cli['
php']['error']        = 'PHP CLI (>= 5.2binary is requiredVideo uploadsvideo conversionvideo importingvideo embedding and other important features will not work without the PHP CLI binary!';
            } else {
                if (version_compare($result['
0'], '5.2', '<')) {
                    $this->cli['
php']['status']    = false;
                    $this->cli['
php']['error']        = 'You need PHP CLI >= 5.2 to run Adult Script Pro and use the new features this version of PHP provides!';
                }
                
                if ($result['
1'] != 'cli') {
                    $this->cli['
php']['status']    = false;
                    $this->cli['
php']['error']        = 'The PHP CLI configuration field points to a PHP binary that is not CLIPlease make sure you have the right path for the CLI binary (not CGI)!';
                }
            }
        } else {
            $this->cli['
php']['status']    = false;
            $this->cli['
php']['error']        = 'PHP CLI (>= 5.2binary is requiredVideo uploadsvideo conversionvideo importingvideo embedding and other important features will not work without the PHP CLI binary!';
        }
        
        return $this->cli;
    }
    
    public function get_media_results()
    {
        $ffprobe_path    = $this->vcfg['
ffprobe_path'];
        $this->media['
ffprobe']    = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'FFProbe ('.$ffprobe_path.')'
        );

        if ($ffprobe_path != '') {
            if (!file_exists($this->vcfg['
ffprobe_path']) OR
                  !is_file($this->vcfg['
ffprobe_path']) OR
                  !is_executable($this->vcfg['
ffprobe_path'])) {
                  $this->media['
ffprobe']['status']    = false;
                  $this->media['
ffprobe']['error']        = 'FFprobe was not found (or ffprobe is not executable by the web server user)! Please make sure you specified the correct path to ffprobe in the Video configuration and that ffprobe is included in the open_basedir path (if open_basedir is enabled)!';
            }
        } else {
              $this->media['
ffprobe']['status']    = false;
              $this->media['
ffprobe']['error']    = 'FFprobe tool path was not set in the Video configurationVideo conversion will not work correctly!';
        }
    
        $ffmpeg_path = $this->vcfg['
ffmpeg_path'];
        $this->media['
ffmpeg']    = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'FFMpeg ('.$ffmpeg_path.')',
            '
encode'    => array(
                '
flv'         => 'Flash Video (flv)',
                '
mp3'         => 'MPEG Audio Layer 3 (mp3)',
                '
h264'         => 'H264/AVC/MPEG-4 Part 10 (h264)',
                '
aac'        => 'Advanced Audio Coding (aac)',
                '
image2'    => 'Image2 Sequence (image2)'
            ),
            '
decode'    => array(
                '
flv'            => 'Flash Video (flv)',
                '
mp2'            => 'MPEG Audio Layer 2 (mp2)',
                '
mp3'             => 'MPEG Audio Layer 3 (mp3)',
                '
h263'            => 'H263 (h263)',
                '
h264'             => 'H264/AVC/MPEG-4 Part 10 (h264)',
                '
aac'            => 'Advanced Audio Coding (aac)',
                '
m4v'            => 'Itunes Video File (m4v)',
                '
mov'            => 'Quicktime (mov)',
                '
asf'            => 'Advanced Systems Format (asf)',
                '
ogg'            => 'OGG (Open Standard Container) (ogg)',
                '
mp4'            => 'MPEG-4 Part 14 (mp4)',
                '
amr'            => 'Adaptive Multi-Rate Audio Codec (amr)',
                '
avi'            => 'Audio Video Interleave (avi)',
                '
matroska'        => 'Matroska Multimedia Container (mkv)',
                '
mpeg1video'     => 'MPEG-1 Video (mpeg1video)',
                '
mpeg2video'    => 'MPEG-2 Video (mpeg2video)',
                '
rm'            => 'Real Media (rm)',
                '
ipod'            => 'iPod H.264 MP4 (ipod)'
            ),
            '
formats'    => array(),
        );
        
        if ($ffmpeg_path != '') {
            if (!file_exists($this->vcfg['
ffmpeg_path']) OR
                  !is_file($this->vcfg['
ffmpeg_path']) OR
                  !is_executable($this->vcfg['
ffmpeg_path'])) {
                  $this->media['
ffmpeg']['status']    = false;
                  $this->media['
ffmpeg']['error']        = 'FFmpeg was not found (or ffmpeg is not executable by the web server user)! Please make sure you specified the correct path to ffmpeg in the Video configuration and that ffmpeg is included in the open_basedir path (if open_basedir is enabled)!';
            }
        } else {
              $this->media['
ffmpeg']['status']    = false;
              $this->media['
ffmpeg']['error']    = 'FFmpeg tool path was not set in the Video configurationVideo conversion will not work correctly!';
        }
        
        if ($this->media['
ffmpeg']['status'] === true) {
            $formats    = array();            
            $cmd         = $ffmpeg_path.' 
-formats';
            exec($cmd.' 
2>&1', $buffer);
            $buffer = implode("n", $buffer);
            preg_match_all('
/ (DE|D|E) (.*) {1,} (.*)/', $buffer, $matches);
            $count = count($matches['
1']);
            for ($i=0; $i<$count; ++$i) {
                  $formats[strtolower(trim($matches['
2'][$i]))] = array(
                      '
encode'    => ($matches['1'][$i] == 'DE' OR $matches['1'][$i] == 'E') ? true : false,
                      '
decode'    => ($matches['1'][$i] == 'DE' OR $matches['1'][$i] == 'D') ? true : false,
                  );
            }
            
            $this->media['
ffmpeg']['formats'] = $formats;
        }
        
        $this->media['
yamdi'] = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'Yamdi',
        );
        
        if ($this->vcfg['
yamdi_path'] != '') {
            if (!file_exists($this->vcfg['
yamdi_path']) OR
                  !is_file($this->vcfg['
yamdi_path']) OR
                  !is_executable($this->vcfg['
yamdi_path'])) {
                  $this->media['
yamdi']['status'] = false;
                  $this->media['
yamdi']['error']    = 'Yamdi (Yet Another MetaData Injector for FLVwas not found (or yamdi is not executable by the web server user)! Please make sure you specified the correct path for Yamdi in the Video Configuration!';
            }
        } else {
            $this->media['
yamdi']['status'] = false;
            $this->media['
yamdi']['error']    = 'Yamdi (Yet Another MetaData Injector for FLVwas not set in the Video ConfigurationVideo conversion will not work correctly!';
        }
        
        $this->media['
qtfaststart'] = array(
            '
status'    => true,
            '
error'        => '',
            '
message'    => 'QT FastStart',
        );
        
        if ($this->vcfg['
qtfaststart_path'] != '') {
            if (!file_exists($this->vcfg['
qtfaststart_path']) OR
                  !is_file($this->vcfg['
qtfaststart_path']) OR
                  !is_executable($this->vcfg['
qtfaststart_path'])) {
                  $this->media['
qtfaststart']['status']    = false;
                  $this->media['
qtfaststart']['error']    = 'QT Faststart not found (or not executable by the web server user)! Please make sure you specified the correct path for qt-faststart in the Video Configuration!';
            }
        } else {
            $this->media['
qtfaststart']['status'] = false;
            $this->media['
qtfaststart']['error'] = 'QT FastStart was not set in the Video ConfigurationVideo conversion will not work!';
        }
        
        if (VF::cfg_item('
module.video.thumb_extr') == 'imagick') {
            $this->media['
convert'] = array(
                '
status'    => true,
                '
error'        => '',
                '
message'    => 'ImageMagick Convert'
            );
            
            if ($this->vcfg['
convert_path'] != '') {
                if (!file_exists($this->vcfg['
convert_path']) or
                    !is_file($this->vcfg['
convert_path']) or
                    !is_executable($this->vcfg['
convert_path'])) {
                      $this->media['
convert']['status']    = false;
                      $this->media['
convert']['error']    = 'Image Magick convert not found (or not executable by the web server user)! Please make sure you specified the correct path for convert in the Video Configuration!';
                }
            } else {
                $this->media['
convert']['status'] = false;
                $this->media['
convert']['error'] = 'ImageMagick convert was not set in the Video ConfigurationThumb extraction/optimization will not work!';
            }
        }
        
        return $this->media;
    }
    
    public function is_error()
    {
        if ($this->errors) {
            return true;
        }
        
        return false;
    }
    
    public function get_errors()
    {
        return $this->errors;
    }
}
Онлайн: 0
Реклама