Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Bug #94 segmentation fault when connecting to database
Submitted: 2003-10-13 13:38 UTC
From: nikolaj dot jansen at telfort dot nl Assigned:
Status: Bogus Package: DB_DataObject
PHP Version: 4.3.2 OS: redhat linux
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2003-10-13 16:20 UTC
Package:
Bug Type:
Summary:
From: nikolaj dot jansen at telfort dot nl
New email:
PHP Version: Package Version: OS:

 

 [2003-10-13 13:38 UTC] nikolaj dot jansen at telfort dot nl
Description: ------------ segmentation fault when connecting to db. This happens only on our production server, not on my development machine (debian, php 4.3.3RC3). Both use latest DataObject version. Using exit(); at several points I found the offending line in function _connect(): // it's not currently connected! // try and work out what to use for the dsn ! $options= &$_DB_DATAOBJECT['CONFIG']; $dsn = @$this->_database_dsn; if (!$dsn) { if (!$this->_database) { #Offending line############ $this->_database = @$options["table_{$this->__table}"]; ###################### } if (@$this->_database && @$options["database_{$this->_database}"]) { $dsn = $options["database_{$this->_database}"]; } else if ($options['database']) { $dsn = $options['database']; } } Reproduce code: --------------- This is a dump of the $options array(17) { ["dont_die"]=> string(1) "0" ["database"]=> string(29) "mysql://root@localhost/websms" ["#schema_location"]=> string(15) "../../../../etc" ["schema_location"]=> string(35) "/home/sta01/www/testsite/etc/websms" ["class_location"]=> string(9) "generated" ["require_prefix"]=> string(12) "DataObjects/" ["class_prefix"]=> string(11) "WEBSMS_DBO_" ["ignore_sequence_keys"]=> string(0) "" ["extends_location"]=> string(18) "grap_dbo.class.php" ["extends"]=> string(8) "GRAP_DBO" ["generator_class_rewrite"]=> string(0) "" ["debug"]=> int(3) ["debug_force_updates"]=> string(1) "0" ["production"]=> string(1) "0" ["table_VoucherLog"]=> string(6) "websms" ["table_Statistics"]=> string(6) "websms" ["database_websms"]=> string(40) "mysql://websms:XXXXXXX@localhost/websms" } Expected result: ---------------- I expected it to happily connect ;) Actual result: -------------- Through a webbrowser a zero sized result, through command line a segmentation fault (no core dump)

Comments

 [2003-10-13 13:44 UTC] datenpunk at php dot net
Do you have Zend Optimizer enabled? Zend Optimizer has some problems with oeverload() AFAIK. Try to lower your optimization level in php.ini: zend_optimizer.optimization_level=14 hth Daniel Khan
 [2003-10-13 13:49 UTC] nikolaj dot jansen at telfort dot nl
nope, no optimizer installed...
 [2003-10-13 14:01 UTC] datenpunk at php dot net
Have you tried upgrading to the latest php version? You say you are using 4.3.2 on one host and 4.3.3RC3 on the other. A segfault usually is caused by php itself and not by PEAR but it makes no sense to file a bug for php if you don't use the most recent version.
 [2003-10-13 16:20 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!