Archive

Posts Tagged ‘pdo.so’

How to compile pdo_mysql module with php ?

March 18th, 2009 3 comments

Hello,

PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x and 4.x databases.

PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you’re using an older version of the mysql client libraries, PDO will emulate them for you.

Steps to compile compile pdo_mysql module with php

1) Download the PDO package to server

          # wget http://pecl.php.net/get/PDO

2) Manually build and install the PDO extension:

	  # tar xzf PDO-0.2.tgz
	  # cd PDO-0.2
	  # phpize
	  # ./configure
          # make
          # make install
          # echo extension=pdo.so >> /usr/local/php5/lib/php.ini

3) rebuild PHP along with the drivers for PDO_mysql.

CUSTOM_PHP_FLAGS=”–with-pdo-mysql” /scripts/easyapache

4) check php module using php -m command

Enjoys