Post by kenny_1892 » Tue Feb 03, 2015 8:56 pm

I seem to be getting this error whenever I install a new extensions.

Error: "Notice: Use of undefined constant HTTP_IMAGE - assumed 'HTTP_IMAGE' in /home/sites/mysite.com/public_html/store/vqmod/vqcache/vq2-catalog_controller_common_header.php on line 68"

Code: Select all

if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
			$server = HTTPS_IMAGE;
		} else {
			$server = HTTP_IMAGE;
		}	
Line 68 being

Code: Select all

$server = HTTP_IMAGE;
The last two extension I installed were footer and a menu extension

Would be grateful if someone could point me in the right direction.

New member

Posts

Joined
Wed Aug 04, 2010 6:11 pm

Post by fido-x » Tue Feb 03, 2015 9:02 pm

Which version of OpenCart are you using?

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by kenny_1892 » Tue Feb 03, 2015 9:13 pm

Version 1.5.6.4

New member

Posts

Joined
Wed Aug 04, 2010 6:11 pm

Post by fido-x » Tue Feb 03, 2015 9:24 pm

Add the following in your store's config.php and admin/config.php files under the HTTP defines:

Code: Select all

define('HTTP_IMAGE', 'http://www.yourdomain.com/image/');
And (in the same files) the following under the HTTPS defines:

Code: Select all

define('HTTPS_IMAGE', 'https://www.yourdomain.com/image/');
Of course, replace "www.yourdomain.com" with your own.

If your store is running as a sub-folder or yourdomain, then the URL would be "www.yourdomain.com/store_folder/image/".

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by kenny_1892 » Wed Feb 04, 2015 3:06 am

Thank you that has worked

New member

Posts

Joined
Wed Aug 04, 2010 6:11 pm

Post by milky » Thu Jul 23, 2015 1:14 pm

Hello,

I had a similar error when installing KeyCDN, perhaps with other CDN not limited to MaxCDN (have not tried), both warn that you might get this error:
Notice: Use of undefined constant HTTP_IMAGE – assumed ‘HTTP_IMAGE’ in /path/to/your/webroot/system/library/response.php on line 79

However I had this error

Notice: Use of undefined constant HTTP_IMAGE - assumed 'HTTP_IMAGE' in /vqmod/vqcache/vq2-system_library_response.php on line 109

KeyCDN and MaxCDN advise adding this code to root config, but fail to mention that you also have to add to admin config
define(‘HTTP_IMAGE’, ‘http://yourwebsite.com/image/’);

Thanks

New member

Posts

Joined
Sat Jan 21, 2012 2:04 am
Who is online

Users browsing this forum: No registered users and 18 guests