Wednesday, January 31, 2007

Configure MySQL with PHP

Product version: PHP5 (Non-installed version for windows), MySQL5 (Non-installed version for windows).
Steps:
(1) Use php.ini-recommended as the default ini file by renaming it to php.ini.
(2) In the development environment, it's useful to set display_errors = on. When moving the web application to production, this switch should be turned off.
(3) Check the document root in the following line: doc_root ="C:\Program Files\Apache Software Foundation\Apache2.2\htdocs" .
(4) Specify the loadable module directory extension_dir = "C:\php5\ext" .
(5) Enable php_mysql.dll inside of php.ini by removing semicolon from the line ;extension=php_mysql.dll .
(6) PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. So add "C:\php5\" to PATH environmental variable.
(7) Specify upload_tmp_dir and session.save_path if necessary.
(8) Copy some extension pointers in the orginal php.ini file into the new php.ini file.

Simplest way to configure Apache Http Server with PHP

Product Version: Apache Http Server 2.2, PHP 5.
Non-install version of php is used.
Modify file /conf/httpd.conf by adding the following lines:

LoadModule php5_module "C:/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php5"

C:/php5 is the location where php5 is installed.

Modify php.ini by specifying:

doc_root ="C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"

Wednesday, January 10, 2007

Interoperability between oracle jdbc driver and oracle database

There are some data type mapping issues when using oracle jdbc driver 10 with oracle 9i database, which is explained on Oracle JDBC FAQ . Old version mapping can also be done by setting the value of "V8Compatibility" to true.

Interesting stuff about portlet development

Concepts of portal and portlet development are quite well explained in the following articles:
Introducing Portlet Specification 1 ,
Introducing Portlet Specification .