1 7 8 9 10 11 Previous Next 154 Replies Latest reply: Dec 30, 2008 6:42 PM by 601182 Go to original post RSS
      • 135. Re: Oracle Instant Client for Intel MacOS X
        597918
        I just ran the demo that comes with instant client as a test, and it didn't work:

        holdrend@sbkholdrend-par-mb:/usr/local/lib/oracle/instantclient_10_2/sdk/demo$ sudo make -f demo.mk
        rm -rf SunWS_cache
        rm -rf ../../libclntsh.dylib
        rm -rf ../../libocci.dylib
        rm -rf cdemo81 cdemo81.o occidml occidml.o occiobj occiobj.o occiobjo* occiobjm* occiobj.h occiobjout.type
        /usr/bin/gcc -c -I../include -I/rdbms/public/ -I/oracore/include -I/oracore/public -I/oracore/port/include -I/nlsrtl/include -I/plsql/public -I/plsql/include -I/network/public -I/network/include -I/otrace/public -I/otrace/include/ -I/precomp/public -I/precomp/include/ -I/slax/include -I/ordts/public -I/ordts/include -I/javavm/include -I/javavm/include/osds/unix/solaris -I/ctx/public -I/ordvir/public -I/ordvir/include -idirafter . -DMAC_OSX -D_GNU_SOURCE -D_REENTRANT -g cdemo81.c
        ln ../../libclntsh.dylib.10.1 ../../libclntsh.dylib
        ln ../../libocci.dylib.10.1 ../../libocci.dylib
        /usr/bin/g++ -o cdemo81 -g cdemo81.o -L../../ -locci -lclntsh -lpthread
        /usr/bin/ld: ../..//libocci.dylib load command 7 unknown cmd field
        /usr/bin/ld: ../..//libclntsh.dylib load command 8 unknown cmd field
        collect2: ld returned 1 exit status
        make: *** [buildoci] Error 1
        • 136. Re: Oracle Instant Client for Intel MacOS X
          597918
          well, I just heard from someone at Oracle that this is only supported for Leopard.

          ok, I'll see if I can upgrade my mac, but I wish that was mentioned somewhere.... would have saved me a bit of effort
          • 137. Re: Oracle Instant Client for Intel MacOS X
            akaimale
            10.2.0.4 apple intel client is certified for Leopard -10.5( and later!!). It is not cerified on 10.4
            • 138. Re: Oracle Instant Client for Intel MacOS X
              636021
              My post on the previous page with all of the test failures when building PHP was using 10.5 Leopard.
              • 139. Re: Oracle Instant Client for Intel MacOS X
                akaimale
                Please run configure as mentioned in <php src>/ext/oci8/README and export the variables mentioned there before running the tests. If it still fails check ext/oci8/tests/array_bind_001.diff for the actual error.
                • 140. Re: Oracle Instant Client for Intel MacOS X
                  636021
                  I configured as the readme suggested, here is the results from the diff file:


                  001+ Warning: ocilogon(): ORA-12154: TNS:could not resolve the connect identifier specified in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/connect.inc on line 17
                  002+
                  003+ Warning: oci_parse() expects parameter 1 to be resource, boolean given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 6
                  004+
                  005+ Warning: oci_parse() expects parameter 1 to be resource, boolean given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 10
                  006+
                  007+ Warning: oci_execute() expects parameter 1 to be resource, null given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 11
                  008+
                  009+ Warning: oci_parse() expects parameter 1 to be resource, boolean given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 18
                  010+
                  011+ Warning: oci_execute() expects parameter 1 to be resource, null given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 19
                  012+
                  013+ Warning: oci_parse() expects parameter 1 to be resource, boolean given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 41
                  014+
                  015+ Warning: oci_execute() expects parameter 1 to be resource, null given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 42
                  016+
                  017+ Warning: oci_parse() expects parameter 1 to be resource, boolean given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 44
                  018+
                  019+ Warning: oci_bind_array_by_name() expects parameter 1 to be resource, null given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 48
                  001- Warning: oci_bind_array_by_name(): OCI-21560: argument 3 is null, invalid, or out of range in %s on line %d
                  003- Warning: oci_execute(): ORA-01008: not all variables bound in %s on line %d
                  004- array(1) {
                  005- [0]=>
                  006- string(0) ""
                  007- }
                  021+ Warning: oci_execute() expects parameter 1 to be resource, null given in /Users/username/Downloads/php-5.2.5/ext/oci8/tests/array_bind_001.php on line 50
                  • 141. Re: Oracle Instant Client for Intel MacOS X
                    akaimale
                    the SID mentioned in PHP_OCI8_TEST_DB doesn't seems to be valid or tnsnames.ora is not present at default location ($ORACLE_HOME/network/admin).


                    Please make sure following variables are exported before running tests :
                    PHP_OCI8_TEST_DB_ON_LOCALHOST
                    PHP_OCI8_TEST_DB
                    PHP_OCI8_TEST_PASS
                    PHP_OCI8_TEST_USER
                    DYLD_LIBRARY_PATH
                    TNS_ADMIN
                    TWO_TASK
                    ORACLE_HOME

                    Also using the sqlplus binary in the instant client verify that you can connect to the database with above settings.
                    • 142. Re: Oracle Instant Client for Intel MacOS X
                      636021
                      My tnsnames.ora file actually lives in $ORACLE_HOME

                      I just put a symlink to it in the location you suggested: ($ORACLE_HOME/network/admin)

                      I am lacking the following environment variables that you mention, and am unaware of how to properly set them.

                      PHP_OCI8_TEST_DB_ON_LOCALHOST
                      PHP_OCI8_TEST_DB
                      PHP_OCI8_TEST_PASS
                      PHP_OCI8_TEST_USER
                      TWO_TASK

                      I would expect the test variables to be set during/prior to the tests running. Can you advise on how to set these?
                      • 143. Re: Oracle Instant Client for Intel MacOS X
                        636163
                        I was able to get around that by setting the
                        following (when running configure, make, make
                        install):

                        export
                        DYLD_LIBRARY_PATH="/example/instantclient_10_2"
                        I am also getting the same errors of FAIL during
                        make
                        test, and I can't do a make install, I get:

                        Installing PEAR environment: /usr/lib/php/
                        dyld: Library not loaded:
                        /scratch/plebld/208/rdbms/lib/libclntsh.dylib.10.1
                        Referenced from:
                        /Users/me/src/php-5.1.6/sapi/cli/php
                        Reason: image not found
                        ake[1]: *** [install-pear-installer] Trace/BPT
                        trap
                        make: *** [install-pear] Error 2
                        Yeah, tried that... still getting the same error. I can create the directory and link it to my instantclient directory, but then other weird things happen later, so I am trying to figure this out without hacking in that path.

                        Anyone have any other suggestions?

                        Thanks,
                        Kevin
                        • 144. Re: Oracle Instant Client for Intel MacOS X
                          635940
                          Try this:

                          export DYLD_LIBRARY_PATH="/example/instantclient_10_2"
                          export SQLPATH="/example/instantclient_10_2"
                          export NLS_LANG="AMERICAN_AMERICA.UTF8"
                          export PATH=$PATH:$DYLD_LIBRARY_PATH
                          • 145. Re: Oracle Instant Client for Intel MacOS X
                            akaimale
                            I assume that you have an Oracle database setup on a remote machine and you have got a user account in that.

                            and in tnsnames.ora you hav e an entry like :
                            <sid>=
                            "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=<remote host>) (PORT=<listner port>))(CONNECT_DATA=(SERVICE_NAME=<SID>)))"

                            Oracle Variables:
                            DYLD_LIBRARY_PATH=<direcrory where you unzipped instantclient>
                            TNS_ADMIN=<directory where your tnsnames.ora is located>
                            TWO_TASK=<SID>
                            ORACLE_HOME = <direcrory where you unzipped instantclient>

                            Once you set this variable please run '$ORACLE_HOME/sqlplus <you database username>/<password> ' to connect the database and try some sqls.

                            If the above part works fine set the following PHP test variables :

                            PHP_OCI8_TEST_DB_ON_LOCALHOST=FALSE
                            PHP_OCI8_TEST_DB=<SID>
                            PHP_OCI8_TEST_PASS=<your username in the database>
                            PHP_OCI8_TEST_USER=<password>

                            and run the OCI tests from PHP. This should work fine.
                            • 146. Re: Oracle Instant Client for Intel MacOS X
                              636163
                              ok,

                              I setup all the variables, and was able to log into the db machine via sqlplus, and run some commands.

                              I then run: make test, from the php src directory

                              Most of the tests pass, some don't:

                              =====================================================================
                              FAILED TEST SUMMARY
                              ---------------------------------------------------------------------
                              Bug #30638 (localeconv returns wrong LC_NUMERIC settings) [tests/lang/bug30638.phpt]
                              bind LONG field [ext/oci8/tests/bind_long.phpt]
                              bug #27303 (OCIBindByName binds numeric PHP values as characters) [ext/oci8/tests/bug27303.phpt]
                              bug #27303 (OCIBindByName binds numeric PHP values as characters) [ext/oci8/tests/bug27303_2.phpt]
                              bug #27303 (OCIBindByName binds numeric PHP values as characters) [ext/oci8/tests/bug27303_4.phpt]
                              collections and negative/too big element indexes [ext/oci8/tests/coll_016.phpt]
                              collections and negative/too big element indexes [ext/oci8/tests/coll_016_func.phpt]
                              oci_connect() without ORACLE_HOME set (OCIServerAttach() segfaults) [ext/oci8/tests/connect_without_oracle_home.phpt]
                              ocilogon() without ORACLE_HOME set (OCIServerAttach() segfaults) [ext/oci8/tests/connect_without_oracle_home_old.phpt]
                              oci_error() when oci_connect() fails [ext/oci8/tests/error1.phpt]
                              oci_field_*() family [ext/oci8/tests/field_funcs.phpt]
                              ocicolumn*() family [ext/oci8/tests/field_funcs_old.phpt]
                              fetching the same lob several times [ext/oci8/tests/lob_018.phpt]
                              oci_lob_write()/erase()/read() with CLOBs [ext/oci8/tests/lob_020.phpt]
                              temporary lobs [ext/oci8/tests/lob_temp.phpt]
                              closing temporary lobs [ext/oci8/tests/lob_temp1.phpt]
                              oci_execute() segfault after repeated bind [ext/oci8/tests/oci_execute_segfault.phpt]
                              oci_password_change() [ext/oci8/tests/password.phpt]
                              oci_password_change() [ext/oci8/tests/password_new.phpt]
                              ocipasswordchange() [ext/oci8/tests/password_old.phpt]
                              privileged connect tests [ext/oci8/tests/privileged_connect1.phpt]
                              Sort with SORT_LOCALE_STRING [ext/standard/tests/array/locale_sort.phpt]
                              Bug #24313 (file_exists() warning on non-existant files when is open_basedir enabled) [ext/standard/tests/file/bug24313.phpt]
                              date_sunrise() and date_sunset() functions [ext/standard/tests/general_functions/sunfuncts.phpt]
                              =====================================================================

                              And when trying to compile, I still get:

                              Installing PHP SAPI module: apache2handler
                              /usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1/build-1/libtool' libs/libphp5.so /usr/local/apache/modules
                              /usr/share/apr-1/build-1/libtool --mode=install cp libs/libphp5.so /usr/local/apache/modules/
                              cp libs/libphp5.so /usr/local/apache/modules/libphp5.so
                              Warning! dlname not found in /usr/local/apache/modules/libphp5.so.
                              Assuming installing a .so rather than a libtool archive.
                              chmod 755 /usr/local/apache/modules/libphp5.so
                              [activating module `php5' in /usr/local/apache/conf/httpd.conf]
                              Installing PHP CLI binary: /usr/local/php/bin/
                              Installing PHP CLI man page: /usr/local/php/man/man1/
                              Installing build environment: /usr/local/php/lib/php/build/
                              Installing header files: /usr/local/php/include/php/
                              Installing helper programs: /usr/local/php/bin/
                              program: phpize
                              program: php-config
                              Installing man pages: /usr/local/php/man/man1/
                              page: phpize.1
                              page: php-config.1
                              Installing PEAR environment: /usr/local/php/lib/php/
                              dyld: Library not loaded: /scratch/plebld/208/rdbms/lib/libclntsh.dylib.10.1
                              Referenced from: /Users/me/src/php-5.1.6/sapi/cli/php
                              Reason: image not found
                              make[1]: *** [install-pear-installer] Trace/BPT trap
                              make: *** [install-pear] Error 2

                              This is after I remove what bit of php got installed, and then do a make clean, and start over from configure.
                              • 147. Re: Oracle Instant Client for Intel MacOS X
                                akaimale
                                ok,

                                I setup all the variables, and was able to log into
                                the db machine via sqlplus, and run some commands.

                                I then run: make test, from the php src directory

                                Most of the tests pass, some don't:

                                ======================================================
                                ===============
                                FAILED TEST SUMMARY
                                ------------------------------------------------------
                                ---------------
                                Bug #30638 (localeconv returns wrong LC_NUMERIC
                                settings) [tests/lang/bug30638.phpt]
                                bind LONG field [ext/oci8/tests/bind_long.phpt]
                                bug #27303 (OCIBindByName binds numeric PHP values as
                                characters) [ext/oci8/tests/bug27303.phpt]
                                bug #27303 (OCIBindByName binds numeric PHP values as
                                characters) [ext/oci8/tests/bug27303_2.phpt]
                                bug #27303 (OCIBindByName binds numeric PHP values as
                                characters) [ext/oci8/tests/bug27303_4.phpt]
                                collections and negative/too big element indexes
                                [ext/oci8/tests/coll_016.phpt]
                                collections and negative/too big element indexes
                                [ext/oci8/tests/coll_016_func.phpt]
                                oci_connect() without ORACLE_HOME set
                                .
                                .
                                date_sunrise() and date_sunset() functions
                                [ext/standard/tests/general_functions/sunfuncts.phpt]
                                ======================================================
                                ===============
                                I don;t know anything about these PHP tests, so i wouldn't be able to help out here. But Since many tests work you should be having a fairly good php build for development activities.



                                >
                                And when trying to compile, I still get:

                                Installing PHP SAPI module: apache2handler
                                /usr/local/apache/build/instdso.sh
                                SH_LIBTOOL='/usr/share/apr-1/build-1/libtool'
                                libs/libphp5.so /usr/local/apache/modules
                                /usr/share/apr-1/build-1/libtool --mode=install cp
                                libs/libphp5.so /usr/local/apache/modules/
                                cp libs/libphp5.so
                                /usr/local/apache/modules/libphp5.so
                                Warning! dlname not found in
                                /usr/local/apache/modules/libphp5.so.
                                Assuming installing a .so rather than a libtool
                                archive.
                                chmod 755 /usr/local/apache/modules/libphp5.so
                                [activating module `php5' in
                                /usr/local/apache/conf/httpd.conf]
                                Installing PHP CLI binary:
                                /usr/local/php/bin/
                                ing PHP CLI man page: /usr/local/php/man/man1/
                                Installing build environment:
                                /usr/local/php/lib/php/build/
                                alling header files:
                                /usr/local/php/include/php/
                                g helper programs: /usr/local/php/bin/
                                program: phpize
                                program: php-config
                                Installing man pages:
                                /usr/local/php/man/man1/
                                ze.1
                                page: php-config.1
                                stalling PEAR environment:
                                /usr/local/php/lib/php/
                                Library not loaded:
                                /scratch/plebld/208/rdbms/lib/libclntsh.dylib.10.1
                                Referenced from:
                                /Users/me/src/php-5.1.6/sapi/cli/php
                                Reason: image not found
                                ake[1]: *** [install-pear-installer] Trace/BPT trap
                                make: *** [install-pear] Error 2

                                This is after I remove what bit of php got installed,
                                and then do a make clean, and start over from
                                configure.
                                This is happening either because DYLD_LIBRARY_PATH is not proper at the time you execute make install OR because the 'make install' itself is not passing DYLD_LIBRARY_PATH to the subshells it is spawning


                                if you use sudo or some other equivalent programs to run the 'make install' as root, probably you want to make sure DYLD_LIBRARY_PATH is set in that env too. I would advice you to do a sudo bash; export DYLD_LIBRARY_PATH=<instant dir>;make install
                                • 148. Re: Oracle Instant Client for Intel MacOS X
                                  636163
                                  >
                                  This is happening either because DYLD_LIBRARY_PATH is
                                  not proper at the time you execute make install OR
                                  because the 'make install' itself is not passing
                                  DYLD_LIBRARY_PATH to the subshells it is spawning


                                  if you use sudo or some other equivalent programs to
                                  run the 'make install' as root, probably you want to
                                  make sure DYLD_LIBRARY_PATH is set in that env too. I
                                  would advice you to do a sudo bash; export
                                  DYLD_LIBRARY_PATH=<instant dir>;make install
                                  ahh... sudo... I am not used to using it, should have realized it wasn't carrying over the environment.

                                  Anyways, that was my issue! Thanks for all your help!
                                  • 149. Re: Oracle Instant Client for Intel MacOS X
                                    636021
                                    dear akaimale,

                                    I have set all of the environment variables that you suggested, but now I get the error:

                                    001+ Warning: ocilogon(): ORA-01017: invalid username/password; logon denied in /Users/username/Downloads/php-5.2.6RC5/ext/oci8/tests/connect.inc on line 17

                                    I am able to login successfully with sqlplus from the command line. I even have an alias calling the same variables when i login with sqlplus, but for some reason the tests still have a problem connecting.

                                    Message was edited by:
                                    user633018