Page 1 of 2

[HELP NEEDED] Total Headache!

Posted: Mon Jul 17, 2017 11:59 pm
by NickT87
I'm having a total headache! Trying to secure my website with SSL for the important pages! Turns out opencart version 2.2.0.0 doesnt like it, typical!
I done what needed to be done with the config in admin & root folder! - Long story short, i've given up now and reverted back.

Something is weird since changing these.
as you can see on below image the store URL was different before making changes and its making my website act weird! any help would be very much appreciated!

Re: Total Headache! please help!

Posted: Tue Jul 18, 2017 12:25 am
by NickT87
Just to add as well, none of my images are either showing in the admin area ???

Re: Total Headache! please help!

Posted: Tue Jul 18, 2017 12:30 am
by NickT87
admin config.php

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'http://www.lovesuperstore.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'https://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'https://www.lovesuperstore.co.uk/');

// DIR
define('DIR_APPLICATION', '/home/lovesupe/public_html/admin/');
define('DIR_SYSTEM', '/home/lovesupe/public_html/system/');
define('DIR_IMAGE', '/home/lovesupe/public_html/image/');
define('DIR_LANGUAGE', '/home/lovesupe/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/lovesupe/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/lovesupe/public_html/system/config/');
define('DIR_CACHE', '/home/lovesupe/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/lovesupe/public_html/system/storage/download/');
define('DIR_LOGS', '/home/lovesupe/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/lovesupe/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/lovesupe/public_html/system/storage/upload/');
define('DIR_CATALOG', '/home/lovesupe/public_html/catalog/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', '*************');
define('DB_PASSWORD', '*************');
define('DB_DATABASE', 'lovesupe_shop');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');

Re: Total Headache! please help!

Posted: Tue Jul 18, 2017 1:58 am
by cyclops12
First thing is to edit your post and remove your db password
THIS SHOULD NEVER BE PUT IN A POST!!!!

Re: Total Headache! please help!

Posted: Tue Jul 18, 2017 3:50 am
by NickT87
cyclops12 wrote:
Tue Jul 18, 2017 1:58 am
First thing is to edit your post and remove your db password
THIS SHOULD NEVER BE PUT IN A POST!!!!
Sorry changed it now ;D

Re: Total Headache! please help!

