Post by gevpe0807 » Thu Aug 03, 2017 4:13 am

OC 1.5.1.3
site: http://amusementwholesale.com/store/admin
VQMOD: 2.6.1
Issues: Cant add any products to my shopping cart and cant login to the dashboard backend from admin page

*Issues with adding products to shopping*

When I try to add a product to the shopping cart it allows me to go into the product, select the options on that product and select the add option. I get the popup saying that it added to the product to the cart. I go and check and to see the shopping cart and it says "your shopping cart is empty" It seems to not be registering any product that I add to it. I've seen some other post on here for this issue but I cant seem to get it to work.

Issues login to admin site (backend of store) http://amusementwholesale.com/store/admin/ *

I go to the admin site and enter the username/password and it refreshes and gives me this http://amusementwholesale.com/store/adm ... e2ceaf4789. It seems to generate the token but never takes me to the login completely and cant access the backend to manage my store. I've been battling this the last week after godaddy changed my hosting plan. It worked as of last Monday 7/24 and after they made the mode it completely broke. I was able to restore the site because of the home directory change but the login and add to cart don't work anymore. I am including my config and admin/config file and can can someone help out.

config.php


<?php

// HTTP
define('HTTP_SERVER', 'http://amusementwholesale.com/store/');
define('HTTP_IMAGE', 'http://amusementwholesale.com/store/image/');
define('HTTP_ADMIN', 'http://amusementwholesale.com/store/admin/');

// HTTPS
define('HTTPS_SERVER', 'https://amusementwholesale.com/store/');
define('HTTPS_IMAGE', 'https://amusementwholesale.com/store/image/');

