|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-11-30 15:16 UTC] phyre at rogers dot com
Description: ------------ When PDO is built as a shared extension, installing its sub-modules does not work. Reproduce code: --------------- # pecl install pdo_mysql pear/PDO_MYSQL requires PHP extension "pdo" (version >= 1.0) No valid packages found install failed # pecl install pdo Skipping package "pear/PDO", already installed as version 1.0.2 No valid packages found install failed # cat /etc/php.ini | grep pdo extension=pdo.so extension=pdo_mysql.so extension=pdo_pgsql.so Expected result: ---------------- It should detect the shared pdo module and allow the install of its subcomponents. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
I got a fix, it's a definite hack to phpize and removing the code that's always breaking. find PHP_ADD_EXTENSION_DEP inside /usr/lib/php5/build/acinclude.m4 (or wherever yours is located) and REMOVE this snippet from that function: if test "x$is_it_shared" = "x" && test "x$3" != "xtrue"; then AC_MSG_ERROR([ You've configured extension $1, which depends on extension $2, but you've either not enabled $2, or have disabled it. ]) fi I don't know why it fails but removing it will allow successful configure of PDO_MYSQL and friends, this wasn't a problem in 5.1.1 i read also.Another workaround: edit configure and about line 5712 comment these lines: <pre> if test "x$is_it_shared" = "x" && test "x" != "xtrue"; then { { echo "$as_me:$LINENO: error: You've configured extension pdo_sqlite, which depends on extension pdo, but you've either not enabled pdo, or have disabled it. " >&5 echo "$as_me: error: You've configured extension pdo_sqlite, which depends on extension pdo, but you've either not enabled pdo, or have disabled it. " >&2;} { (exit 1); exit 1; }; } fi </pre>Here is a fix. You don't need to install PDO extension provided by pecl if pdo package is contained in your distribution (e.g. Debian) itself. In PEAR directory, edit your Dependency2.php file - add this line at the beginning of extension_loaded() function: --- dl("$name.so"); --- Or, if you want to be more precisious, you can add these lines instead: --- if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $prefix = 'php_'; $suffix = '.' . ( defined('PHP_SHLIB_SUFFIX') ? PHP_SHLIB_SUFFIX : 'dll' ); } else { $prefix = ''; $suffix = '.' . ( defined('PHP_SHLIB_SUFFIX') ? PHP_SHLIB_SUFFIX : 'so' ); } @dl($prefix . $name . $suffix); --- Have a nice day