Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Grey: "We're a two-person company, it's just me an my wife. I'm the technical guru, and she handles the business operations. I have to know a lot about MySQL, but that's much too technical for her. I have frequently had to setup CGI scripts (I code in Perl) so she can manage some of our tables (suppliers, manufacturers, etc).

I discovered PHP Generator a couple of days ago, tried the free version,and within a few hours I had purchased the Pro version (as well as SQL Maestro for MySQL).

Today I am completing the conversion of the last of my custom table managers to PHP Generator. This is eliminating several thousand lines of code that I don't have to support any more!

Thanks for this fantastic product".

David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".

More

Add your opinion

SQL Maestro Group / Products / MySQL / PHP Generator for MySQL / Resources / Mastering PHP Generator: Part 1.

Mastering PHP Generator. Part I: preparing the local development environment

Last modified: May 6, 2018

Prev

Abstract

The article describes the process of preparing a local development environment for all members of PHP Generator tools family.

Introduction

This article starts a resource series devoted to the proper use of PHP Generators and aimed to help you to perform your tasks quickly and efficiently. Each article provides you with one essential tip and describes its implementation.

The first step towards mastering PHP Generator is using a Local Development Environment.
  • This significantly accelerates the process of web application development.
  • This increases your database server security as you no more need to connect to your database remotely .

Problem

What is the usual scenario of working with PHP Generator?
  • Connect to a remote database;
  • Go through the wizard steps and create a web application;
  • Upload the application on the remote webserver;
  • Test the application;
  • Repeat these steps until getting a desired result.

Is it correct? Yes. Is it efficient? No. Each deployment to the remote server can take minutes and the recurring process may be significantly delayed. We can save time spending on the remote server access by using a local environment. In this case the effective scenario of working with PHP Generator is:

  • Connect to a local database;
  • Go through the wizard steps and create a web application;
  • Test the application on a local webserver;
  • Repeat these steps until getting a desired result;
  • Upload the result application to a remote webserver.

Let's see the detailed description of software environment necessary for the local web applications development.

Solution

The local development environment for PHP Generator means you have:
  • locally installed web server with support of PHP;
  • locally installed database server;
  • a local database with the same structure as the database to be connected with result webpages.

You can also use a locally installed web server with a remote database. In this case you will save your time on the application upload but the database server will be unprotected because of the allowed the direct access from a remote workstation.

Step 1

Choosing the software for the local web development, take a look at the appropriate software installed on your remote webserver. To avoid problems caused by version incompatibility, it is recommended to install locally the same minor versions of software as installed on your web hosting, i.e. the versions with the same major and minor version numbers. For example, if you have installed on the remote server PHP 5.6.35, you can install locally PHP 5.6.x and so on.

After determining the version numbers, let's go to the software selection. There are three ways to get the software environment:

  1. Special packages (only for web MySQL, PostgreSQL, and SQLite applications)
    Popular free all-in-one Windows packages allow you to install all the necessary software automatically. Such web stacks are available for MySQL and PostgreSQL. They also may be used as a complete solution for SQLite because this database server is just a single DLL that comes with SQLite PHP Generator. These stacks are very attractive because of the simplicity of their installation.
  2. Manual installation
    The most universal and flexible way to get the necessary software environment is to install it manually. For this purpose you need to download and install the appropriate Apache build, PHP, and a free edition of the your database server. Don't forget to enable the PHP extension for your database server in the php.ini file after installing the software.
  3. A combination of special package usage and manual installation
    This way allows you to unite the simplicity of web stacks installation with the flexibility of the manual installation. As a rule, developers use Apache and PHP delivered with any special package and install a free edition of the database server and the appropriate PHP extension manually.

The table below contains the download links of additional software depending of members of PHP Generator tools family.

PHP Generator All-in-one tools PHP extension Database server
PHP Generator for MySQL

WampServer, XAMPP, BitNami WAMP Stack, AMPPS, USB Webserver

php_mysql.dll
php_mysqli.dll
php_pdo_mysql.dll
MySQL
PostgreSQL PHP Generator BitNami WAPP stack php_pgsql.dll PostgreSQL
SQLite PHP Generator Use any web stack listed above. To add SQLite support, enable the php_sqlite.dll extension in php.ini.
php_sqlite.dll SQLite
Oracle PHP Generator - php_oci8.dll
php_oci8_11g.dll
Oracle Database Express Edition
MS SQL PHP Generator - php_mssql.dll
sqlsrv 3.0
php_com_dotnet.dll
SQL Server Express
Firebird PHP Generator - php_interbase.dll Firebird
DB2 PHP Generator - DB2 UDB DB2 Express-C
ASA PHP Generator - SAP Sybase SQL Anywhere PHP Module SAP SQL Anywhere Developer Edition

Deprecated extensions are marked with strikeout.

Hosts and databases

Now we need to get a local database with the same structure as the remote one and to fulfill it with the same data. To simplify the start of the prepared application on the remote webserver, provide the situation in which the local webserver calls the local database server with the same hostname as the remote one. In case the remote web server and the remote database server are installed on the same computer, install the local servers at the same computer too and specify the database host as 'localhost'. Otherwise, use the hosts file to define the necessary host name for the local database server.

Now all we need to get the local development environment is to create a database with the same name and the same structure as the remote one. You can use the corresponding Data Pump or Extract Database wizards for these purpose.

Prev