Mac OS X Snow Leopard: PHP 5.3 + OCI8

Antonio Musarra

I began my journey into the world of computing from an Olivetti M24 PC (http://it.wikipedia.org/wiki/Olivetti_M24) bought by my father for his work. Day after day, quickly taking control until … Now doing business consulting for projects in the enterprise application development using web-oriented technologies such as J2EE, Web Services, ESB, TIBCO, PHP.

You may also like...

  • Pingback: Mac OS X Snow Leopard: PHP 5.3 + OCI8 | BNotizie Magazine()

  • Celso Coutinho

    Have you already translated this? I read in the oracle foruns that you would do so!

    I tried everything that’s on the web about this matter, and my last hope relies on your site…

    Greetings from Portugal!

  • Andrea

    Passato a Snow Leopard, mi ritrovo con PHP 5.3 e milioni di warnings che gremiscono il mio sito!!!
    Aiuto!

    • http://musarra.wordpress.com Antonio Musarra

      Ciao Andrea, non è stata una buona idea migrate al nuovo Mac OS X, in particolar modo quando quando
      usato in ambienti di produzione. La versione PHP 5.3 introduce parecchie novità che possono create problemi a applicazioni e/o siti che prima funzionavano correttamente.

      Che tipo di warning ricevi ? Forse è possibile rendere la versione 5.3 in modalità compatibile alla versione precedente.

      Ti posso consigliare di fare un downgrade alla versione precedente di PHP se le nuove funzionalità introdotte con la versione 5.3 di PHP non ti
      servono.

      Bye,
      Antonio.

  • Vlad from .ru

    Thanx a lot Antonio!
    I was almost throwing away my new macbook. Every other blog, even Oracle’s recommend recompile ALL php, apache and the staff.

    Your solution is the best!!!

    • http://musarra.wordpress.com Antonio Musarra

      Hi,
      Thank you very much for the appreciation of my article. I am happy that your MacBook is safe!
      Merry Christmas and Happy New Year.

      Bye,
      Antonio.

  • Pingback: 2010 in review | Antonio Musarra's Blog()

  • Franki

    Hello Antonio,
    Thanks for your article.
    I have a zend server CE installed with OCI8 extension enabled that works fine! But I should connet to an Oracle 8i and thw oci_connect says that the version is no longer supported. I use the instantclient 10.2 and I have read that with this client is still possible to connect to Oracle 8i but the extension ¡must be recompiled with the client libraries. So I execute /usr/local/zend/bin/pecl install oci8 and follow your steps but without success.
    In ZendServer logs I have:
    [27-May-2011 10:29:04] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/zend/lib/php_extensions/oci8.so’ – dlopen(/usr/local/zend/lib/php_extensions/oci8.so, 9): no suitable image found. Did find:
    /usr/local/zend/lib/php_extensions/oci8.so: mach-o, but wrong architecture in Unknown on line 0

    Have you ever try to recompile oci8 with zend server tools?
    Thanks

    Franki

    • http://musarra.wordpress.com Antonio Musarra

      Hi Franki,
      sorry if I answer only now, but I was on vacation.

      I have not tried to build the OCI8 module with Zend Server CE on OS X. What kind of errors you receive when you compile?

      Let me know.

      Bye,
      Antonio

      • Franki

        Hi Antonio,

        The pecl command works well. But the new compiled oci8.so fails to load.
        In the Zend Server logs: “PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/zend/lib/php_extensions/oci8.so’ – (null) in Unknown on line 0″

        I have use otool -L and the output is:
        oci8.so:
        /b/227/rdbms/lib/libclntsh.dylib.10.1 (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)

        With the oci8.so distributed with ZendServer the output is:
        oci8.so:
        /b/32_216/rdbms/lib/libclntsh.dylib.10.1 (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.1)

        • http://musarra.wordpress.com Antonio Musarra

          Hi Franki,
          The error you get is just weird. Anyway I attached the compatibility matrix oracle instant client.
          I suggest you read the post http://blog.whitehorses.nl/2010/02/19/database-version-compatibility-and-support-matrix/
          I believe that there should be an updated version of Oracle, at least to version 9.

          Bye,
          Antonio.

          Server Version
          Client Version 10.1.0 9.2.0 9.0.1 8.1.7 8.1.6 8.1.5 8.0.6 8.0.5 7.3.4
          10.1.0(#4) Yes Yes Was EMS #2 No #3 No #3 No #3 No #3 No #3
          9.2.0 Yes Yes Was EMS No No Was No No #1
          9.0.1 Was Was Was Was Was No Was No Was
          8.1.7 EMS EMS Was EMS Was Was Was Was Was
          8.1.6 No No Was Was Was Was Was Was Was
          8.1.5 No No No Was Was Was Was Was Was
          8.0.6 No Was Was Was Was Was Was Was Was
          8.0.5 No No No Was Was Was Was Was Was
          7.3.4 No Was Was Was Was Was Was Was Was

          Yes Supported
          EMS Supported for customers under Extended Maintenance (EMS) only.
          Was Was a supported combination but one of the releases is no longer
          covered by Primary Error Correct support or Extended Maintenance Support
          so fixes are no longer possible.
          No Has never been Supported

          #1 - See
          #2 - An ORA-3134 error is incorrectly reported if a 10.1.0.2 client tries
          to connect to an 8.1.7.3 or lower server. See .
          #3 - An ORA-3134 error is correctly reported when attempting to connect to this version.
          #4 - There are problems connecting from a 10g client to 8i/9i
          where one is EBCDIC based. See