This section describes how to setup HTTP Tunnel connection in Store Manager for osCommerce.
HTTP tunnel is an alternative way of connecting to your database which possesses the advantages of both direct and bridge connection.
This type of connection is useful if you don’t have direct access to MySQL database. Also, you don’t need to do POST \ GET operations to synchronize data with your store, all changes will be reflected in real-time.
To configure HTTP Tunnel connection, follow a few steps listed below:
- Open your application main directory - usually it is "C:\Program Files\eMagicOne\Store Manager for osCommerce" and find directory "Service" there. Inside this directory you can find sm_tunnel.php file.
- Copy sm_tunnel.php file to your online store root (catalog) directory via FTP. Tunnel should be accessible from web as here - http://www.onlinestore.com/sm_tunnel.php whereas http://www.onlinestore.com is your store URL. If you uploaded file correctly, you will receive the message - “Tunnel script is installed correctly. You can establish connections through the HTTP tunnel.”
- Open your store root folder -> includes directory and find there configure.php or config.php file.
- define('DB_SERVER', 'localhost');
- If database server name (host) is defined here (like 'http://www.servername.com'), you should use this one (servername.com).
- If it is defined as 'localhost', it means you should use your server name. Your server name is defined in configure.php or config.php at the top:
- define('HTTP_SERVER', 'http://www.mywebsite.com');
- define('DB_SERVER_USERNAME', 'login'); //here your User Name (login) is defined
- define('DB_SERVER_PASSWORD', '123456'); //here your password is defined
- define('DB_DATABASE', 'remote_database_name'); //here your database name is defined
- In your Store Manager open Preferences -> Actions -> Create new configuration and then put the name of the configuration.