Missing Images

Open to all! Ask other shopowners for help.
Post Reply
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Missing Images

Post 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');


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Missing Images

Post 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
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Re: Missing Images

Post 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');


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply