go to bug id or search bugs for
If php was build --without-pdo, PDO-drivers don't build because of missing header-files.
Installing PDO works fine, but when installing a driver I get:
configure: error: Cannot find php_pdo_driver.h
seems if PDO does not copy needed header-files to ect/pdo.
Add a Patch
Add a Pull Request
php_pdo.h is missing too, so make fails.
Thank you for taking the time to write to us, but this is not
PDO support must be built into php itself.
Sounds like a bug to me.
I know that there is PDO-support in PHP itself. But as far as I understood the PECL-Packages should work with future versions of PHP too, so you can install PDO-updates from PECL, even if there is no new release of php-core.
That's what future Gentoo-Linux Packages for PHP will rely on: http://stu.gnqs.org/diary/gentoo.php/2005/07/31/php_overlay_updated
When installing PHP you can choose PDO from php-core ("pdo" USE-Flag) or PDO packages from PECL ("pdo-external" USE-Flag), which can be updated separately later. If this should not be done for future PHP versions, please let me know!
The problem described in this bug report happens if I try to install such PECL-Packages (Drivers) for PDO, when PHP was compiled with "--without-pdo", which leads to the missing header-files in ext/pdo. And when I install PECL-pdo it does not copy/install these header-files (needed by PECL PDO-drivers later) from its source directory to php's ext/pdo directory.
Sounds like a gentoo bug ;-)
I can't repeat this if you use the PHP supported approach:
pear install pdo
pear install pdo_XXX
Wez, have you ensured that your $PHP_INCLUE_DIR/ext/pdo directory used by pear/php-config is empty (from old install, or --with-pdo...)?
I noticed the problem while testing the PECL packages for Gentoo.
I build PHP and PDO completely (manually) from source in my home directory, and I'm not the only one having this problem.
That's what I did:
rm -r $PHP_PREFIX
rm -r php-5.1.0RC1
tar -xjf php-5.1.0RC1.tar.bz2
./configure --prefix=$PHP_PREFIX --disable-all
make && make install && make install-cli
tar -xzf PDO-1.0RC1.tgz
make && make install
tar -xzf PDO_sqlite-1.0RC1.tgz
And HERE I get an error:
checking for PDO includes... checking for PDO includes...
configure: error: Cannot find php_pdo_driver.h.
If I check this:
$ ls $PHP_PREFIX/include/php/ext
There is no PDO directory. For the Gentoo ebuild we have to create that directory, and copy the 3 header-files created in PDO src directory here.
I also canot find a line in http://cvs.php.net/co.php/pecl/pdo/config.m4 - where this should be done from PECL-PDO package itself.
PHP - if configured --without-pdo - does not ship with the needed header PDO Header files, so where should PECL-PDO-SQLITE... get them from?
probably PHP_INSTALL_HEADERS is not defined?
PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h])
Makefile.frag defines install-pdo-headers target and a hack that should cause it to run alongside the install.
I'll see if there's a better way.
Fixed on 5.1 branch.
Will push a PECL release either today or tomorrow.
Your fix works for me, thanks a lot wez!