Jump to content
Salan

Ошибка с настройками после перехода на ССЛ

Recommended Posts

В логах выдает ошибку

 

mod_fcgid: stderr: PHP Notice:  Constant HTTP_IMAGE already defined in config.php on line 9

Там мы имеем 

// HTTPS
7. define('HTTPS_SERVER', 'https://***********.com/');
8. define('HTTPS_CATALOG', 'https://*********.com/');
9. define('HTTP_IMAGE', 'https://'.$_SERVER['HTTP_HOST'].'/image/');

 

как правильно прописать 9-ю строку?

Edited by Salan

Share this post


Link to post
Share on other sites

обычно там прописан абсолютный путь к каталогу. Зависит от ОС сервера.

например, /var/www/user/data/www/site/image/

Share this post


Link to post
Share on other sites

Как вариант, сделать путь как в соседних строках, типа такого:

define('DIR_IMAGE', 'p123_user/sitename.coml/www/image/');

 

Share this post


Link to post
Share on other sites

<?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', '********');
?>

Share this post


Link to post
Share on other sites

При установке прописалось 

 

define('HTTP_IMAGE', 'https://'.$_SERVER['HTTP_HOST'].'/image/');

 

на что и постоянно в логах жалоба)

Share this post


Link to post
Share on other sites

Ну так перепишите путь как вам предложили выше...

Возьмите путь скрытый под звёздочками в этой строке

define('DIR_APPLICATION', '******************************************/catalog/');

Share this post


Link to post
Share on other sites

Оказалось, что одна строка с HTTP_IMAGE - лишняя.

Share this post


Link to post
Share on other sites

Действительно такая строка уже есть. А я и не посмотрел...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.