Post by corin » Sat Apr 09, 2016 9:49 pm

I have two issues.

Yesterday I pointed my domain (let's call it mydomain.com) to a subfolder (public_html/store/) where the opencart installation is located.

I removed the .txt for htaccess and adjusted the config.php and admin/config.php to point to the subfolder.

The only additional change I made was in the config.php I added a second line as the images were not showing (on another host account I have a domain with 1.5.6.4 which has a similar set-up and there is the second line for images in my config which I where I got the idea) :

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.mydomain.com/');
define('HTTP_IMAGE', 'http://www.mydomain.com/image/');

// HTTPS
define('HTTPS_SERVER', 'http://www.mydomain.com/');
All seemed good except broken links or non existing pages get a 500 error page and not a 404 (I was so happy the site was working!!!). I checked wih my host for the 500 error pages and missing 404 and they said they "have verified your error logs of your account and confirmed due to syntax error with the template is causing the issue. So I would suggest you to contact OpenCart application support and they will further investigate on this issue". I have a feeling there is an error or somthing I did wrong in either my config or the htaccess? Does that make sense?

Then this morning I also got the following error on my site:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hermes/bosweb25a/b72/nf.mydomain/public_html/store/config.php:2) in /hermes/bosweb25a/b72/nf.mydomain/public_html/store/system/library/session.php on line 21

Newbie

Posts

Joined
Thu Feb 25, 2016 6:05 am
Location - Montreal

Post by IP_CAM » Sun Apr 10, 2016 12:09 am

( This is meant for the STORE/... Root Directory only, the ADMIN config.php looks a little different !)
Since this: (public_html/store/) would equal, and result in:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.mydomain.com/store/');
define('HTTP_IMAGE', 'http://www.mydomain.com/store/image/');
// HTTPS
define('HTTPS_SERVER', 'http://www.mydomain.com/store/');
define('HTTPS_IMAGE', 'http://www.mydomain.com/store/image/');
as well as:

Code: Select all

// DIR
define('DIR_APPLICATION', '/whatever/public_html/mydomain.com/store/catalog/');
define('DIR_SYSTEM', '/whatever/public_html/mydomain.com/store/system/');
define('DIR_DATABASE', '/whatever/public_html/mydomain.com/store/system/database/');
define('DIR_LANGUAGE', '/whatever/public_html/mydomain.com/store/catalog/language/');
define('DIR_TEMPLATE', '/whatever/public_html/mydomain.com/store/catalog/view/theme/');
define('DIR_CONFIG', '/whatever/public_html/mydomain.com/store/system/config/');
define('DIR_IMAGE', '/whatever/public_html/mydomain.com/store/image/');
define('DIR_CACHE', '/whatever/public_html/mydomain.com/store/system/cache/');
define('DIR_DOWNLOAD', '/whatever/public_html/mydomain.com/store/download/');
define('DIR_LOGS', '/whatever/public_html/mydomain.com/store/system/logs/');
and your .htaccess file has to look like:

Code: Select all

# SEO URL Settings
RewriteEngine On
RewriteBase / store/
to make the system work, in the first place!
---
The:

Code: Select all

define('HTTP_IMAGE', 'http://mydomain.com/store/image/');
define('HTTPS_IMAGE', 'http://mydomain.com/store/image/');
makes absolutely NO SENSE, by just beeing placed, by itselfs, you'll need an additional Extension,
to make this Function work (again!).
---
Good Luck
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by corin » Sun Apr 10, 2016 1:52 am

Thanks Ernie.

Seems like "Warning: session_start(): Cannot send session cache limiter..." error I found this morning might have been because my host mucked about with my config.php (last save time on the server was well after I went to bed).

I added the second HTTPS: for the image in the config and reuploaded the config.php and the error was gone.

What I still have though is a 500 Internal Server Error Page with this message
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, cgiadmin@yourhostingaccount.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Instead of a 404 page. Any ideas?

Newbie

Posts

Joined
Thu Feb 25, 2016 6:05 am
Location - Montreal
Who is online

Users browsing this forum: No registered users and 14 guests