Recompiling PHP with pdo & pdo_mysql support

Orbixx

Verified User
Joined
May 2, 2008
Messages
44
Hi there,

I was wondering what would be the best way to recompile php with pdo and pdo_mysql support, as I've tried to install them with pecl, but it seems to require php to be compiled with pdo and pdo_mysql support in order for it to work.

I've added the parameters to /usr/local/directadmin/custombuild/configure/ap2/configure.php5, and gone to the php directory at /usr/local/directadmin/custombuild/php-5.2.6 and ./configure'd, but it fails on make.

Is this the correct way to recompile with DA and custombuild? Never manually compiled system services before.

Thanks
 
When you change /usr/local/directadmin/custombuild/configure/ap2/configure.php5, you need to run: "./build php n".
 
Add these lines:

Code:
        --enable-pdo=shared \
        --with-pdo-mysql=shared \
        --with-sqlite=shared \
        --with-pdo-sqlite=shared \

Don't forget to pecl install pdo && pecl install pdo_mysql

Then recompile php

Worked for me \o/
 
You don't need to use pecl to install pdo_mysql :) Just do:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build php n
 
Worked!

add this lines in /usr/local/directadmin/custombuild/configure/ap2/configure.php5
--enable-pdo=shared \
--with-pdo-mysql=shared \
--with-sqlite=shared \
--with-pdo-sqlite=shared \


then do a
cd /usr/local/directadmin/custombuild
./build update
./build php n

its working! i always choose to trust when i see smtalk is dealing with it. good job smtalk. :)
 
You don't need to use pecl to install pdo_mysql :) Just do:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build php n

I've been playing around with pecl and pdo_mysql today, but adding the 4 lines to configure.php5 did not do the trick for me. While manual installation using pecl (and some workarounds because of the noexec thing), it's working just fine.

Are you sure no extra steps are required?
 
Not found

Hello, I've been unable to find a solution for my specific problem.
I am trying to recompile PHP wth PDO and PDO_mysql following the procedure in this thread with no success.
I have added the sugested lines to my /usr/local/directadmin/custombuild/configure/ap2/configure.php5 file:

--enable-pdo=shared \
--with-pdo-mysql=shared \
--with-sqlite=shared \
--with-pdo-sqlite=shared \

The problem starts when I run ./build update. The lines in the configure.php5 file are overwriten and the ./build php n will not include the desired modules.
If instead I try to execute ./build php n without doing first ./build update, then I get the following error when it is generating files:

Thank you for using PHP.

/usr/local/directadmin/custombuild/configure/ap2/configure.php5: line 31: --enable-pdo=shared: command not found

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file

Any advises?
 
Last edited:
by def pdo is enable,
the option on configure it's just to disable.
so you need remove your configure line to enable the pdo !
you should remove the line
Code:
--enable-pdo=shared \
then
Code:
./build clean
./build php n
 
Back
Top