php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57353 won't compile
Submitted: 2006-11-07 09:54 UTC Modified: 2006-11-07 10:47 UTC
From: c dot kworr at gmail dot com Assigned:
Status: Not a bug Package: PDO (PECL)
PHP Version: 5.2.0 RC4 OS: FreeBSD
Private report: No CVE-ID: None
 [2006-11-07 09:54 UTC] c dot kworr at gmail dot com
Description:
------------
'am using PDO-1.0.3 and PHP 5.2.0 Release. Build fails:

cc -I. -I/usr/tmp/.amd_mnt/blade/host/usr/ports/databases/pecl-PDO/work/PDO-1.0.3 -DPHP_ATOM_INC -I/usr/tmp/.amd_mnt/blade/host/usr/ports/databases/pecl-PDO/work/PDO-1.0.3/include -I/usr/tmp/.amd_mnt/blade/host/usr/ports/databases/pecl-PDO/work/PDO-1.0.3/main -I/usr/tmp/.amd_mnt/blade/host/usr/ports/databases/pecl-PDO/work/PDO-1.0.3 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -O2 -fno-strict-aliasing -pipe -march=athlon-xp -c /usr/tmp/.amd_mnt/blade/host/usr/ports/databases/pecl-PDO/work/PDO-1.0.3/pdo.c  -fPIC -DPIC -o .libs/pdo.o
/usr/tmp/.amd_mnt/blade/host/usr/ports/databases/pecl-PDO/work/PDO-1.0.3/pdo.c: In function `php_pdo_get_exception_base':
/usr/tmp/.amd_mnt/blade/host/usr/ports/databases/pecl-PDO/work/PDO-1.0.3/pdo.c:78: error: too few arguments to function `zend_exception_get_default'

After using a simple patch (calling zend_exception_get_default with a parameter for this version) all builds well but still doesn't work:

PHP Fatal error:  Class 'PDO' not found in /usr/home/arcade/svn/wo/Site/www/include/dbase.class.php on line 9


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-07 10:11 UTC] c dot kworr at gmail dot com
oops, i'm sorry. The following patch works well:

--- pdo.c.old   Tue Nov  7 16:31:35 2006
+++ pdo.c       Tue Nov  7 16:32:13 2006
@@ -74,7 +74,7 @@
                }
        }
 #endif
-#if (PHP_MAJOR_VERSION < 6)
+#if (PHP_MAJOR_VERSION < 5) || ( ( PHP_MAJOR_VERSION == 5 ) && (PHP_MINOR_VERSION < 2) )
        return zend_exception_get_default();
 #else
        return zend_exception_get_default(TSRMLS_C);
 [2006-11-07 10:47 UTC] wez@php.net
PHP 5.2 ships with the latest version of all PDO drivers; please use those instead of PECL for the time being.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC