php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40733 Undefined symbol: spl_ce_RuntimeException
Submitted: 2007-03-05 19:51 UTC Modified: 2007-03-28 01:00 UTC
Votes:7
Avg. Score:3.7 ± 0.9
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:4 (57.1%)
From: alan dot mcfarlane at gmail dot com Assigned: helly (profile)
Status: No Feedback Package: MySQLi related
PHP Version: 5.2.1 OS: *
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
9 + 2 = ?
Subscribe to this entry?

 
 [2007-03-05 19:51 UTC] alan dot mcfarlane at gmail dot com
Description:
------------
There appears to be a problem with one of the extensions - possibly un undefined symbol:

The following extensions are active (in order):

session mysqli zip pdf json hash gmp filter fileinfo curl posix sockets openssl ldap simplexml bz2 snmp gettext iconv dom tokenizer xmlreader readline imap xml exif mhash mcrypt mysql mbstring xmlwriter zlib pcre spl sqlite ctype ftp gd xsl

Reproduce code:
---------------
echo phpversion();

Expected result:
----------------
5.2.1

Actual result:
--------------
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/mysqli.so' - /usr/local/lib/php/20060613/mysqli.so: Undefined symbol "spl_ce_RuntimeException" in Unknown on line 0
5.2.1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-05 20:01 UTC] bjori@php.net
Please report this to the PHP ports maintainers.
Not a PHP problem => bogus
 [2007-03-05 21:23 UTC] helly@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2007-03-05 21:23 UTC] helly@php.net
We need your configure line and whether you compile the extension shared or not.
 [2007-03-06 07:40 UTC] alan dot mcfarlane at gmail dot com
Configure:
----------
'./configure' '--enable-versioning' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-a
ll' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection' '--program-prefix=' '--enable-fastcgi' '--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local'

Both PHP and all the extensions were built using the standard FreeBSD ports structure.

Note the problem does NOT manifest itself on any of my 64-bit boxes.
 [2007-03-06 12:41 UTC] tony2001@php.net
Marcus, optional extension dependency is missing.
Though I honestly do not understand why on earth MySQLi uses SPL exception class.
IMO this is counter-intuitive and makes users to guess what is the parent class of mysqli exception - whether it's Exception or RuntimeException?
 [2007-03-20 11:43 UTC] darren dot pilgrim at gmail dot com
There appears to be some sensitivity to the order of modules in extensions.ini.  If extensions.ini is sorted, spl.so comes after mysqli.so and the error occurs.  If spl.so is moved to preceed mysqli.so, the error does not occur.
 [2007-03-20 20:01 UTC] helly@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-03-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-11-26 23:10 UTC] jojo at matfyz dot cz
I had the same problem on FreeBSD 6.2-p5, PHP 5.2.5. I have tried daren's trick with reordering the list of extensions in extensions.ini - I put the mysqli.so the last. It helped.
 [2009-03-11 07:50 UTC] andy at is9 dot org
I'm experiencing the same problem at my server <a href="http://www.sytru.com/">www.sytru.com</a> using PHP 5.2.9, however if you change the direction of modules so that spl comes BEFORE mysqli, everything works like a charm.

Just modify your extensions.ini file:

extension=spl.so
extension=mysqli.so
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 18:01:31 2024 UTC