Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
the original server came with PHP 4, and I upgraded it using yum –  Arsenal May 11 '10 at 6: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 –  Arsenal May 11 '10 at 6:49
    
the 5.2.9 version ... –  Arsenal May 11 '10 at 6: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 –  Arsenal May 11 '10 at 7: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 –  Arsenal May 11 '10 at 7:04

1 Answer 1

up vote 0 down vote accepted

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.