// DIR
define('DIR_APPLICATION', '/home/content/61/6333661/html/store/catalog/');
define('DIR_SYSTEM', '/home/content/61/6333661/html/store/system/');
define('DIR_DATABASE', '/home/content/61/6333661/html/store/system/database/');
define('DIR_LANGUAGE', '/home/content/61/6333661/html/store/catalog/language/');
define('DIR_TEMPLATE', '/home/content/61/6333661/html/store/catalog/view/theme/');
define('DIR_CONFIG', '/home/content/61/6333661/html/store/system/config/');
define('DIR_IMAGE', '/home/content/61/6333661/html/store/image/');
define('DIR_CACHE', '/home/content/61/6333661/html/store/system/cache/');
define('DIR_DOWNLOAD', '/home/content/61/6333661/html/store/download/');
define('DIR_LOGS', '/home/content/61/6333661/html/store/system/logs/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'XXXXXXXXX');
define('DB_USERNAME', 'XXXXXXXXXX');
define('DB_PASSWORD', 'XXXXXX');
define('DB_DATABASE', 'XXXXXXXX');
define('DB_PREFIX', '');
?>

admin/config.php

<?php
// HTTP
define('HTTP_SERVER', 'http://amusementwholesale.com/store/admin/');
define('HTTP_CATALOG', 'http://amusementwholesale.com/store/');
define('HTTP_IMAGE', 'http://amusementwholesale.com/store/image/');

// HTTPS
define('HTTPS_SERVER', 'https://amusementwholesale.com/store/admin/');
define('HTTPS_IMAGE', 'https://amusementwholesale.com/store/image/');

// DIR
define('DIR_APPLICATION', '/home/content/61/6333661/html/store/admin/');
define('DIR_SYSTEM', '/home/content/61/6333661/html/store/system/');
define('DIR_DATABASE', '/home/content/61/6333661/html/store/system/database/');
define('DIR_LANGUAGE', '/home/content/61/6333661/html/store/admin/language/');
define('DIR_TEMPLATE', '/home/content/61/6333661/html/store/admin/view/template/');
define('DIR_CONFIG', '/home/content/61/6333661/html/store/system/config/');
define('DIR_IMAGE', '/home/content/61/6333661/html/store/image/');
define('DIR_CACHE', '/home/content/61/6333661/html/store/system/cache/');
define('DIR_DOWNLOAD', '/home/content/61/6333661/html/store/download/');
define('DIR_LOGS', '/home/content/61/6333661/html/store/system/logs/');
define('DIR_CATALOG', '/home/content/61/6333661/html/store/catalog/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'XXXXXXXXXXXX');
define('DB_USERNAME', 'XXXXXXXXXX');
define('DB_PASSWORD', 'XXXXXXXXX');
define('DB_DATABASE', 'XXXXXXXXX');
define('DB_PREFIX', '');
?>

My website loads as amusementwholesale.com/store and not www.amusementwholesale.com/store, so I am confuse how the admin/config.php should be set or if I am missing something.

.htaccess file

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule sitemap.xml /index.php?route=feed/google_sitemap
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

RewriteEngine On
RewriteCond %{HTTP_HOST} ^http://amusementwholesale.com/$1 [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://amusementwholesale.com/store/$1 [L,R=301,NC]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

Session.php file _ reason is because I kept getting an error saying that said Fatal error: Call to a member function get() on a non-object in /home/content/61/6333661/html/store/index.php on line 103 and they told me to add session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp')); under the session.php file to eliminate that error, Is my session.php file incorrectly set below?

<?php
class Session {
public $data = array();

public function __construct() {
if (!session_id()) {
ini_set('session.use_cookies', 'On');
ini_set('session.use_trans_sid', 'Off');

session_set_cookie_params(0, '/');
//session_start();
session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp'));
}

$this->data =& $_SESSION;
}
}
?>

Unfortunately I've been struggling with this for the last week. If someone know how to get this working It would be great. I can get you access to the files also. Thank You!!!

Newbie

Posts

Joined
Tue Sep 24, 2013 3:09 pm

Post by IP_CAM » Thu Aug 03, 2017 7:40 am

just read the .htaccess Info Text, I fixed it a little, since it was written
by an english-men, and so widely not understandable ... :laugh:
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder,
but in a SubDirectory
, i.e., called shop/,
make sure your RewriteBase Line becomes shop/
RewriteBase /shop/
---
But then, you have a second RewriteEngine On Command
Line, just below a few lines, for no good reason at all ! :'(

My Github OC Site: https://github.com/IP-CAM
5'200 + 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 gevpe0807 » Fri Aug 04, 2017 3:38 am

IP_CAM - Tried that and deleted the extra lines and still have the issue. Thank you for assisting.

Newbie

Posts

Joined
Tue Sep 24, 2013 3:09 pm

Post by IP_CAM » Fri Aug 04, 2017 10:15 am

I just realized, that your configuration contains http and https - links
in your config.php files and in the .htaccess file !

In later v.1.5.x Versions at least, this is NOT the correct way, as I know of,
Settings are either to be made to link to:
http:// whateversite /
or then to:
https:// whateversite
since it would make absolutely no Sense, to enable a Site to be
viewed by http as well as by https.

So, it would be either:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.bigmax.ch/shop/');
// HTTPS
define('HTTPS_SERVER', 'http://www.bigmax.ch/shop/');
or then:

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://www.bigmax.ch/shop/');
// HTTPS
define('HTTPS_SERVER', 'https://www.bigmax.ch/shop/');
And in the .htaccess file, the rewrite linking should also be fixed,
to only link to either http oder then https, I guess.
Good Luck ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + 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 victorj » Tue Aug 15, 2017 5:06 am

in htaccess you are forcing https, but your config files point to http.
so youre entire set up is wrong.
in both config files change http section http to https and it will work.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by gevpe0807 » Thu Aug 17, 2017 1:51 pm

@victorj

I went ahead and added the https to both config files and it still seems to have issues.

config.php

// HTTP
define('HTTP_SERVER', 'https://amusementwholesale.com/store/');
//define('HTTP_IMAGE', 'https://amusementwholesale.com/store/image/');
//define('HTTP_ADMIN', 'https://amusementwholesale.com/store/admin/');

// HTTPS
define('HTTPS_SERVER', 'https://amusementwholesale.com/store/');
define('HTTPS_IMAGE', 'https://amusementwholesale.com/store/image/');

admin/config.php

// HTTP
define('HTTP_SERVER', 'https://amusementwholesale.com/store/admin/');
define('HTTP_CATALOG', 'https://amusementwholesale.com/store/');
define('HTTP_IMAGE', 'https://amusementwholesale.com/store/image/');

// HTTPS
define('HTTPS_SERVER', 'https://amusementwholesale.com/store/admin/');
define('HTTPS_IMAGE', 'https://amusementwholesale.com/store/image/');

.htaccess file



RewriteBase /
RewriteRule sitemap.xml /index.php?route=feed/google_sitemap
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

RewriteEngine On
RewriteCond %{HTTP_HOST} ^http://amusementwholesale.com/$1[NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://amusementwholesale.com/store/$1 [L,R=301,NC]

Newbie

Posts

Joined
Tue Sep 24, 2013 3:09 pm

Post by IP_CAM » Fri Aug 18, 2017 1:42 am

RewriteBase /
RewriteEngine On

You FIRST need to switch the Rewrite Engine to ON ...
before adding some rules ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + 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
Who is online

Users browsing this forum: No registered users and 21 guests