PDA

View Full Version : Recompiling PHP with pdo & pdo_mysql support



Orbixx
10-20-2008, 11:49 AM
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

smtalk
10-20-2008, 11:58 AM
When you change /usr/local/directadmin/custombuild/configure/ap2/configure.php5, you need to run: "./build php n".

Orbixx
10-20-2008, 12:00 PM
Where is the build binary located?

iceuk626
10-20-2008, 12:02 PM
its a script in /usr/local/directadmin/custombuild

Orbixx
10-20-2008, 12:03 PM
Ah thank you, it's compiling now.

freakie
10-21-2008, 08:32 AM
what options do you use in configure.php5 and how did you install pdo / pdo_mysql ?

i've been trying to get this to work without succes.

Orbixx
10-21-2008, 08:37 AM
Add these lines:


--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/

smtalk
11-18-2008, 02:10 PM
You don't need to use pecl to install pdo_mysql :) Just do:

cd /usr/local/directadmin/custombuild
./build update
./build php n

congkai
02-03-2009, 07:57 AM
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. :)

getUP
10-31-2009, 07:49 PM
You don't need to use pecl to install pdo_mysql :) Just do:

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?

vivalafe
07-31-2010, 12:31 PM
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?

ben29
08-04-2010, 06:31 AM
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


--enable-pdo=shared \

then


./build clean
./build php n