0

On my server I'm trying to instal PHProjekt (6). This requires pdo_mysql however. I thought this installation of pdo_mysql would be rather straightforward...

I tried using pecl (pecl install pdo_mysql) after installing devel etc, but this came up with a permission denied error. I solved this by using directories that were accessible. It then came up with a cant run C compiled programs however. It also says to check config.log for more details but ironically config.log is automatically removed if the installation process fails... When I try to compile and output a "hello world".c however, it works perfectly.

I then tried to download the pdo_mysql stuff and install in myself (using configure and make install). This seemed to do the job, but when I restarted my apache ... no sign of pdo_mysql anywhere even though I adjusted my php.ini file

I have read somewhere that you need to recompile PHP with the option pdo_mysql enabled. But how does one do that (I'm using CentOS4). And isn't there any other way than that???

I compiled PHP 5.2.9 from source into /usr/local.

Thanks!

  • the original server came with PHP 4, and I upgraded it using yum –  May 11 '10 at 06:45
  • hmmm, it returns php-4.3.9-3.29 :-/ ... entering php -v however returns: PHP 5.2.9 (cli) (built: May 26 2009 17:49:45) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies –  May 11 '10 at 06:49
  • the 5.2.9 version ... –  May 11 '10 at 06:53
  • I did rpm -qf /usr/bin/php which gave me the 4.3.9 version, but couldn't find where the 5.2.9 lives –  May 11 '10 at 07:03
  • okay, which php returned: /usr/local/bin/php when using this path with rpm -qf I got the following: file /usr/local/bin/php is not owned by any package –  May 11 '10 at 07:04
  • Alright, add the fact that you compiled 5.2.9 from source into `/usr/local` to your question. – Ignacio Vazquez-Abrams May 11 '10 at 07:07
  • done :-) but how is this preventing me from installing pdo_mysql? –  May 11 '10 at 07:09
  • Dunno. But now people that might know are aware that you're not using the stock PHP. – Ignacio Vazquez-Abrams May 11 '10 at 07:14

1 Answers1

0

I actually found the solution.

I downloaded the PHP tar.gz file, rebuild PHP with the option '--with-pdo_mysql=shared' added, manually installed pdo_mysql like this: wget url_of_the_tar tar xzf file_name cd created_directory phpize ./configure make install clean

because I had several extensions loaded already I couldn't change the extensions_dir property in the php.ini file, but to my big surprise, moving the extensions from the ../no-debug-.../ folder to the correct folder everything worked.

I still think it's a ***load of work to install a simple extension, but hey, it worked!