Posted: Tue Jul 18, 2017 5:14 am
by IP_CAM
Now, this is definitely wrong:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'http://www.lovesuperstore.co.uk/');
But should it not be either:

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://www.lovesuperstore.co.uk/admin/');
define('HTTP_CATALOG', 'http://www.lovesuperstore.co.uk/');
// HTTPS
define('HTTPS_SERVER', 'http://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'http://www.lovesuperstore.co.uk/');
<?php
or then:

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://www.lovesuperstore.co.uk/admin/');
define('HTTP_CATALOG', 'https://www.lovesuperstore.co.uk/');
// HTTPS
define('HTTPS_SERVER', 'https://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'https://www.lovesuperstore.co.uk/');

Re: Total Headache! please help!

Posted: Tue Jul 18, 2017 3:51 pm
by NickT87
I dont know what happened?
I literally only played around with the 's' to get the SSL working correctly!

Now no images are showing in admin area and seems to be trying to pull them like this:
http://www.lovesuperstore.co.uk/admin/H ... -40x40.jpg

pretty sure my store url was public_html/ before, now its HTTP_CATALOG ! HELP! ???

Re: Total Headache! please help!

Posted: Tue Jul 18, 2017 11:53 pm
by NickT87

Code: Select all

<?php
 
// HTTP
define('HTTP_SERVER',  'http://'.HTTP.'/admin/');
define('HTTP_CATALOG', 'http://'.HTTP.'/');
define('HTTP_IMAGE',   'http://'.HTTP.'/image/');
 
// HTTPS
define('HTTPS_SERVER', 'https://'.HTTP.'/admin/');
define('HTTPS_IMAGE',  'https://'.HTTP.'/image/');
 
 
// DIR
define('BASE_DIR', str_replace(DIRECTORY_SEPARATOR.'admin', '', realpath(dirname(__FILE__))));
 
define('DIR_APPLICATION',  
define('DIR_SYSTEM',      
define('DIR_IMAGE',       
define('DIR_LANGUAGE',     
define('DIR_TEMPLATE',     
define('DIR_CONFIG',       
define('DIR_CACHE',        
define('DIR_DOWNLOAD',     
define('DIR_LOGS',         
define('DIR_MODIFICATION', 
define('DIR_UPLOAD',       
define('DIR_CATALOG',      
 
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'host.com');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'db');
define('DB_PORT', 'port'); // 3306
define('DB_PREFIX', 'oc_');
Found this online for version 2.2.0.0 - is this the correct admin config.php file?

Re: Total Headache! please help!

Posted: Wed Jul 19, 2017 3:12 pm
by NickT87
Anyone?
???

Re: Total Headache! please help!

Posted: Wed Jul 19, 2017 3:43 pm
by cyclops12
There is no such thing as a correct config.php file as each one is set to personal configurations,servers etc

Re: Total Headache! please help!

Posted: Sat Jul 22, 2017 2:57 am
by NickT87
Can someone please try and explain why that in admin my store URL is : HTTP_CATALOG ?

Something has gone wrong and images are no longer showing properly in admin (i.e product images) i right click and view source and on an image (or where is should be) and it looks like this:
http://www.lovesuperstore.co.uk/admin/H ... -40x40.jpg

Config.php

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://www.lovesuperstore.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'http://www.lovesuperstore.co.uk/');
admin/ config.php

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'http://www.lovesuperstore.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'http://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'http://www.lovesuperstore.co.uk/');
Thank you!

Re: Total Headache! please help!

Posted: Sat Jul 22, 2017 3:26 am
by cyclops12
Have you upgraded your site as it is trying to get images from http://www.lovesuperstore.co.uk/admin/H ... -40x40.jpg
(which by the way shouldnt have "admin/HTTP_CATLOG" it should be just http://www.lovesuperstore.co.uk/image/c ... -40x40.jpg)
but in version 2.2 the cache would be image/cache/catalog and not image/cache/data !!!!!

Re: Total Headache! please help!

Posted: Sat Jul 22, 2017 3:33 am
by NickT87
No, i haven't upgraded just tried to get SSL to work and this happened!

Really don't know how to get it back to showing the images?

Re: Total Headache! please help!

Posted: Sat Jul 22, 2017 4:01 am
by cyclops12
In your admin/config.php file what do you have for "define('DIR_IMAGE',"

Re: Total Headache! please help!

Posted: Sat Jul 22, 2017 4:31 am
by victorj
2.2 will not work under ssl.
here is explained how to fix some files

viewtopic.php?f=99&t=168626#p641205

Re: Total Headache! please help!

Posted: Sat Jul 22, 2017 6:21 am
by NickT87
define('DIR_IMAGE', '/home/lovesupe/public_html/image/');

is this correct?

Re: Total Headache! please help!

Posted: Sat Jul 22, 2017 11:42 am
by IP_CAM
why not try it, as I have written above already?

// ADMIN Config.php HTTPS Settings:

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://www.lovesuperstore.co.uk/admin/');
define('HTTP_CATALOG', 'https://www.lovesuperstore.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'https://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'https://www.lovesuperstore.co.uk/');

// DIR
define('DIR_APPLICATION', '/home/lovesupe/public_html/admin/');
define('DIR_SYSTEM', '/home/lovesupe/public_html/system/');
define('DIR_IMAGE', '/home/lovesupe/public_html/image/');
define('DIR_LANGUAGE', '/home/lovesupe/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/lovesupe/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/lovesupe/public_html/system/config/');
define('DIR_CACHE', '/home/lovesupe/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/lovesupe/public_html/system/storage/download/');
define('DIR_LOGS', '/home/lovesupe/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/lovesupe/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/lovesupe/public_html/system/storage/upload/');
define('DIR_CATALOG', '/home/lovesupe/public_html/catalog/');
// ADMIN Config.php HTTP Settings:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.lovesuperstore.co.uk/admin/');
define('HTTP_CATALOG', 'http://www.lovesuperstore.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'http://www.lovesuperstore.co.uk/admin/');
define('HTTPS_CATALOG', 'http://www.lovesuperstore.co.uk/');

// DIR
define('DIR_APPLICATION', '/home/lovesupe/public_html/admin/');
define('DIR_SYSTEM', '/home/lovesupe/public_html/system/');
define('DIR_IMAGE', '/home/lovesupe/public_html/image/');
define('DIR_LANGUAGE', '/home/lovesupe/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/lovesupe/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/lovesupe/public_html/system/config/');
define('DIR_CACHE', '/home/lovesupe/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/lovesupe/public_html/system/storage/download/');
define('DIR_LOGS', '/home/lovesupe/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/lovesupe/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/lovesupe/public_html/system/storage/upload/');
define('DIR_CATALOG', '/home/lovesupe/public_html/catalog/');

Re: Total Headache! please help!

Posted: Sun Jul 23, 2017 1:20 am
by NickT87
That worked!!!

Thank you so much!!! Sorry, i didn't understand what you were saying in the comment above!

Re: [FIXED] Total Headache! please help!

Posted: Sun Jul 23, 2017 1:55 am
by IP_CAM
Well, I figured ! :laugh:
I just hope, that you have redworked your ROOT config.php File also !
Good Luck !
Ernie

Re: [FIXED] Total Headache! please help!

Posted: Fri Jul 28, 2017 3:26 am
by NickT87
Ernie,
Do i just copy the above into the config.php file?

would that be the reason im getting this on sitemap errors:

Errors

Invalid URL

This is not a valid URL. Please correct it and resubmit.

4,372 :- image/cache/data/products/W11015011x1-0-1-1-500x500.jpg