Monday, June 23, 2008

Thank You Note Engagement

VMWare Server 2 Beta 2

Apparently a good programmer is a lazy programmer, and although the former is still much to me, is laziness, and I eventually granted. Discouraged by the constant editing of configuration files under VMWare Player decided to install a new beta of the second edition of Server.
After downloading almost 500MB of packages started to install. In contrast to the previous edition may be surprised at the presence of Apache Tomcat, how well-known developers of all sorts of JEE applications. There is a lack of well-known Console Server and Workstation. In return, we get a web console.

When it starts to show us the login window:



And here comes the first calamity, at least for users of Windows Vista. To log on because we need to activate your account Administrator or, according to some, to disable User Access Control. I took this first option, assigning a new password to the Administrator.

After logging shows us a screen control environment:



first step you should make is to add permissions for your user (Permissions tab, click New Permission). Then the Administrator account is unnecessary.

addition of habit, I turn off the swap file to use for storage of virtual machines (Summary -> Edit Host Settings -> Fit all virtual machine memory into reserved host RAM).

Creating virtual machines is not significantly different from the process known from the Workstation. The only difference is the machine assigned to one of the repository (Datastore) drive. At this point it should also be remembered that the machinery created by default offer a compatibility mode with VMWare Workstation 6 or Player 2nd This gives the possibility of allocating more RAM and disk space, and also adds support for USB 2.0.

After creating the machinery remains her only start (green button):



To view virtual machine console, we can move bookmark Console, install the plugin (for IE - ActiveX, FF - xpi) and click on the box. We can also generate a shortcut to a VM (Virtual Machine Generate Shortcut) to cause the console directly from the desktop.

For this second method will be asked to sign:



further support the use no longer resembles Player.

view of the first version of VMWare Server 2 Beta can say that the developers put a huge effort for their product. The system works very reliably while ensuring high efficiency in virtual environments.
The only problem was the need to activate the Administrator user.

Monday, June 16, 2008

Linsey Dawn Mckenzie Magic

DB2 in PHP (Windows environment)

Quite often creating web applications based on PHP language is limited to the platform LAMP (Linux, Apache, MySQL and PHP). But it is the only solution on the market and if we do not have any alternative?
In recent years, large corporations have issued a free alternative to their database servers. Their licenses allow the use of advanced engines for both commercial and commercial purposes, placing restrictions only on platforms (and more precisely terms of resources used). Here I would like to focus on using one of these databases - IBM DB2 Express-C.

In this section we will focus on installation of the complete system environment to Windows platform, but in my spare time I will try to add information to install the extension php_ibm_db2 in a Linux environment.

From what we use:


After unpacking the file with the installer just run the data server setup. On the Setup screen appears Launchapd in which we can see the information about the new version, the instructions migration from previous DB2 and system requirements. Install by selecting a product we can install a new database environment. After accepting the license, choose the standard installation option (Typical) and for 4 subsequent screens to confirm the default values. Then we asked for your username and password for the so-called owner instance. It is dedicated to preserve user - db2admin - and give him the password for compliance with current security policies in the system (or domain).
After successful installation of the console using the First Steps (First Steps) will be possible to create the SAMPLE database.

NOTE If someone does not create a sample database at this point would be to be able to make from a special shell (db2cmd) using the command db2sampl-sql-xml

next step is to install Apache and PHP. If the web server it is confined to accept the standard installation options. Then unpack the package php-5.xx-win32 to c: \\ PHP, as well as the package pecl php_ibm_db2.dll to copy the file c: \\ PHP \\ ext.

time to setup a whole. Create a copy of php.ini-dist file called php.ini in c: \\ PHP and surrender it to edit. The Paths and Directories section, set the value of extension_dir to "c: \\ PHP \\ ext", in the Dynamic Extensions add an entry
 
extension = php_ibm_db2.dll

and at the end of the file
 
[IBM DB2]
ibm_db2.instance_name = DB2

where DB2 is the name of the instance was installed by us.

left join PHP to Apache. To do this go to the Apache configuration directory (on my C: \\ Program Files \\ Apache Software Foundation \\ apache2.2 \\ conf) and surrender edit the httpd.conf file by adding at the end:

 
# For PHP 5 do something like this :
LoadModule php5_module "c: / php/php5apache2_2.dll"
AddType application / x-httpd-php. php # configure

the path to php.ini
PHPIniDir "C: / php"


before starting the server Apache should prepare a two files in the directory htdocs (on my C: \\ Program Files \\ Apache Software Foundation \\ apache2.2 \\ htdocs). The first named test.php form:
 
\u0026lt;? Php
phpinfo ();
?>
db2test.php
and file the form:
 
\u0026lt;?
php $ database = 'SAMPLE';
$ user = 'db2admin';
$ password = 'your_password';

db2_connect $ conn = ($ database, $ user, $ password);

if ($ conn) {
echo "Connected";
db2_close ($ conn);}

?>


It only remained to run the server and check correct display page http://localhost/test.php and http://localhost/db2test.php. On the first of them should see php modules installed, including one added by us ibm_db2. On the other hand, as you might guess, you will see the word Connected, you connect to the SAMPLE database.

Since we have configured the environment, we can see a list of features offered by the module ibm_db2. The full list can be found on http://uk2.php.net/manual/pl/ref.ibm-db2.php .

But as they say a good programmer is a lazy programmer. The question therefore arises whether or not you can skip the whole process of setting up and ready to install package. The solution is a server for Zend Core 2 available on the IBM www.zend.com / en / products / core / downloads . It allows for much simpler systems environment, including Apache HTTP 2, PHP5 (with Zend Optimizer) and DB2 Express-C 9