Page 1 of 1

Missing Images

Posted: Tue Apr 05, 2022 5:27 pm
by mhsuffolk
1.0.7.7 PHP 7.4

I know that I am a long way behind but catching up fast.

I cannot get images to show in my live shop, they are in a standard images folder with no sub directories.

An example of a URL displayed if you hover over a missing image is below and is clearly wrong

https://www.mysite.co.uk/HTTPS_SERVER/i ... ld_gbd.jpg

If you remove the HTTPS_SERVER from the URL the image appears

I suspect it must be something in the configure files.

Code: Select all

  const HTTP_SERVER = 'https://www.mysite.co.uk';
  const COOKIE_OPTIONS = [
    'lifetime' => 0,
    'domain' => 'mysite.co.uk',
    'path' => '/',
    'samesite' => 'Lax',
  ];
  const DIR_WS_CATALOG = '/';

  const DIR_FS_CATALOG = '/home/*****/public_html/';

  date_default_timezone_set('Europe/London');

Code: Select all

  const HTTP_SERVER = 'https://www.mysite.co.uk';
  const COOKIE_OPTIONS = [
    'lifetime' => 0,
    'domain' => 'mysite.co.uk',
    'path' => '/myadmin',
    'samesite' => 'Lax',
  ];
  const DIR_FS_DOCUMENT_ROOT = '/home/****/public_html/';
  const DIR_WS_ADMIN = '/myadmin/';  

  const DIR_FS_ADMIN = DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN;
  const DIR_FS_BACKUP = DIR_FS_ADMIN . 'backups/';
  
  const HTTP_CATALOG_SERVER = 'https://www.mysite.co.uk';
  const DIR_WS_CATALOG = '/';
  const DIR_FS_CATALOG = DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG;
  
  date_default_timezone_set('Europe/London');

Re: Missing Images

Posted: Tue Apr 05, 2022 5:35 pm
by ecartz
mhsuffolk wrote: Tue Apr 05, 2022 5:27 pm If you remove the HTTPS_SERVER from the URL the image appears

I suspect it must be something in the configure files.
Since HTTPS_SERVER was removed from the configure files, I would find a code problem more likely. Somewhere it is trying to use the HTTPS_SERVER value. Maybe https://github.com/CE-PhoenixCart/Phoen ... op.php#L32

Re: Missing Images

Posted: Tue Apr 05, 2022 5:46 pm
by mhsuffolk
Thank you for your quick reply @ecartz

I have cured it in configure.php by adding a slash to const HTTP_SERVER and deleting one from const DIR_WS_CATALOG thus. I have no idea why this has worked but it has and everthing else seems to be in order so far

Code: Select all

  const HTTP_SERVER = 'https://www.mysite.co.uk/';
  const COOKIE_OPTIONS = [
    'lifetime' => 0,
    'domain' => 'mysite.co.uk',
    'path' => '/',
    'samesite' => 'Lax',
  ];
  const DIR_WS_CATALOG = '';

  const DIR_FS_CATALOG = '/home/*****/public_html/';

  date_default_timezone_set('Europe/London');