Имется на установку модуль галери от кодканьйон. https://codecanyon.net/item/opencart-gallery-/7798516 В админке ложится норм, лог ошиок чист, лог вкьмода чист. Ошибку вызывает вкьюмод самого модуля, без него сайт грузится норм. PHP: <modification> <id>VQMOD FOR PO CMS</id> <version>1.4.x and 1.5.x</version> <vqmver>2.2.0</vqmver> <author>premieropencart.com</author> <file name="catalog/controller/common/seo_url.php"> <operation> <search position="after"><![CDATA[$url = explode('=', $query->row['query']);]]></search> <add> <![CDATA[/*Opencart Gallery*/ if ($url[0] == 'album_id') { $this->request->get['album_id'] = $url[1]; } if ($url[0] == 'video_id') { $this->request->get['video_id'] = $url[1]; } /*Opencart Gallery*/]]> </add> </operation> <operation> <search position="before"><![CDATA[if (isset($this->request->get['route'])) {]]> </search> <add> <![CDATA[elseif (isset($this->request->get['album_id'])) { $this->request->get['route'] = 'gallery/album'; } elseif (isset($this->request->get['video_id'])) { $this->request->get['route'] = 'gallery/video'; }]]> </add> </operation> <operation> <search position="replace"><![CDATA[($data['route'] == 'product/product' && $key == 'product_id') ||]]> </search> <add> <![CDATA[($data['route'] == 'product/product' && $key == 'product_id') || ($data['route'] == 'gallery/album' && $key == 'album_id') || ($data['route'] == 'gallery/video' && $key == 'video_id') ||]]> </add> </operation> <operation> <search position="replace"><![CDATA[elseif ($key == 'path')]]></search> <add> <![CDATA[elseif ($key == 'path' || $key == 'npath')]]> </add> </operation> </file> </modification> --- Добавлено, 4 дек 2018 --- В логах апача нахожу: Код: mod_fcgid: stderr: PHP Notice: Constant HTTP_IMAGE already defined in /config.php on line 9 mod_fcgid: stderr: PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in system/database/mysql.php on line 6 mod_fcgid: stderr: PHP Parse error: syntax error, unexpected 'elseif' (T_ELSEIF) in vqmod/vqcache/vq2-catalog_controller_common_seo_url.php on line 252 --- Добавлено, 4 дек 2018 --- Разбираемся с первым. У меня прописано: // HTTPS define('HTTPS_SERVER', 'https://*****/'); define('HTTPS_IMAGE', 'https://******/image/'); define('HTTP_IMAGE', 'https://'.$_SERVER['HTTP_HOST'].'/image/'); --- Добавлено, 4 дек 2018 --- define('HTTP_IMAGE', 'https://'.$_SERVER['HTTP_HOST'].'/image/'); переписывать? --- Добавлено, 4 дек 2018 --- По 3-му в 252 строке имеем: PHP: public function rewrite($link) { $url_info = parse_url(str_replace('&', '&', $link)); /* = 8 ver156*/ list ($this->l_code_session, $this->l_id_session) = $this->seoController->setLanguageData(); /* = 16 */ /*$link = rtrim(str_replace('index.php', '', $link));*/ /* = */ if(!isset($url_info['query']))return $link; /* = */ $blogVirtualEnb = $this->config->get('blogSetting_virDir'); $blogVirtualDir = ''; if ( $this->config->get('blogSetting_virDir')) { if ($this->config->get('blogSetting_virDirName') != '') { $blogVirtualDir = $this->config->get('blogSetting_virDirName'); } else { $blogVirtualDir = 'blog'; } }
отправь весь файл: vqmod/vqcache/vq2-catalog_controller_common_seo_url.php , а VQMOD только один, тот что вверху выложен ?
Весь файл PHP: <?phpclass ControllerCommonSeoUrl extends Controller { /* = 1.2 */ private $seoController, $ssb_helper, $ssb_data, $ssb_setting; private $def_lang_code, $totalLanguages, $l_code_session, $l_id_session, $seo_pagination = false; /* = */ /* = 1.1.a */ function __construct(){ global $registry; parent::__construct($registry); require_once(DIR_CONFIG .'ssb_library/ssb_seo_controller.php'); $this->seoController = seoController::getInstance(); require_once DIR_CONFIG .'ssb_library/ssb_helper.php'; $this->ssb_helper = ssb_helper::getInstance(); require_once DIR_CONFIG .'ssb_library/ssb_data.php'; $this->ssb_data = ssb_data::getInstance(); $this->ssb_setting = $this->ssb_data->getSetting(); list ($this->totalLanguages, $this->def_lang_code) = $this->seoController->getDefaultLanguageData(); list ($this->l_code_session, $this->l_id_session) = $this->seoController->setLanguageData(); } /* = */ public function index() { /* = */ if(!$this->ssb_setting['entity']['urls']['CPBI_urls']['controller']){ if($this->ssb_data->getEntityStatus('urls')){ if(isset($_SESSION['ssb_language_id']) AND $_SESSION['ssb_language_id'] != ''){ $this->config->set('config_language_id', $_SESSION['ssb_language_id']); } global $vqmod; if(isset($vqmod)){ require_once $vqmod->modCheck(DIR_CONFIG .'ssb_library/catalog/controller/common/ssb_seo_url.php'); }else{ require_once VQMod::modCheck(DIR_CONFIG .'ssb_library/catalog/controller/common/ssb_seo_url.php'); } $ssb_seo_url = ssb_seo_url::getInstance(); return $ssb_seo_url->index(); } } /* = */ // Add rewrite to url class if ($this->config->get('config_seo_url')) { $this->url->addRewrite($this); } // Decode URL /* = 2 */ $this->curPageURL = $this->seoController->curPageURL(); $setting = $this->ssb_setting; $tools = $setting['tools']; if(substr($this->curPageURL,-1) == '/' AND $tools['trailing_slash']['status'] == true) { $home_url = str_replace(array('http://','https://'), '', rtrim(HTTP_SERVER, '/')); $new_url = rtrim($this->curPageURL,"/"); if($home_url !== str_replace(array('http://','https://'), '',$new_url)) $this->ssb_helper->redirect($new_url, 301); } if(isset($this->request->get['route']) AND !isset($this->request->get['_route_'])){ $this->seoController->alternetHref(); $this->seoController->errorNotFound(); if($this->ssb_setting['tools']['seo_redirect']['status']){ $seoVerOfurl = $this->rewrite($this->curPageURL); if($seoVerOfurl != $this->curPageURL){ if(!$seoVerOfurl)$seoVerOfurl = '/'; $this->ssb_helper->redirect($seoVerOfurl, 301); } } return $this->forward($this->request->get['route']); }else if(isset($this->request->get['_route_']) AND trim($this->request->get['_route_'], '/') == $this->l_code_session){ $this->seoController->alternetHref(); return $this->forward('common/home'); } $no_exist_one_of_url_part = false; /* = */ if (isset($this->request->get['_route_'])) { $blogVirtualEnb = $this->config->get('blogSetting_virDir'); $blogVirtualDir = ''; if ( $this->config->get('blogSetting_virDir')) { if ($this->config->get('blogSetting_virDirName') != '') { $blogVirtualDir = $this->config->get('blogSetting_virDirName'); } else { $blogVirtualDir = 'blog'; } } $parts = explode('/', $this->request->get['_route_']); /* = 3 */ $parts_length = count($parts); $CPBI_urls_ext = $setting['entity']['urls']['CPBI_urls']['ext']; $CPBI_urls_ext = $CPBI_urls_ext == '' ? '##empty##' : $CPBI_urls_ext ; $pagin_part = false; if($tools['seo_pagination']['status']){foreach($parts as $part){if(strpos($part, 'page-') !== false){$pagin_part = true;}}} $arrayLangCode = array(); if($this->totalLanguages > 1){$arrayLangCode = $this->ssb_helper->getArrayLangCode();} $i = 1; /* = */ foreach ($parts as $part) { /* = 4 */ $part = trim($part); if (empty($part)) continue; if (in_array($part, $arrayLangCode)){$i++; continue;} if(preg_match("/page-[0-9]/i", $part) === 1){ if($tools['seo_pagination']['status']){$this->seo_pagination = (int)str_replace('page-', '', $part);} $this->request->get['page'] = $this->seo_pagination; continue; } if(strpos($part, 'change-') !== false){ $chage_lang = str_replace('change-', '', $part); if(isset($chage_lang) AND in_array($chage_lang, $arrayLangCode)){ $chage_lang_code = $chage_lang; if(isset($_SESSION['last_request_' . $chage_lang_code])){ $this->request->post['redirect'] = $_SESSION['last_request_' . $chage_lang_code]; $this->request->post['language_code'] = $chage_lang_code; return $this->forward('module/language'); }else{continue;} } } $pre_last_part = $parts_length - 1; if($pagin_part && strpos($part, $CPBI_urls_ext) === false && $pre_last_part == $i){ $keyword_condition = "(keyword = '" . $this->db->escape($part) . "' OR keyword = '" . $this->db->escape($part . $CPBI_urls_ext) . "')"; }elseif(strpos($part, $CPBI_urls_ext) !== false && $parts_length == $i && $setting['tools']['suffix_manager']['status']){ $keyword_condition = "(keyword = '" . $this->db->escape($part) . "' OR keyword = '" . $this->db->escape(str_replace($CPBI_urls_ext, '', $part)) . "')"; }else{ $keyword_condition = "keyword = '" . $this->db->escape($part) . "'"; } $i++; $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE ". $keyword_condition); /* = */ if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ $url = explode('=', $query->row['query']); /* = 5.5 */ if (isset($url[0]) AND !isset($url[1])) { $this->request->get['route'] = $url[0]; } /* = */ if ($url[0] == 'blog_article_id') { $this->request->get['article_id'] = $url[1]; } if ($url[0] == 'blog_category_id') { if (!isset($this->request->get['category_id'])) { $this->request->get['category_id'] = $url[1]; } else { $this->request->get['category_id'] .= '_' . $url[1]; } } if ($url[0] == 'product_id') { $this->request->get['product_id'] = $url[1]; } if ($url[0] == 'category_id') { if (!isset($this->request->get['path'])) { $this->request->get['path'] = $url[1]; } else { $this->request->get['path'] .= '_' . $url[1]; } } if ($url[0] == 'manufacturer_id') { $this->request->get['manufacturer_id'] = $url[1]; } if ($url[0] == 'information_id') { $this->request->get['information_id'] = $url[1]; } } else { // 6 $no_exist_one_of_url_part = true; $this->request->get['route'] = 'error/not_found'; } } if (isset($this->request->get['product_id'])) { $this->request->get['route'] = 'product/product'; } elseif ($blogVirtualEnb && ($this->request->get['_route_'] == $blogVirtualDir || $this->request->get['_route_'] == $blogVirtualDir . '/')) { $this->request->get['route'] = 'blog/category/home'; } elseif ($this->request->get['_route_'] == 'blog-comments' || $this->request->get['_route_'] == 'blog-comments/') { $this->request->get['route'] = 'blog/article/comment'; } elseif (isset($this->request->get['article_id'])) { $this->request->get['route'] = 'blog/article'; } elseif (isset($this->request->get['category_id'])) { $this->request->get['route'] = 'blog/category'; } elseif (isset($this->request->get['path'])) { $this->request->get['route'] = 'product/category'; } elseif (isset($this->request->get['manufacturer_id'])) { $this->request->get['route'] = 'product/manufacturer/info'; } elseif (isset($this->request->get['information_id'])) { $this->request->get['route'] = 'information/information'; } /* =7 */ $no_exist_one_of_url_part = isset($no_exist_one_of_url_part) ? $no_exist_one_of_url_part : false; $this->seoController->checkPathController($no_exist_one_of_url_part); if(isset($urlWasCange) AND $urlWasCange){$this->seoController->redirectPermanently();} $this->seoController->alternetHref(); $this->seoController->errorNotFound(); /* = */ if (isset($this->request->get['route'])) { if ($this->request->get['_route_'] == "faq") { $this->request->get['route'] = 'module/questions_and_answers/faq'; } return $this->forward($this->request->get['route']); } } } public function rewrite($link) { $url_info = parse_url(str_replace('&', '&', $link)); /* = 8 ver156*/ list ($this->l_code_session, $this->l_id_session) = $this->seoController->setLanguageData(); /* = 16 */ /*$link = rtrim(str_replace('index.php', '', $link));*/ /* = */ if(!isset($url_info['query']))return $link; /* = */ $blogVirtualEnb = $this->config->get('blogSetting_virDir'); $blogVirtualDir = ''; if ( $this->config->get('blogSetting_virDir')) { if ($this->config->get('blogSetting_virDirName') != '') { $blogVirtualDir = $this->config->get('blogSetting_virDirName'); } else { $blogVirtualDir = 'blog'; } } $url = ''; $data = array(); parse_str($url_info['query'], $data); /* = 9 ver156*/ $CPBI_urls_ext = $this->ssb_setting['entity']['urls']['CPBI_urls']['ext']; list ($data, $this->path_mode) = $this->seoController->startPathManager($data); $page_part = false; /* = */ if(isset($_SESSION['siteGenerate'])){ require_once DIR_CONFIG .'psm_library/gen_sitemap/front_manager.php'; $frontManager = frontManager::getInstance(); $sg_setting = $frontManager->getSetting('entity'); $page_type = ''; $path_mode = 'default'; if(isset($data['route']) && $data['route'] == 'product/product' && isset($data['product_id'])){ $path_mode = $sg_setting['sitemap']['product']['setting']['mode']; $page_type = 'product'; $product_id = $data['product_id']; }else if(isset($data['path'])){ $path_mode = $sg_setting['sitemap']['category']['setting']['mode']; $page_type = 'category'; } if($path_mode == 'direct'){ switch ($page_type) { case 'product': unset($data['path']); break; case 'category': $categories = explode('_', $data['path']); $category_id = $categories[count($categories)-1]; if(isset($data['path'])){ $data['path'] = $category_id; }else{ $data = array('path' => $category_id) + $data; } break; } }else if($path_mode != 'default'){ require_once DIR_CONFIG .'psm_library/gen_sitemap/path_controller.php'; $this->pathController = pathController::getInstance(); switch ($page_type) { case 'product': $new_path = $this->pathController->getProductPath($product_id, $path_mode); if(count($new_path)){ if(isset($data['path'])){ $data['path'] = $new_path[count($new_path)-1]['path']; }else{ $data = array('path' => $new_path[count($new_path)-1]['path']) + $data; } } break; case 'category': $categories = explode('_', $data['path']); $category_id = $categories[count($categories)-1]; $new_path = $this->pathController->getCaregoryPath($category_id, $path_mode); if(isset($data['path'])){ $data['path'] = $new_path[count($new_path)-1]['path']; }else{ $data = array('path' => $new_path[count($new_path)-1]['path']) + $data; } break; } } } foreach ($data as $key => $value) { if (isset($data['route'])) { if (($data['route'] == 'product/product' && $key == 'product_id') || (($data['route'] == 'product/manufacturer/info' || $data['route'] == 'product/product') && $key == 'manufacturer_id') || ($data['route'] == 'information/information' && $key == 'information_id')) { /* = 10 */ if($data['route'] == 'product/product' && $key == 'manufacturer_id' && $this->path_mode != 'default'){ unset ( $data[$key] ); continue; } /* = */ $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = '" . $this->db->escape($key . '=' . (int)$value) . "'"); if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ $url .= '/' . $query->row['keyword']; unset($data[$key]); /* = 13 repeat-2*/ if(isset($found_category)){ if($found_category && !isset($data['product_id']) && $this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$url .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; unset($found_category); } /* = */ } } elseif ($blogVirtualEnb && isset($data['route']) && $data['route'] == 'blog/category/home') { $url .= '/' . $blogVirtualDir; unset($data['route']); } elseif (isset($data['route']) && $data['route'] == 'blog/article/comment') { $url .= '/blog-comments'; unset($data['route']); } elseif ($key == 'article_id') { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'blog_" . $this->db->escape($key . '=' . (int)$value) . "'"); if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ if($this->config->get('blogSetting_virDir')) { $url .= '/' . $blogVirtualDir; } $url .= '/' . $query->row['keyword']; $article_url = '/' . $query->row['keyword']; } unset($data[$key]); /* = 13 repeat-2*/ if(isset($found_category)){ if($found_category && !isset($data['product_id']) && $this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$url .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; unset($found_category); } /* = */ } elseif ($key == 'category_id') { $categories = explode('_', $value); $excludeCat = $this->config->get('blogSetting_virDirExclude'); $cat_check = ''; $cat_url = ''; foreach ($categories as $category) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'blog_category_id=" . (int)$category . "'"); if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ $cat_check = 1; $cat_url .= '/' . $query->row['keyword']; } else { $notAllAlias = 1; } } $cat_virdir = ''; if($cat_check && $this->config->get('blogSetting_virDir')) { if (!in_array($categories[0], $excludeCat)) { $cat_virdir .= '/' . $blogVirtualDir; } } if (!isset($notAllAlias)) { $url = $cat_virdir . $cat_url; $category_url = $url; } unset($data[$key]); /* = 13 repeat-2*/ if(isset($found_category)){ if($found_category && !isset($data['product_id']) && $this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$url .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; unset($found_category); } /* = */ } elseif ($key == 'route' && $value == 'module/questions_and_answers/faq') { $url .= '/faq'; /* = 11 */ } elseif ($key == 'route' AND $value != 'product/product' AND $value != 'product/category') { $sql = "SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = '" . $this->db->escape($value) . "'"; $query = $this->db->query($sql); if ($query->num_rows) { foreach($query->rows as $row){ if($row['language_id'] == (int)$this->l_id_session){ $url .= '/' . $row['keyword']; break; } } } /* = */ } elseif ($key == 'path') { $categories = explode('_', $value); /* = 12 */ $found_category = false; /* = */ foreach ($categories as $category) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'category_id=" . (int)$category . "'"); if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ $url .= '/' . $query->row['keyword']; } } unset($data[$key]); /* = 13 repeat-2*/ if(isset($found_category)){ if($found_category && !isset($data['product_id']) && $this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$url .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; unset($found_category); } /* = */ } } } if (isset($article_url) && $article_url && isset($category_url) && $category_url) { $url = $category_url . $article_url; } if ($url) { unset($data['route']); $query = ''; if ($data) { foreach ($data as $key => $value) { /* = 14 */ if($this->ssb_setting['tools']['seo_pagination']['status'] && $key == 'page' && $value != '{page}')continue; /* = */ $query .= '&' . $key . '=' . $value; } if ($query) { $query = '?' . trim($query, '&'); } } /* = 15 ver156*/ if($this->totalLanguages > 1 AND $this->ssb_setting['tools']['lang_dir_link']['data']['prefix']){ $host = $this->seoController->getHost($url_info); $path = $this->seoController->getPath($this->l_code_session, $host, $url_info); }else{ $host = $url_info['scheme'] . '://' . $url_info['host']; $path = str_replace('/index.php', '', $url_info['path']); } if($page_part){ list($page_part, $url_info) = $this->seoController->getPagePart($url_info); }else{ $page_part = ''; } $link = $host . (isset($url_info['port']) ? ':' . $url_info['port'] : '') . $path . $url . $page_part .$query; return rtrim($link, '/'); /* = */ return $url_info['scheme'] . '://' . $url_info['host'] . (isset($url_info['port']) ? ':' . $url_info['port'] : '') . str_replace('/index.php', '', $url_info['path']) . $url . $query; } else { /* = 16 */ /*$link = rtrim(str_replace('index.php', '', $link));*/ /* = */ return $link; } } }?> --- Добавлено, 4 дек 2018 --- Вкьмод тот из-за которого возникает ошибка указан выше. --- Добавлено, 4 дек 2018 --- Сам файл сео_урл PHP: <?phpclass ControllerCommonSeoUrl extends Controller { public function index() { // Add rewrite to url class if ($this->config->get('config_seo_url')) { $this->url->addRewrite($this); } // Decode URL if (isset($this->request->get['_route_'])) { $parts = explode('/', $this->request->get['_route_']); foreach ($parts as $part) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE keyword = '" . $this->db->escape($part) . "'"); if ($query->num_rows) { $url = explode('=', $query->row['query']); if ($url[0] == 'product_id') { $this->request->get['product_id'] = $url[1]; } if ($url[0] == 'category_id') { if (!isset($this->request->get['path'])) { $this->request->get['path'] = $url[1]; } else { $this->request->get['path'] .= '_' . $url[1]; } } if ($url[0] == 'manufacturer_id') { $this->request->get['manufacturer_id'] = $url[1]; } if ($url[0] == 'information_id') { $this->request->get['information_id'] = $url[1]; } } else { $this->request->get['route'] = 'error/not_found'; } } if (isset($this->request->get['product_id'])) { $this->request->get['route'] = 'product/product'; } elseif (isset($this->request->get['path'])) { $this->request->get['route'] = 'product/category'; } elseif (isset($this->request->get['manufacturer_id'])) { $this->request->get['route'] = 'product/manufacturer/info'; } elseif (isset($this->request->get['information_id'])) { $this->request->get['route'] = 'information/information'; } if (isset($this->request->get['route'])) { return $this->forward($this->request->get['route']); } } } public function rewrite($link) { $url_info = parse_url(str_replace('&', '&', $link)); $url = ''; $data = array(); parse_str($url_info['query'], $data); foreach ($data as $key => $value) { if (isset($data['route'])) { if (($data['route'] == 'product/product' && $key == 'product_id') || (($data['route'] == 'product/manufacturer/info' || $data['route'] == 'product/product') && $key == 'manufacturer_id') || ($data['route'] == 'information/information' && $key == 'information_id')) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = '" . $this->db->escape($key . '=' . (int)$value) . "'"); if ($query->num_rows) { $url .= '/' . $query->row['keyword']; unset($data[$key]); } } elseif ($key == 'path') { $categories = explode('_', $value); foreach ($categories as $category) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'category_id=" . (int)$category . "'"); if ($query->num_rows) { $url .= '/' . $query->row['keyword']; } } unset($data[$key]); } } } if ($url) { unset($data['route']); $query = ''; if ($data) { foreach ($data as $key => $value) { $query .= '&' . $key . '=' . $value; } if ($query) { $query = '?' . trim($query, '&'); } } return $url_info['scheme'] . '://' . $url_info['host'] . (isset($url_info['port']) ? ':' . $url_info['port'] : '') . str_replace('/index.php', '', $url_info['path']) . $url . $query; } else { return $link; } } }?>
Просмотрел, строки из vqmod-а галлереи, нигде не интегрируются, а вот какой то там сео-манагер, который некорректно прописывает свои данные - есть, но эта другая пъеса, к которой галлерея не имеет отношения.
Обновил файл кеша: PHP: <?phpclass ControllerCommonSeoUrl extends Controller { /* = 1.2 */ private $seoController, $ssb_helper, $ssb_data, $ssb_setting; private $def_lang_code, $totalLanguages, $l_code_session, $l_id_session, $seo_pagination = false; /* = */ /* = 1.1.a */ function __construct(){ global $registry; parent::__construct($registry); require_once(DIR_CONFIG .'ssb_library/ssb_seo_controller.php'); $this->seoController = seoController::getInstance(); require_once DIR_CONFIG .'ssb_library/ssb_helper.php'; $this->ssb_helper = ssb_helper::getInstance(); require_once DIR_CONFIG .'ssb_library/ssb_data.php'; $this->ssb_data = ssb_data::getInstance(); $this->ssb_setting = $this->ssb_data->getSetting(); list ($this->totalLanguages, $this->def_lang_code) = $this->seoController->getDefaultLanguageData(); list ($this->l_code_session, $this->l_id_session) = $this->seoController->setLanguageData(); } /* = */ public function index() { /* = */ if(!$this->ssb_setting['entity']['urls']['CPBI_urls']['controller']){ if($this->ssb_data->getEntityStatus('urls')){ if(isset($_SESSION['ssb_language_id']) AND $_SESSION['ssb_language_id'] != ''){ $this->config->set('config_language_id', $_SESSION['ssb_language_id']); } global $vqmod; if(isset($vqmod)){ require_once $vqmod->modCheck(DIR_CONFIG .'ssb_library/catalog/controller/common/ssb_seo_url.php'); }else{ require_once VQMod::modCheck(DIR_CONFIG .'ssb_library/catalog/controller/common/ssb_seo_url.php'); } $ssb_seo_url = ssb_seo_url::getInstance(); return $ssb_seo_url->index(); } } /* = */ // Add rewrite to url class if ($this->config->get('config_seo_url')) { $this->url->addRewrite($this); } // Decode URL /* = 2 */ $this->curPageURL = $this->seoController->curPageURL(); $setting = $this->ssb_setting; $tools = $setting['tools']; if(substr($this->curPageURL,-1) == '/' AND $tools['trailing_slash']['status'] == true) { $home_url = str_replace(array('http://','https://'), '', rtrim(HTTP_SERVER, '/')); $new_url = rtrim($this->curPageURL,"/"); if($home_url !== str_replace(array('http://','https://'), '',$new_url)) $this->ssb_helper->redirect($new_url, 301); } if(isset($this->request->get['route']) AND !isset($this->request->get['_route_'])){ $this->seoController->alternetHref(); $this->seoController->errorNotFound(); if($this->ssb_setting['tools']['seo_redirect']['status']){ $seoVerOfurl = $this->rewrite($this->curPageURL); if($seoVerOfurl != $this->curPageURL){ if(!$seoVerOfurl)$seoVerOfurl = '/'; $this->ssb_helper->redirect($seoVerOfurl, 301); } } return $this->forward($this->request->get['route']); }else if(isset($this->request->get['_route_']) AND trim($this->request->get['_route_'], '/') == $this->l_code_session){ $this->seoController->alternetHref(); return $this->forward('common/home'); } $no_exist_one_of_url_part = false; /* = */ if (isset($this->request->get['_route_'])) { $blogVirtualEnb = $this->config->get('blogSetting_virDir'); $blogVirtualDir = ''; if ( $this->config->get('blogSetting_virDir')) { if ($this->config->get('blogSetting_virDirName') != '') { $blogVirtualDir = $this->config->get('blogSetting_virDirName'); } else { $blogVirtualDir = 'blog'; } } $parts = explode('/', $this->request->get['_route_']); /* = 3 */ $parts_length = count($parts); $CPBI_urls_ext = $setting['entity']['urls']['CPBI_urls']['ext']; $CPBI_urls_ext = $CPBI_urls_ext == '' ? '##empty##' : $CPBI_urls_ext ; $pagin_part = false; if($tools['seo_pagination']['status']){foreach($parts as $part){if(strpos($part, 'page-') !== false){$pagin_part = true;}}} $arrayLangCode = array(); if($this->totalLanguages > 1){$arrayLangCode = $this->ssb_helper->getArrayLangCode();} $i = 1; /* = */ foreach ($parts as $part) { /* = 4 */ $part = trim($part); if (empty($part)) continue; if (in_array($part, $arrayLangCode)){$i++; continue;} if(preg_match("/page-[0-9]/i", $part) === 1){ if($tools['seo_pagination']['status']){$this->seo_pagination = (int)str_replace('page-', '', $part);} $this->request->get['page'] = $this->seo_pagination; continue; } if(strpos($part, 'change-') !== false){ $chage_lang = str_replace('change-', '', $part); if(isset($chage_lang) AND in_array($chage_lang, $arrayLangCode)){ $chage_lang_code = $chage_lang; if(isset($_SESSION['last_request_' . $chage_lang_code])){ $this->request->post['redirect'] = $_SESSION['last_request_' . $chage_lang_code]; $this->request->post['language_code'] = $chage_lang_code; return $this->forward('module/language'); }else{continue;} } } $pre_last_part = $parts_length - 1; if($pagin_part && strpos($part, $CPBI_urls_ext) === false && $pre_last_part == $i){ $keyword_condition = "(keyword = '" . $this->db->escape($part) . "' OR keyword = '" . $this->db->escape($part . $CPBI_urls_ext) . "')"; }elseif(strpos($part, $CPBI_urls_ext) !== false && $parts_length == $i && $setting['tools']['suffix_manager']['status']){ $keyword_condition = "(keyword = '" . $this->db->escape($part) . "' OR keyword = '" . $this->db->escape(str_replace($CPBI_urls_ext, '', $part)) . "')"; }else{ $keyword_condition = "keyword = '" . $this->db->escape($part) . "'"; } $i++; $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE ". $keyword_condition); /* = */ if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ $url = explode('=', $query->row['query']); /*Opencart Gallery*/ if ($url[0] == 'album_id') { $this->request->get['album_id'] = $url[1]; } if ($url[0] == 'video_id') { $this->request->get['video_id'] = $url[1]; } /*Opencart Gallery*/ /* = 5.5 */ if (isset($url[0]) AND !isset($url[1])) { $this->request->get['route'] = $url[0]; } /* = */ if ($url[0] == 'blog_article_id') { $this->request->get['article_id'] = $url[1]; } if ($url[0] == 'blog_category_id') { if (!isset($this->request->get['category_id'])) { $this->request->get['category_id'] = $url[1]; } else { $this->request->get['category_id'] .= '_' . $url[1]; } } if ($url[0] == 'product_id') { $this->request->get['product_id'] = $url[1]; } if ($url[0] == 'category_id') { if (!isset($this->request->get['path'])) { $this->request->get['path'] = $url[1]; } else { $this->request->get['path'] .= '_' . $url[1]; } } if ($url[0] == 'manufacturer_id') { $this->request->get['manufacturer_id'] = $url[1]; } if ($url[0] == 'information_id') { $this->request->get['information_id'] = $url[1]; } } else { // 6 $no_exist_one_of_url_part = true; $this->request->get['route'] = 'error/not_found'; } } if (isset($this->request->get['product_id'])) { $this->request->get['route'] = 'product/product'; } elseif ($blogVirtualEnb && ($this->request->get['_route_'] == $blogVirtualDir || $this->request->get['_route_'] == $blogVirtualDir . '/')) { $this->request->get['route'] = 'blog/category/home'; } elseif ($this->request->get['_route_'] == 'blog-comments' || $this->request->get['_route_'] == 'blog-comments/') { $this->request->get['route'] = 'blog/article/comment'; } elseif (isset($this->request->get['article_id'])) { $this->request->get['route'] = 'blog/article'; } elseif (isset($this->request->get['category_id'])) { $this->request->get['route'] = 'blog/category'; } elseif (isset($this->request->get['path'])) { $this->request->get['route'] = 'product/category'; } elseif (isset($this->request->get['manufacturer_id'])) { $this->request->get['route'] = 'product/manufacturer/info'; } elseif (isset($this->request->get['information_id'])) { $this->request->get['route'] = 'information/information'; } /* =7 */ $no_exist_one_of_url_part = isset($no_exist_one_of_url_part) ? $no_exist_one_of_url_part : false; $this->seoController->checkPathController($no_exist_one_of_url_part); if(isset($urlWasCange) AND $urlWasCange){$this->seoController->redirectPermanently();} $this->seoController->alternetHref(); $this->seoController->errorNotFound(); /* = */ elseif (isset($this->request->get['album_id'])) { $this->request->get['route'] = 'gallery/album'; } elseif (isset($this->request->get['video_id'])) { $this->request->get['route'] = 'gallery/video'; } if (isset($this->request->get['route'])) { if ($this->request->get['_route_'] == "faq") { $this->request->get['route'] = 'module/questions_and_answers/faq'; } return $this->forward($this->request->get['route']); } } } public function rewrite($link) { $url_info = parse_url(str_replace('&', '&', $link)); /* = 8 ver156*/ list ($this->l_code_session, $this->l_id_session) = $this->seoController->setLanguageData(); /* = 16 */ /*$link = rtrim(str_replace('index.php', '', $link));*/ /* = */ if(!isset($url_info['query']))return $link; /* = */ $blogVirtualEnb = $this->config->get('blogSetting_virDir'); $blogVirtualDir = ''; if ( $this->config->get('blogSetting_virDir')) { if ($this->config->get('blogSetting_virDirName') != '') { $blogVirtualDir = $this->config->get('blogSetting_virDirName'); } else { $blogVirtualDir = 'blog'; } } $url = ''; $data = array(); parse_str($url_info['query'], $data); /* = 9 ver156*/ $CPBI_urls_ext = $this->ssb_setting['entity']['urls']['CPBI_urls']['ext']; list ($data, $this->path_mode) = $this->seoController->startPathManager($data); $page_part = false; /* = */ if(isset($_SESSION['siteGenerate'])){ require_once DIR_CONFIG .'psm_library/gen_sitemap/front_manager.php'; $frontManager = frontManager::getInstance(); $sg_setting = $frontManager->getSetting('entity'); $page_type = ''; $path_mode = 'default'; if(isset($data['route']) && $data['route'] == 'product/product' && isset($data['product_id'])){ $path_mode = $sg_setting['sitemap']['product']['setting']['mode']; $page_type = 'product'; $product_id = $data['product_id']; }else if(isset($data['path'])){ $path_mode = $sg_setting['sitemap']['category']['setting']['mode']; $page_type = 'category'; } if($path_mode == 'direct'){ switch ($page_type) { case 'product': unset($data['path']); break; case 'category': $categories = explode('_', $data['path']); $category_id = $categories[count($categories)-1]; if(isset($data['path'])){ $data['path'] = $category_id; }else{ $data = array('path' => $category_id) + $data; } break; } }else if($path_mode != 'default'){ require_once DIR_CONFIG .'psm_library/gen_sitemap/path_controller.php'; $this->pathController = pathController::getInstance(); switch ($page_type) { case 'product': $new_path = $this->pathController->getProductPath($product_id, $path_mode); if(count($new_path)){ if(isset($data['path'])){ $data['path'] = $new_path[count($new_path)-1]['path']; }else{ $data = array('path' => $new_path[count($new_path)-1]['path']) + $data; } } break; case 'category': $categories = explode('_', $data['path']); $category_id = $categories[count($categories)-1]; $new_path = $this->pathController->getCaregoryPath($category_id, $path_mode); if(isset($data['path'])){ $data['path'] = $new_path[count($new_path)-1]['path']; }else{ $data = array('path' => $new_path[count($new_path)-1]['path']) + $data; } break; } } } foreach ($data as $key => $value) { if (isset($data['route'])) { if ( ($data['route'] == 'product/product' && $key == 'product_id') || ($data['route'] == 'gallery/album' && $key == 'album_id') || ($data['route'] == 'gallery/video' && $key == 'video_id') || (($data['route'] == 'product/manufacturer/info' || $data['route'] == 'product/product') && $key == 'manufacturer_id') || ($data['route'] == 'information/information' && $key == 'information_id')) { /* = 10 */ if($data['route'] == 'product/product' && $key == 'manufacturer_id' && $this->path_mode != 'default'){ unset ( $data[$key] ); continue; } /* = */ $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = '" . $this->db->escape($key . '=' . (int)$value) . "'"); if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ $url .= '/' . $query->row['keyword']; unset($data[$key]); /* = 13 repeat-2*/ if(isset($found_category)){ if($found_category && !isset($data['product_id']) && $this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$url .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; unset($found_category); } /* = */ } } elseif ($blogVirtualEnb && isset($data['route']) && $data['route'] == 'blog/category/home') { $url .= '/' . $blogVirtualDir; unset($data['route']); } elseif (isset($data['route']) && $data['route'] == 'blog/article/comment') { $url .= '/blog-comments'; unset($data['route']); } elseif ($key == 'article_id') { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'blog_" . $this->db->escape($key . '=' . (int)$value) . "'"); if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ if($this->config->get('blogSetting_virDir')) { $url .= '/' . $blogVirtualDir; } $url .= '/' . $query->row['keyword']; $article_url = '/' . $query->row['keyword']; } unset($data[$key]); /* = 13 repeat-2*/ if(isset($found_category)){ if($found_category && !isset($data['product_id']) && $this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$url .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; unset($found_category); } /* = */ } elseif ($key == 'category_id') { $categories = explode('_', $value); $excludeCat = $this->config->get('blogSetting_virDirExclude'); $cat_check = ''; $cat_url = ''; foreach ($categories as $category) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'blog_category_id=" . (int)$category . "'"); if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ $cat_check = 1; $cat_url .= '/' . $query->row['keyword']; } else { $notAllAlias = 1; } } $cat_virdir = ''; if($cat_check && $this->config->get('blogSetting_virDir')) { if (!in_array($categories[0], $excludeCat)) { $cat_virdir .= '/' . $blogVirtualDir; } } if (!isset($notAllAlias)) { $url = $cat_virdir . $cat_url; $category_url = $url; } unset($data[$key]); /* = 13 repeat-2*/ if(isset($found_category)){ if($found_category && !isset($data['product_id']) && $this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$url .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; unset($found_category); } /* = */ } elseif ($key == 'route' && $value == 'module/questions_and_answers/faq') { $url .= '/faq'; /* = 11 */ } elseif ($key == 'route' AND $value != 'product/product' AND $value != 'product/category') { $sql = "SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = '" . $this->db->escape($value) . "'"; $query = $this->db->query($sql); if ($query->num_rows) { foreach($query->rows as $row){ if($row['language_id'] == (int)$this->l_id_session){ $url .= '/' . $row['keyword']; break; } } } /* = */ } elseif ($key == 'path' || $key == 'npath') { $categories = explode('_', $value); /* = 12 */ $found_category = false; /* = */ foreach ($categories as $category) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'category_id=" . (int)$category . "'"); if ($query->num_rows) { /* = 5 repeat-3 */ if($query->num_rows > 1){ foreach($query->rows as $row){ if(isset($row['language_id']) && $row['language_id'] == $this->l_id_session){ $query->row['keyword'] = $row['keyword']; $query->row['query'] = $row['query']; break; } } } if(isset($query->row['keyword']) AND $query->row['keyword'] === '')continue; if(isset($data)){ if(strpos($query->row['query'], 'manufacturer_id') !== false && !isset($data['product_id'])){ if($this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$query->row['keyword'] .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; } } if(isset($found_category))$found_category = true; /* = */ $url .= '/' . $query->row['keyword']; } } unset($data[$key]); /* = 13 repeat-2*/ if(isset($found_category)){ if($found_category && !isset($data['product_id']) && $this->ssb_setting['tools']['suffix_manager']['status'] && strpos($link, 'page=') === false)$url .= $CPBI_urls_ext; if(!isset($data['product_id']))$page_part = true; unset($found_category); } /* = */ } } } if (isset($article_url) && $article_url && isset($category_url) && $category_url) { $url = $category_url . $article_url; } if ($url) { unset($data['route']); $query = ''; if ($data) { foreach ($data as $key => $value) { /* = 14 */ if($this->ssb_setting['tools']['seo_pagination']['status'] && $key == 'page' && $value != '{page}')continue; /* = */ $query .= '&' . $key . '=' . $value; } if ($query) { $query = '?' . trim($query, '&'); } } /* = 15 ver156*/ if($this->totalLanguages > 1 AND $this->ssb_setting['tools']['lang_dir_link']['data']['prefix']){ $host = $this->seoController->getHost($url_info); $path = $this->seoController->getPath($this->l_code_session, $host, $url_info); }else{ $host = $url_info['scheme'] . '://' . $url_info['host']; $path = str_replace('/index.php', '', $url_info['path']); } if($page_part){ list($page_part, $url_info) = $this->seoController->getPagePart($url_info); }else{ $page_part = ''; } $link = $host . (isset($url_info['port']) ? ':' . $url_info['port'] : '') . $path . $url . $page_part .$query; return rtrim($link, '/'); /* = */ return $url_info['scheme'] . '://' . $url_info['host'] . (isset($url_info['port']) ? ':' . $url_info['port'] : '') . str_replace('/index.php', '', $url_info['path']) . $url . $query; } else { /* = 16 */ /*$link = rtrim(str_replace('index.php', '', $link));*/ /* = */ return $link; } } }?> --- Добавлено, 4 дек 2018 --- Теперь в графе 252 elseif (isset($this->request->get['album_id'])) {
По ошибке номер 2 нашел вариант что после перехода на версию 5.6 нужен какой-то драйвер. Есть инфа какой именно? --- Добавлено, 8 дек 2018 --- mod_fcgid: stderr: PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in system/database/mysql.php on line 6 --- Добавлено, 8 дек 2018 --- Вместо define('DB_DRIVER', 'mysql'); прописал define('DB_DRIVER', 'mysqli'); Ошибка пропала. Так можно делать?)
Так нужно делать! Я уже лет 5 не использую mysql драйвер. Просто в старых ОпенКартах mysqli драйвера может из коробки или вообще не быть, или он может быть нерабочим.
Для решения mod_fcgid: stderr: PHP Notice: Constant HTTP_IMAGE already defined in /config.php on line 9 Предложили прописать. что оно даст если уже ниже прописано? Возьмите путь скрытый под звёздочками в этой строке define('DIR_APPLICATION', '******************************************/catalog/'); Код: <?php // HTTP define('HTTP_SERVER', 'http://************.com/'); define('HTTP_IMAGE', 'http://'.$_SERVER['HTTP_HOST'].'/image/'); // HTTPS define('HTTPS_SERVER', 'https://************.com/'); define('HTTPS_IMAGE', 'https://***************.com/image/'); define('HTTP_IMAGE', 'https://'.$_SERVER['HTTP_HOST'].'/image/'); // DIR define('DIR_APPLICATION', '******************************************/catalog/'); define('DIR_SYSTEM', '**********************************/system/'); define('DIR_DATABASE', '*******************************/database/'); define('DIR_LANGUAGE', '*************/language/'); define('DIR_TEMPLATE', '********************/theme/'); define('DIR_CONFIG', '*************************config/'); define('DIR_IMAGE', '*********************image/'); define('DIR_CACHE', '*************************cache/'); define('DIR_DOWNLOAD', '**********************download/'); define('DIR_LOGS', '**************logs/'); // DB define('DB_DRIVER', '************'); define('DB_HOSTNAME', '*********'); define('DB_USERNAME', '******************'); define('DB_PASSWORD', '*************************'); define('DB_DATABASE', '***************'); define('DB_PREFIX', '********'); ?>
Это ошибка для детского сада. В конфиге дважды определена константа HTTP_IMAGE, чего быть не может (константа на то и константа, чтоб определяться только раз). В общем, одна строка с HTTP_IMAGE - лишняя.
Бля только сейчас увидел что там одно и тоже) Для админки решилось путем тупого удаления define('HTTP_IMAGE', 'https://'.$_SERVER['HTTP_HOST'].'/image/'); А вот для каталога если убрать графу define('HTTP_IMAGE', 'https://'.$_SERVER['HTTP_HOST'].'/image/'); перестает работать переходы по категории и фильтр
по ошибке mod_fcgid: stderr: PHP Parse error: syntax error, unexpected 'elseif' (T_ELSEIF) in vqmod/vqcache/vq2-catalog_controller_common_seo_url.php on line 252 помог Юра. Кто в теме тот поймет) вместо <operation> <search position="before"><![CDATA[if (isset($this->request->get['route'])) {]]> </search> <add> <![CDATA[elseif (isset($this->request->get['album_id'])) { $this->request->get['route'] = 'gallery/album'; } elseif (isset($this->request->get['video_id'])) { $this->request->get['route'] = 'gallery/video'; }]]> </add> </operation> ето <operation> <search position="after"><![CDATA[$this->request->get['route'] = 'product/manufacturer/info';]]> </search> <add> <![CDATA[} elseif (isset($this->request->get['album_id'])) { $this->request->get['route'] = 'gallery/album'; } elseif (isset($this->request->get['video_id'])) { $this->request->get['route'] = 'gallery/video';]]> </add> </operation>