PHP 5.1.2,,,OCI8,,,ORA-12546

Hi there,
Thanks to Christopher Jones and his very well document " Installing PHP and the Oracle 10g Instant Client for Linux and Windows " http://www.oracle.com/technology/pub/notes/technote_php_instant.html
I followed the steps mentioned in that article execpt I installed apache 2.2! not 1.3 but every thing went fine and I think I connected successfully to ORACLE database using oci_connect, but once I start my query it gives me the famouse error ORA-12546: permission denied..... despite with the same user and password I can connect successfully and execute the same query using ora_logon from another server. any help will be appreciated.....

Yeah this comes up all the time, permissions error.
As every case is the same, if you havent already done so, check your permissions, restart your machine and try again, if this doesn't work or you have already done this post again.

Similar Messages

  • ORA-12546 When connecting without specifying sid in connect string

    I am currently having a difficult time connecting to an Oracle 9.2.0.4 database running on Red Hat Linux.
    I can successfully connect to this database with sqlplus as oracle whether a sid name is included in the connect string or not. I can also successfully connect to the instance through jdbc with jsp pages. However when I try to connect as root without specifying the sid I get an ORA-12546 TNS: Permission denied. I also receive this error when attempting to connect to the instance through php scripts. Note that root can connect through sqlplus with no problem as long as the sid is included in the connect string. Also note that the oracle user can connect either way.
    I turned on tracing and found that this error is occurring before it even gets to the listener as no log or trace entries are generated when the error occurs.
    Does anyone have any ideas?

    did you set the parameter TWO_TASK ?

  • PHP4: connect to oracle with ORA-12546 error

    I have install the PHP4 + apache 1.3.12 on redhat 6.2, by recompile the apache and php packages.
    Fortunately, the apache can startup. But when I run the program as below:
    PutEnv("ORACLE_HOME=/home/oracle/product/release");
    PutEnv("ORACLE_SID=orcl");
    $a=ocilogon("scott","tiger");
    ocilogoff($a);
    I get a error message:
    Warning: ociopen_server: Error while trying to retrieve text for error ORA-12546 in /usr/local/apache/htdocs/ora.php on line 5
    I checked the system very carefully, I can use "sqlplus scott/tiger@orcl" connect to the database, I can also use the SQLnavigator connect the database from other machine.
    Could any kind people help me to solute this problem.
    Thanks a lot.

    Originally posted by sumit1:
    Sorry for the previous message and try the following...
    $a=ocilogon("scott@orcl","tiger");
    and no need to use putEnv() function.
    Edwin
    email:[email protected]
    OK or try $a=ocilogon("scott","tiger","orcl"); or $a=ocilogon("scott","tiger","address of database server{localhost});

  • Unable to connect to TOAD : ora:-12546 TNS Permission error

    Hi friends
    Kindly help me
    Am Unable to connect to TOAD : ora:-12546 TNS Permission error
    till 2 days before it was connecting.
    Dont know what happened now
    SQL*Plus and Forms 6i are getting connected.
    What can be the issue ?
    Regards
    Dora

    Hi
    ORA-12546: TNS: permission denied
    Cause: User has insufficient privileges to perform the requested operation.
    Action: Acquire necessary privileges and try again.
    Pls check the sites suggest by google
    http://dbmotive.com/oracle_error_codes.php?errcode=12546&type=ORA
    http://www.ironspeed.com/Designer/6.2.1/WebHelp/Part_V/ORA_12546_TNS_permission_denied.htm
    Thanks & Regards
    Srikkanth.M

  • PHP4: connect to oracle wither ORA-12546 error

    I have install the PHP4 + apache 1.3.12 on redhat 6.2, by recompile the apache and php packages.
    Fortunately, the apache can startup. But when I run the program as below:
    PutEnv("ORACLE_HOME=/home/oracle/product/release");
    PutEnv("ORACLE_SID=orcl");
    $a=ocilogon("scott","tiger");
    ocilogoff($a);
    I get a error message:
    Warning: ociopen_server: Error while trying to retrieve text for error ORA-12546 in /usr/local/apache/htdocs/ora.php on line 5
    I checked the system very carefully, I can use "sqlplus scott/tiger@orcl" connect to the database, I can also use the SQLnavigator connect the database from other machine.
    Could any kind people help me to solute this problem.
    Thanks a lot.

    Originally posted by sumit1:
    Sorry for the previous message and try the following...
    $a=ocilogon("scott@orcl","tiger");
    and no need to use putEnv() function.
    Edwin
    email:[email protected]
    OK or try $a=ocilogon("scott","tiger","orcl"); or $a=ocilogon("scott","tiger","address of database server{localhost});

  • Instantclient - oci8 - ORA-12154

    I've read all the relevant threads in the forum and still I am receiving the same error:ORA-12154.
    I am using instantclient (Downloaded from OTN) in Linux.
    I use the /php/DB/oci8.php interface and the object DB_oci8() in order to connect.
    while from the same file.php, where I am trying to connect, I display the environment vars and they seem OK, PHP cannot find the tnsnames.ora and eventually the database I call.
    If I use the whole description copied from the tnsnames, then it is connected!
    WHAT is wrong with that?
    Please help.
    Thanks in advance,
    J.Lagos

    Whereabouts are you setting the Oracle environment variables? Setting them in the PHP script or in httpd.conf apparently doesn't work, you have to set them in the shell before apache is started.
    You need ORACLE_HOME and LD_LIBRARY_PATH set, and possibly TNS_ADMIN if you're using a tnsnames.ora file.
    We've recently had this problem, but setting the variables beforehand fixed it.
    See the troubleshooting faq on PHP and Oracle for more info on this problem:
    http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.html
    Hope it helps!

  • ORA-12546 error during installation of 9.2.0.1 on Windows 2003 Server

    I have encountered an error whilst installing oracle 9.2.0.1 on a Windows 2003 Server. The error appears in the final part of the installation, when the Database Configuration Assistant is performing some work - it reaches the part where it creates the database instance - here we get the "ORA-12546: TNS Permission denied" error - this part of the installation is marked as failed - i can retry it as many times as i want but the same thing happens. If i finish the installation (even though the error has occurred) the oracle installation doesn't really work . I can't open the Database Configuration Assistant and don't really have a sysdba user. However all the services seem to be running fine (even the tns listener)
    I was wondering whether it could be a problem that would be solved with the 9.2.0.3 patch - but this patch assumes that you have performed a proper working installation of 9.2.0.1, so I'm not quite convinced that the problem is related to the oracle version.
    I've read other threads where the problem has been read/write privileges on some files and folders, but this shouldn't be an issue when I'm logged onto the machine as a local administrator.
    The install.log files don't really provide any extra information.

    I have exactly the same problem installing Oracle on a Windows Server 2003 X64 Enterprise Edition. I have Intel Xeon processors (EM64T).
    I tried to install Oracle for 64 bits, but it didn't work. Now I'm trying to install 32 bits version of Oracle, and I get the same error and the same problem, mentioned above.
    Can anyone help us, I can't figure out a way to solve it. I don't know if Oracle for 32 bits is not compatible with that version of Windows, even if it is supposed to be.
    Thanks!!!!

  • Error ORA-12546 installing 10g on Windows XP 64 bit

    when installing ora 10g on my windows xp 64 bit professional
    I get an ORA-12546 error. this happens while setup is creating the default database.
    I get this error also when creating a database instance manually.
    is there a workarounnd for this problem?
    thanks a lot.
    florian

    Has the listener service started successfully in the services applet? Check the event log on the windows to see if there is anything additional for these messages.

  • Backup job failing with error ORA-12546: TNS:permission denied

    Hi All
    This is regarding one backup job running on windows server 2003 failing with below error.. when we are running this job manually that is running fine.. but not running from windows scheduler.
    its 9.2.0.1 and the 32 bit... windows 2003 64 bit
    Recovery Manager: Release 9.2.0.1.0 - Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04005: error from target database:
    ORA-12546: TNS:permission denied
    Please help.
    Edited by: 811427 on Sep 6, 2011 12:36 AM

    I assume you installed Oracle as "Administrator" user. If so, make sure you are running the job from the same user. Optionally open "services.msc" and go to the "ORCL Service" or whatever it may and check "Log on" tab. It should be "logon as" value should be "Local system". If you are using a domain then give credentials accordingly. Make sure you are part of "DBA" group.
    The ORA-12546 TNS:permission denied points to "Insufficient permissions to trace/log files" - check the trace/log destination is writable and requisite permissions are given.

  • ORA-12546 error

    I'm running Oracle 9i on a Windows platform. Using SQL Plus, I have no problem connecting as SYS. But when I try logging in using Oracle Enterprise Manager (OEM), I keep getting the error: ORA-12546: TNS permission denied.
    Any help would be appreciated.

    I have exactly the same problem installing Oracle on a Windows Server 2003 X64 Enterprise Edition. I have Intel Xeon processors (EM64T).
    I tried to install Oracle for 64 bits, but it didn't work. Now I'm trying to install 32 bits version of Oracle, and I get the same error and the same problem, mentioned above.
    Can anyone help us, I can't figure out a way to solve it. I don't know if Oracle for 32 bits is not compatible with that version of Windows, even if it is supposed to be.
    Thanks!!!!

  • ORA-12546: TNS:permission denied

    Hi Friends,
    I have just downloaded Oracle 11.2 XE on my Windows 8.1 X64. I have run the setup.exe and completed the installation.
    Now, when I tried connecting to the db in SQL command line, I am getting the following error:
    ORA-12546: TNS:permission denied
    I have started database as well before getting into command line.
    Could any one help me solving this problem?
    Thanks in advance

    Hi
    Thanks for the response.
    My OS is windows 8.1 (64 bit).  I installed Oracle XE 11.2.
    In my SQL prompt I used connect command.
    SQL> connect SYS/tiger
    ERROR:
    ORA-12546: TNS:permission denied
    and
    SQL> connect
    Enter user-name: SYSTEM
    Enter password:
    ERROR:
    ORA-12546: TNS:permission denied
    I tried user name of the computer, SYSTEM, SYSMAN. And every time I get the same result.

  • Ora-12546 TNS:permisssion denied

    Hi all,
    i am installing oracle 9.2.0.1.0 on windows 2003 server loging as administrator but after software installation complete and DBCA(data base configuration tool ) is in porgress to create starter database i am getting the below error at the time of
    1)copying data files (complete successfully)
    2)initializing database (complete successfully)
    creating and starting oracle (i got below error)
    error ora-12546.TNS : permission denied.
    does anybody face the probelm.quick resonse will be higly appreciated.thanks a lot in advance.

    Check the certification matrix
    http://www.oracle.com/technology/support/metalink/index.html
    HTH
    Srini

  • ORA-12546 on Windows 2003

    Hi,
    I installed Oracle 10g on Windows 2003.
    When it tried to create the database, it gave me the error ORA-12546 TNS:Permission Denied .
    Did anybody face the same problem on windows 2003 SP1?
    Any help is really appreciated.
    Regards,
    Ardalan Houshmand

    I am receiving the same error. I get to in install phase where the Database Cinfoguration Assistant tries to run and I get ora-12546. I am running windows 2003 64 bit, but am installing oracle as a 32 bit since I do not have Itanium and oracle does not have a release for 64 bit xeon. Any suggestion would really help, this new server is replacing an outdated one.

  • PHP 5.2.4 + OCI8 Compile Issues on RHEL4

    Hiya,
    i've been looking around and can't really find anything to help with this issue, i have installed the oracle RPMS:
    [root@proxy2 php-5.2.4]# rpm -qa | grep -i oracle
    oracle-instantclient-basic-11.1.0.1-1
    oracle-instantclient-devel-11.1.0.1-1
    oracle-instantclient-odbc-11.1.0.1-1
    oracle-instantclient-sqlplus-11.1.0.1-1
    the configure line works fine:
    ./configure \
         --with-oci8=$ORACLE_HOME \
         --with-mysql \
         --with-apxs2=/usr/local/apache2/bin/apxs \
         --enable-ftp \
         --with-curl \
         --enable-sockets \
         --with-tidy \
         --enable-sigchild
    yet when attempting to run make a whole load of errors in the line of:
    /source/php-5.2.4/ext/oci8/oci8.c: In function `php_oci_fetch_row':
    /source/php-5.2.4/ext/oci8/oci8.c:1680: error: `z_statement' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1680: error: invalid type argument of `unary *'
    /source/php-5.2.4/ext/oci8/oci8.c:1681: error: invalid operands to binary *
    /source/php-5.2.4/ext/oci8/oci8.c:1682: error: `column' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1683: error: `ub4' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1683: error: syntax error before "nrows"
    /source/php-5.2.4/ext/oci8/oci8.c:1687: error: `expected_args' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1690: error: `ht' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1695: error: `mode' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1727: error: syntax error before ')' token
    /source/php-5.2.4/ext/oci8/oci8.c:1727: error: `return_value' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1729: error: `nrows' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1735: error: request for member `ncolumns' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c:1747: error: `element' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1749: error: syntax error before ')' token
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `->'
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: `orig_ptr' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: syntax error before ')' token
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `unary *'
    /source/php-5.2.4/ext/oci8/oci8.c:1776: warning: passing arg 1 of `_zval_copy_ctor' makes pointer from integer without a cast
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `->'
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `->'
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `->'
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `->'
    /source/php-5.2.4/ext/oci8/oci8.c:1776: warning: passing arg 1 of `_zval_dtor' makes pointer from integer without a cast
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `unary *'
    /source/php-5.2.4/ext/oci8/oci8.c:1776: warning: passing arg 1 of `_zval_copy_ctor' makes pointer from integer without a cast
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `->'
    /source/php-5.2.4/ext/oci8/oci8.c:1776: error: invalid type argument of `->'
    /source/php-5.2.4/ext/oci8/oci8.c:1778: error: request for member `ncolumns' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c: In function `php_oci_persistent_helper':
    /source/php-5.2.4/ext/oci8/oci8.c:1788: error: `connection' undeclared (first use in this function)
    /source/php-5.2.4/ext/oci8/oci8.c:1793: error: syntax error before ')' token
    /source/php-5.2.4/ext/oci8/oci8.c:1796: error: request for member `in_call' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c:1822: error: request for member `persistent_timeout' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c:1823: error: request for member `persistent_timeout' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c:1826: error: request for member `ping_interval' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c:1827: error: request for member `ping_interval' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c:1835: error: request for member `persistent_timeout' in something not a structure or union
    make: *** [ext/oci8/oci8.lo] Error 1
    (there is more before that!)
    Any clues on what might be the cause of this? i have also attempted getting the latest PHP oci8 package from http://pecl.php.net/package/oci8 but alas no luck.
    Can anyone enlighten me on how to correct this? Thanks in advance!
    Regards,
    Shadi Almosri

    More Debugging information incase it helps, this is the process i am taking to run the compile.
    [root@proxy2 php-5.2.4]# make distclean
    find . -name \*.gcno -o -name \*.gcda | xargs rm -f
    find . -name \*.lo -o -name \*.o | xargs rm -f
    find . -name \*.la -o -name \*.a | xargs rm -f
    find . -name \*.so | xargs rm -f
    find . -name .libs -a -type d|xargs rm -rf
    rm -f libphp5.la sapi/cli/php libphp5.la modules/* libs/*
    rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp5.module buildmk.stamp
    grep -E define'.*include/php' /source/php-5.2.4/configure | /bin/sed 's/.*>//'|xargs rm -f
    find . -name Makefile | xargs rm -f
    [root@proxy2 php-5.2.4]# ./buildconf --force
    Forcing buildconf
    using default Zend directory
    buildconf: checking installation...
    buildconf: autoconf version 2.59 (ok)
    buildconf: Your version of autoconf likely contains buggy cache code.
    Running cvsclean for you.
    To avoid this, install autoconf-2.13.
    rebuilding configure
    aclocal.m4:2141: PHP_PROG_LEX is expanded from...
    [root@proxy2 php-5.2.4]# export ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client
    [root@proxy2 php-5.2.4]# export LD_LIBRARY_PATH=/usr/lib/oracle/11.1.0.1/client/lib
    [root@proxy2 php-5.2.4]# ./configure \
    --with-oci8=$ORACLE_HOME \
    --with-mysql \
    --with-apxs2=/usr/local/apache2/bin/apxs \
    --enable-ftp \
    --with-curl \
    --enable-sockets \
    --with-tidy \
    --enable-sigchildconfigure completes with no errors with these outputs related to OCI:
    checking for Oracle (OCI8) support... yes
    checking PHP version... 5.2.4, ok
    checking Oracle Install Directory... /usr/lib/oracle/11.1.0.1/client
    checking if we're on a 64-bit platform... no
    checking OCI8 libraries dir... lib
    checking Oracle version... 11.1
    checking for OCILobIsTemporary in -lclntsh... yes
    checking for OCICollAssign in -lclntsh... yes
    [root@proxy2 php-5.2.4]# make
    Then the errors start from here:
    /bin/sh /source/php-5.2.4/libtool silent preserve-dup-deps --mode=compile gcc  -Iext/oci8/ -I/source/php-5.2.4/ext/oci8/ -DPHP_ATOM_INC -I/source/php-5.2.4/include -I/source/php-5.2.4/main -I/source/php-5.2.4 -I/usr/include/libxml2 -I/source/php-5.2.4/ext/date/lib -I/usr/include/mysql -I/source/php-5.2.4/TSRM -I/source/php-5.2.4/Zend    -I/usr/include -g -O2  -prefer-non-pic -c /source/php-5.2.4/ext/oci8/oci8.c -o ext/oci8/oci8.lo
    In file included from /source/php-5.2.4/ext/oci8/oci8.c:50:
    /source/php-5.2.4/ext/oci8/php_oci8_int.h:56:17: oci.h: No such file or directory
    In file included from /source/php-5.2.4/ext/oci8/oci8.c:50:
    /source/php-5.2.4/ext/oci8/php_oci8_int.h:101: error: syntax error before "OCIEnv"
    /source/php-5.2.4/ext/oci8/php_oci8_int.h:101: warning: no semicolon at end of struct or union
    /source/php-5.2.4/ext/oci8/oci8.c:1826: error: request for member `ping_interval' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c:1827: error: request for member `ping_interval' in something not a structure or union
    /source/php-5.2.4/ext/oci8/oci8.c:1835: error: request for member `persistent_timeout' in something not a structure or union
    make: *** [ext/oci8/oci8.lo] Error 1
    [root@proxy2 php-5.2.4]#

  • 11g  ora-12546 :  tns permission denied

    I have oracle 11g - 11.1.0.7.0 on AIX 6.1
    The problem i have is connecting to sqlplus
    The oracle user can connect but other users outside of oracle or dba group cannot connect unless they go through the listener.
    EG: user/password@database works fine,
    but if i try just sqlplus user/password i have the error 12546 : tns permission denied.
    I have chmod 777 the oracle bin directory and the sqlplus executable but still no joy,
    any ideas anyone, dont seem to be able to find anyone else with the same problem.

    "I have chmod 777 the oracle bin directory"
    No, this is a big security hole. Only the user running the database should be in the DBA group, and should be able to modify files from the database ORACLE_HOME/bin.
    If other users need to login to the unix server (bad idea) and connect to the database, then it is best to create a new group (e.g DEV instead of DBA) and install an Oracle client for them to use. They should connect to the database using TWO_TASK instead of ORACLE_SID.

Maybe you are looking for

  • HT201077 Photo Stream

    I copied old photos of my "photos - camera roll album" to a new folder of photo stream in my iPhone. However, I can't see this folder in "my photo stream" on my PC. Why? What can I do to fix this?

  • Configuration doc for Report painter

    Hi Friends, Can any one send configuration document for Report painter? [email protected] Regards Babu

  • Best practices for TOC, versus PROJ title, filename

    I am seeking "best practice" help from the forum. Say a TOC is to have numbers as part of the organization, 1,2,3...and topics will be sub-numbered (as in 1.1, 1.2.1, 1.2.2, etc). I am not aware of any way to automatically manage this, they must be e

  • Get previous version of a package

    Hi, I recreated a package mistakenly, does it exist a method to get a previous version of the package? Thanks, bye bye.

  • SmartView working with Essbase: Preserve Formulas

    Hi everybody, has anybody achieved to preserve formulas in the same worksheet as one connected to Essbase using Smart View? The documentation says that "The "Preserve Formula on POV Change" option only applies to data forms in Hyperion Enterprise, Pl