1.5 PHP MySQL Bridge Connection
The bridge is just another way to connect to your database. Normally program uses a direct MySQL connection to remote database installed on the website or some other web server. In some cases this type of connection does not work - your hosting provider may not allow direct connections or your LAN settings/firewall prevent the connection from being established. The bridge allows you to work with the remote database without direct MySQL connection established.
While working through bridge you must store your temporary data somewhere in the local database. The bridge is used only for two major operations - get data from the remote database and post data to that database. You must understand the difference between bridge connection and MySQL connection. The bridge is not a connection itself, actually, this is just a way to transfer files between remote and local machine and nothing else.
To configure PHP MySQL Bridge Connection, follow few steps:
1. Download the latest version of PHP MySQL Bridge here (recommended) or open your application main directory - usually, it is "C:\Program Files\eMagicOne\Store Manager for ... " and find directory "Service" there. Inside this directory, you can find bridge.php file.
2. Important. Edit bridge.php file
We strongly recommended change default username (default username is 1) and password (default password is 1) to keep your store protected.
Open bridge.php file (you can open it using NotePad or WordPad) and find the following lines there:
$username = "1";
$password = "1";
Put your own values instead of "1" in both lines. Press 'Save' to keep the changes.
Also here you can find how you can make Bridge connection more secure.
You may keep all other settings as they are unless you have any errors.
3. Copy bridge to your online store root (catalog) directory. The bridge should be accessible as http://www.myonlinestore.com/bridge.php whereas your store link is http://www.myonlinestore.com.
Tip: Also it is recommended to run Bridge.php Self Test. It checks your website to make sure there are no problems in your hosting configuration. Your hosting support can solve all problems found there.
4. Open Store Manager -> Tools -> Preferences and enable PHP MySQL bridge connection check-box.
5. Specify the following PHP MySQL Bridge and Local Database Connection Settings:
- Bridge URL - Specify Bridge URL, it should look like http://www.myonlinestore.com/bridge.php whereas your store URL is http://www.myonlinestore.com.
- Username and Password - Specify those you used to define at above (see step 2).
- Database Name - Specify local database name (type name manually) or select one from the drop-down using browse button .
Tip: Use Test Connection button to verify if all settings are correct.
Note that it is not your live store database, it is your local database used to work with your data locally. In order to see your live store data you need to Get Data from The Web either using Tools -> PHP MySQL Bridge -> Get Data from The Web (CTRL + G)
or using Database Actions button.
Wait while data is transferred. Depending on database size and connection speed it may take from few seconds to several hours (large database + slow connection). Follow few steps of Backup/Restore wizard.
Now you may work with your store - add/modify products, categories, import products etc.
It is important to post all changes you have made to your on-line store. Select Main Menu -> Tools ->PHP MySQL Bridge -> Post Changes to Web (CTRL + P) or use the corresponding Action.
In case you're using PHP-MySQL Bridge to work with your store database, here you'll find the data that hasn't been posted to your store yet.
You can check logs of the changes you've made since last time you've posted changes to the live store. At this page, you can make the changes to the future data modifications.
So when you post data, it will be posted with the changes you've made.
Please note that any modifications done using Pending Data section won't be displayed at your current (local) DB till the time you get data from the web again.
You can Clear all Changes (will clear all commands) made locally before posting if you do not want them to be applied to your remote database. Pay attention that you won't be able to undo this action.
Note: you have to retrieve data from the web again in order to synchronize local and remote databases after this operation.
If you wish to create a new local database you can type its name manually and use test connection button.
You'll see the notification that local database with specified name does not exist and Store Manager may ask you to create one.
Note: Local database and your store database are two different databases and their names may be different or may be the same, it doesn't matter.
Tip: Use Bridge.php Self Test Tool to check your website and to make sure there are no problems in your hosting configuration. Your hosting support can solve all problems found there.
6. Click Ok to save this entry, close Preferences and to connect to your database, or click cancel to discard this entry.
7. Click OK to save changes and close preferences. Now you have to retrieve data from your web store into your local database.
8. In main application window - Main Menu->Tools->Database Bridge->Get Data from Web.
9. Select Main Menu->Tools->Database Bridge->Post Changes to Web. Check whether all changes you made were reflected in web store properly.
Note: It is strongly recommended to create the database backup before any mass operations.