|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-04-24 19:13 UTC] destiney at gmail dot com
Description: ------------ I built PDO per docs: http://www.php.net/manual/en/ref.pdo.php I placed an entry in php.ini: extension=/usr/lib/php/extensions/no-debug-non-zts-20041030/pdo.so Viewed phpinfo() output. Noticed no entry for PDO. Made a PHP script using dl() to force the PDO entension to load. Apache logs indicate segfaulting: [Sun Apr 24 17:29:11 2005] [notice] child pid 754 exit signal Segmentation fault (11) I am using Apache2 in prefork mode. Reproduce code: --------------- <?php if( dl('pdo.so') ) { echo 'pdo.so extension loaded'; } else { echo 'pdo.so extension failed to load'; } ?> Expected result: ---------------- I expected to see 'pdo.so extension loaded' on the screen. Instead I see nothing. Actual result: -------------- [Sun Apr 24 18:13:05 2005] [notice] child pid 1425 exit signal Segmentation fault (11) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 06:00:01 2025 UTC |
I rebuilt PDO and enabled debugging. It's acting a bit different now with debugging and being outside of Apache: > cat pdo.php #!/usr/bin/php -q <?php error_reporting( E_ALL ); $extensions = get_loaded_extensions(); if( in_array( 'pdo', $extensions ) ) { echo 'pdo.so extension already loaded'; } else { if( dl('pdo.so') ) { echo 'pdo.so extension loaded with dl()'; } else { echo 'pdo.so extension failed to load with dl()'; } } $dsn = 'mysql:dbname=test;host=localhost'; $user = 'root'; $password = 'passwd'; try { $dbh = new PDO($dsn, $user, $password); } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); } ?> > ./pdo.php Warning: Module 'PDO' already loaded in Unknown on line 0 pdo.so extension failed to load with dl()Connection failed: could not find driver/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_execute.c(3255) : Freeing 0x08613A4C (16 bytes), script=./pdo.php === Total 1 memory leaks detected === > head /etc/php/cli-php5/php.ini [PHP] extension=pdo.so ;;;;;;;;;;; ; WARNING ; ;;;;;;;;;;; ; This is the default settings file for new PHP installations. ; By default, PHP installs itself with a configuration suitable for ; development purposes, and *NOT* for production purposes.