CGSmartImage with https source
Posted: Thu Jan 05, 2017 10:29 am
I also experience periodic failures that can be 'fixed' by clearing cache but re-appear in a few days. One of the problems is that CGSmartImage does not embed images anymore, but prints the image tag - which still works but results in insecure content warnings on secure pages. I thought I can work around that problem by using an absolute instead of a relative path: I also tested src1 with hard coded https URL as well as just a single src tag, but the result is always the same, the assigned textlogosrc is "http://xxx..."
of course it would be better to find out why the page breaks in the first place, but I've been watching the error logs for months now, and cannot see a pattern. There are other errors as well, but I manged to work around those by modifying my templates.
----------------------------------------------
Cms Version: 2.1.5
Installed Modules:
CGBlog: 1.14.1
CGExtensions: 1.53.13
CGFeedback: 1.8
CGSimpleSmarty: 2.1.4
CGSmartImage: 1.21.5
CMSContentManager: 1.1.1
CMSMailer: 6.2.14
Captcha: 0.5.3
DesignManager: 1.1.1
FileManager: 1.5.2
FormBuilder: 0.8.1.4
JQueryTools: 1.3.9
ModuleManager: 2.0.4
Navigator: 1.0.3
News: 2.50.5
Search: 1.50.2
Config Information:
php_memory_limit:
max_upload_size: 16000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Australia/Brisbane
permissive_smarty: false
Php Information:
phpversion: 7.0.13
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32759
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 256M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 16M
upload_max_filesize: 16M
session_save_path: /tmp (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On
Performance Information:
allow_browser_cache: Off (False)
browser_cache_expiry: 0
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)
Server Information:
Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 2.6.32-673.8.1.lve1.4.3.el6.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.0.25
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Permission Information:
tmp: /home/xxx/public_html/tmp (0755)
tmp_cache: /home/xxx/public_html/tmp/cache (0755)
templates_c: /home/xxx/public_html/tmp/templates_c (0755)
modules: /home/xxx/public_html/modules (0755)
uploads: /home/xxx/public_html/uploads (0755)
File Creation Mask (umask): /home/rxxx/public_html/tmp/cache (0755)
config_file: 0444
----------------------------------------------
Code: Select all
{* top of base template *}
{$ssl_url = {ssl_url} scope=global}
...
{* somewhere in body tag*}
{$ssl_url} {* just to see if variable is in scope - and it is *}
{* forcing noembed for testing *}
{CGSmartImage src1=$ssl_url src2="uploads/images/logos/xxx_text_logo_grey500px_tiny.png" noembed=1 notag=1 assign=textlogosrc}
{cms_selflink page="home" id="textLogo" imageonly=1 text="$sitename" alt="xxx Text Logo" image="{$textlogosrc}"}
of course it would be better to find out why the page breaks in the first place, but I've been watching the error logs for months now, and cannot see a pattern. There are other errors as well, but I manged to work around those by modifying my templates.
----------------------------------------------
Cms Version: 2.1.5
Installed Modules:
CGBlog: 1.14.1
CGExtensions: 1.53.13
CGFeedback: 1.8
CGSimpleSmarty: 2.1.4
CGSmartImage: 1.21.5
CMSContentManager: 1.1.1
CMSMailer: 6.2.14
Captcha: 0.5.3
DesignManager: 1.1.1
FileManager: 1.5.2
FormBuilder: 0.8.1.4
JQueryTools: 1.3.9
ModuleManager: 2.0.4
Navigator: 1.0.3
News: 2.50.5
Search: 1.50.2
Config Information:
php_memory_limit:
max_upload_size: 16000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Australia/Brisbane
permissive_smarty: false
Php Information:
phpversion: 7.0.13
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32759
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 256M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 16M
upload_max_filesize: 16M
session_save_path: /tmp (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On
Performance Information:
allow_browser_cache: Off (False)
browser_cache_expiry: 0
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)
Server Information:
Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 2.6.32-673.8.1.lve1.4.3.el6.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.0.25
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Permission Information:
tmp: /home/xxx/public_html/tmp (0755)
tmp_cache: /home/xxx/public_html/tmp/cache (0755)
templates_c: /home/xxx/public_html/tmp/templates_c (0755)
modules: /home/xxx/public_html/modules (0755)
uploads: /home/xxx/public_html/uploads (0755)
File Creation Mask (umask): /home/rxxx/public_html/tmp/cache (0755)
config_file: 0444
----------------------------------------------