Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1270

MongoDate->toDateTime is only supported for PHP 5.3.4 and later.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.6.0RC1
    • Fix Version/s: 1.6.0RC2, 1.6.0
    • Component/s: pecl-mongo
    • Labels:
      None
    • Environment:
      RHEL-6
    • # Replies:
      6
    • Last comment by Customer:
      false
    • Sprint:
      PHP Sprint 11

      Description

      According to package.xml, min php supported version is 5.3.0.

      See RPM test build:
      https://copr.fedoraproject.org/coprs/remi/morephp/build/59335/

      ON RHEL-6, with PHP 5.3.3 when trying to load the extension:
      PHP Warning: PHP Startup: Unable to load dynamic library '.../mongo.so' - .../mongo.so: undefined symbol: php_date_initialize in Unknown on line 0

      This API is exposed starting with 5.3.4

        Activity

        Hide
        remi Remi Collet added a comment -

        Minor update: This API "exists" since 5.3.4

        I will understand you consider this as a documentation issue and fix the min version in package.XML

        Show
        remi Remi Collet added a comment - Minor update: This API "exists" since 5.3.4 I will understand you consider this as a documentation issue and fix the min version in package.XML
        Hide
        derick Derick Rethans added a comment -

        Hey Remi Collet,

        RHEL must load .sos differently, as I can not reproduce the loading issue. However, you are right that this got introduced in 5.3.4, the PR is at https://github.com/mongodb/mongo-php-driver/pull/760

        Thanks for testing the RC!

        cheers,
        Derick

        Show
        derick Derick Rethans added a comment - Hey Remi Collet , RHEL must load .sos differently, as I can not reproduce the loading issue. However, you are right that this got introduced in 5.3.4, the PR is at https://github.com/mongodb/mongo-php-driver/pull/760 Thanks for testing the RC! cheers, Derick
        Hide
        remi Remi Collet added a comment -

        > RHEL must load .sos differently

        Yes .so are loaded with RTLD_NOW (instead of RTLD_LAZY), for security reason.
        This explain the undefined symbol at load time (which, I think, is better than later, segfault at runtime)

        > Thanks for testing the RC!

        Welcome!
        and thanks for doing RC

        Show
        remi Remi Collet added a comment - > RHEL must load .sos differently Yes .so are loaded with RTLD_NOW (instead of RTLD_LAZY), for security reason. This explain the undefined symbol at load time (which, I think, is better than later, segfault at runtime) > Thanks for testing the RC! Welcome! and thanks for doing RC
        Hide
        derick Derick Rethans added a comment - - edited

        Instead of marking it 5.3.4 and higher only, I've disabled the method for PHP 5.3.3 and lower.

        And using RTLD_NOW instead of _LAZY does mean that you can't have two shared extensions that depend on each other... and/or their load order is suddenly important. Not sure whether that is better.

        Show
        derick Derick Rethans added a comment - - edited Instead of marking it 5.3.4 and higher only, I've disabled the method for PHP 5.3.3 and lower. And using RTLD_NOW instead of _LAZY does mean that you can't have two shared extensions that depend on each other... and/or their load order is suddenly important. Not sure whether that is better .
        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'derickr', u'name': u'Derick Rethans', u'email': u'github@derickrethans.nl'}

        Message: PHP-1270: MongoDate->toDateTime is only supported for PHP 5.3.4 and later.
        Branch: master
        https://github.com/mongodb/mongo-php-driver/commit/9bc8a6b8e2e0958c9ea35e42b28139bbb27a523d

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'derickr', u'name': u'Derick Rethans', u'email': u'github@derickrethans.nl'} Message: PHP-1270 : MongoDate->toDateTime is only supported for PHP 5.3.4 and later. Branch: master https://github.com/mongodb/mongo-php-driver/commit/9bc8a6b8e2e0958c9ea35e42b28139bbb27a523d
        Hide
        derick Derick Rethans added a comment -
        Show
        derick Derick Rethans added a comment - Documented in http://news.php.net/php.doc.cvs/12926

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              2 years, 18 weeks, 3 days ago
              Date of 1st Reply:

                Agile