Comment to Image Tanscoder and storage.php
-
To define the
BX_DOL_URL_ROOT
constant correctly, make sure the URL construction is complete and all parentheses are closed. In your current versions, there is a syntax error in the second variant due to a missing closing parenthesis.Correct Version:
define('BX_DOL_URL_ROOT', ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') || (!empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') ? 'https' : 'http') . '://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'www.exemple.com/') . '/');
Checking the scheme:
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
: If the connection is secure (HTTPS).(!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
: If the forwarded protocol is HTTPS.(!empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on')
: If SSL is on.
Constructing the scheme:
- If any of the above conditions are true, the scheme is
https
, otherwisehttp
.
Constructing the host:
isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'www.exemple.com'
: IfHTTP_HOST
is set, use it, otherwise usewww.exemple.com
as the default value.
Adding a trailing slash:
.
/ '`' adds a trailing slash to the URL to ensure correct formatting.
Your fragment has a syntax error (missing closing parenthesis at the end) and should be corrected. However, it seems that you were right, I omitted to add this character "/" to the end of my domain name i wil check it out again. Big thank you.