Tutorial - Connecting Remote MySQL/PostgreSQL using PHPMaker Connection Script

In this tutorial we will show you how to use the new connection method which can connect to any remote database using a PHP script provided by PHPMaker.

Steps to Setup Remote Connection

1. Uploading the PHP script to your site

The connection is named phpmaker.php and can be found under the installation folder, e.g. C:\Program Files (x86)\PHPMaker 2019. Upload the script to site first.

Important Always use the script shipped with your version of PHPMaker. PHPMaker may not work with script shipped with previous versions.

2. Testing the script

If this is the first time to use this connection method, you may want to test the script and get to understand how it works. You don't need to test the script as described in this step next time. Instead, you can simply press the [Test] button in PHPMaker to test the script after entering the URL.

  1. Browse to the script using your browser

  2. Enter the connection information and and select the encoding if necessary, click [Get Database List], a combobox populated with the available databases should be shown. Select the Database you want to connect, click [View Schema]

  3. If you can view the schema of database in XML like the follows, the script is working properly. PHPMaker will talk to this script similarly and get the database schema over HTTP.

3. Loading PHPMaker

Open PHPMaker, enter the connection information, URL of the script and encoding if necessary.

Note that you are actually connecting to your database through the PHP script on the server, so in most cases the host/server name is "localhost" unless the database server is not installed on the same server as the Web server.

Click the dropdown button of database combobox, you should be able to see the available database. Select your database, click the [Connect] button. The database info should be loaded and displayed in the left pane.

 

Using File URL

If for some reason you cannot get the database schema using HTTP, you can also save the schema in your browser (Step 3.c. above) as a local .xml file and enter the file URL, e.g. "file://C:\phpmaker.xml", to connect.

 

 

 ©2002-2018 e.World Technology Ltd. All rights reserved.