Apache, PHP, and Oracle 11G

Hi,
I have an 11G RAC Setup, and a separate application server that runs php that is presently connecting to MySQL Servers.
I just configured OCI8 in my application server and can see that my configurations are correct using phpinfo().
iam using this code to connect to my RAC 11G:
<?php
if(!$conn = oci_connect('sys', 'opensesame','callbox.oracle'))
$err = oci_error();
trigger_error('Could Not Establish a Connection:'.$err['message'], E_USER_ERROR);
?>
but i get this error:
Warning: oci_connect() [function.oci-connect]: ORA-12154: TNS:could not resolve the connect identifier specified in /var/www/html/oraconn.php on line 6
here's tnsnames.ora in my RAC, using sqlplus via command line works perfectly fine in either nodes of the rac.
LISTENERS_CALLBOX =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = node01-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = node02-vip)(PORT = 1521))
CALLBOX2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node02-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = callbox.oracle)
(INSTANCE_NAME = callbox2)
CALLBOX1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node01-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = callbox.oracle)
(INSTANCE_NAME = callbox1)
CALLBOX =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node01-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = node02-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = callbox.oracle)
am I missing something?

i forgot to include that the tutorial that helped me configure the OCI8 for PHP suggests that i need to create tnsnames.ora in /etc like this:
SERVICENAME =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip_of_oracle_server)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SID)
(SID = SID)
so I created this:
CALLBOX1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.50.161)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = callbox.oracle)
(INSTANCE_NAME = callbox1)
and did this: export TNS_ADMIN=/etc/
am not sure which part of my tnsnames.ora in the RAC (posted earlier) be copied in /etc/tnsnames.ora in the application server.

Similar Messages

  • PHP  and Oracle Connection

    Please help to connect to oracle through php.
    OS=Windows Server 2008 R2(x64)= is working correctly
    PHP ver=PHP 5.3.2= is working correctly
    ORACLE = Oracle Database 11gR2= is working correctly
    Since the PHP and Oracle on the same machine, I did not install install client(but even with instan client I could not connect to oracle).
    phpinfo does not show oci section
    in Environment section shows these values
    PHPRC = C:\Program Files (x86)\PHP\
    LD_LIBRARY_PATH = D:\ipardb\ora_base\product\11.2.0\orahome\lib
    NLS_LANG = AMERICAN_AMERICA.WE8MSWIN1252
    ORACLE_HOME = D:\ipardb\ora_base\product\11.2.0\orahome
    ORACLE_SID = iparbio
    Path= C:\Program Files (x86)\PHP\;D:\ipardb\ora_base\product\11.2.0\orahome\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MySQL\MySQL Server 5.1\bin;
    TNS_ADMIN= D:\ipardb\ora_base\product\11.2.0\orahome\network\admin
    Loaded Configuration File C:\Program Files (x86)\PHP\php.ini
    uncommented extension in php.ini
    [PHP_OCI8_11G]
    extension=php_oci8_11g.dll
    extension dir is set ok, since other extensions are working properly
    when i execute php.exe, in error_log file appears
    [11-Jun-2010 10:37:34] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_oci8_11g.dll' - %1 is not a valid Win32 application.
    in Unknown on line 0
    Please help me.

    I'm guessing the cause is probably the same as that article: PHP is 32bit but your Oracle libraries are 64bit.
    You will need to install 32bit instant client and make sure they are used for Apache. Does Windows 2008 have sym links? Perhaps the note mentioned at the end of OCI8 IN WINDOWS SERVER 2008 x64 will help. Otherwise try creating some batch scripts to set PATH appropriately before starting Apache.

  • PHP and Oracle DB Job Find

    Hi every ones:
    I'm develop some applications using PHP and Oracle and php give me a lot of advantage. in bouth way of access to a database, OCI and mod plsql.
    How can i say to Oracle THANKS FOR TAKE SERIOUS PHP TECNOLOGY!!!
    I work actually for a company that implement all (Microsoft) and i want find a job with PHP and Oracle programming. Any body have idea that where i need look?

    How can i say to Oracle THANKS FOR TAKE SERIOUS PHP
    TECNOLOGY!!!You just did! Thanks!
    You can help Oracle with scripting languages even more, by completing the questionnaire on scripting langauges at:
    http://www.oracle.com/go/?&Src=1545492&Act=10
    Alison

  • PHP and Oracle Workflow

    Hi everyone,
    Is it possible to use PHP and Oracle Workflow together? I means use PHP to generate user-interface and PHP-OCI8 API to call WFEngine PL/SQL code?

    All of the public documented Workflow Engine PL/SQL APIs and Java APIs enable customers to build their own screens based on workflow, such as building your own specialized worklist.
    Hi everyone,
    Is it possible to use PHP and Oracle Workflow together? I means use PHP to generate user-interface and PHP-OCI8 API to call WFEngine PL/SQL code?

  • Terminology differences between MSSQL 2005/2008 and Oracle 11g

    I'm looking for some articles/books/webinars/blogs which discuss the terminology differences between MSSQL 2005/2008 and Oracle 11g in terms of database concepts. I have found this article http://www.sqlservercentral.com/articles/SQL+Server/67007 so far.
    Thanks.

    Thanks sb92075. Those returned results are almost all related to compare the features/functionalities between MSSQL and Oracle not to distinguish the terminology differences between them.

  • Solaris 10 Sparc and Oracle 11g DB with GG

    Hi,
    I have Solaris system with Solaris 10 Sparc and Oracle 11g DB.
    From the Golden gate download list I downloaded the Golden Gate for Oracle 11g and Solaris 10.
    I tried to Install but I am getting the following error..
    $ ldd ggsci
    ldd: ggsci: ELF machine type: EM_AMD64: is incompatible with system
    Can you please let us know which might be the best golden gate software for us.

    Vinod wrote:
    I have Solaris system with Solaris 10 Sparc and Oracle 11g DB.
    From the Golden gate download list I downloaded the Golden Gate for Oracle 11g and Solaris 10.
    I tried to Install but I am getting the following error..
    $ ldd ggsci
    ldd: ggsci: ELF machine type: EM_AMD64: is incompatible with system
    Can you please let us know which might be the best golden gate software for us.Possibly the solaris x86_64 build was downloaded, instead of the build for solaris sparc? (I think all of our current solaris builds are 64-bit.) It's almost certainly a download / OS mismatch.
    What exact file did you download (what's the file name, before unzipping it), and on your solaris box, what's the result of => "uname -a" and/or "isainfo -v" ...? Just make sure the downloaded file matches what the box is running...
    Btw, not that it matters in this case, but if you were hypothetically running a 32-bit database on a 64-bit OS, you'd need a 32-bit build of GoldenGate. But I don't know why you'd do that. (And that's not the problem here.)

  • Is it possible to install oracle 11g client 32 bit and oracle 11g client 64

    Hi,
    I have Windows 2008 R2 64 Bit Operating Server Installed.
    Other software that are Installed :
    1) Visual Studio 2010 Ultimate 32 Bit.
    2) Microsoft SharePoint server 2010 64 Bit.
    For my development purpose I want to install both oracle 11g client 32 bit and oracle 11g client 64 on the same machine.
    Is it possible to install both 32 and 64 bit instance on the same machine.
    Thanks
    Sambit

    959211 wrote:
    Hi,
    I have Windows 2008 R2 64 Bit Operating Server Installed.
    Other software that are Installed :
    1) Visual Studio 2010 Ultimate 32 Bit.
    2) Microsoft SharePoint server 2010 64 Bit.
    For my development purpose I want to install both oracle 11g client 32 bit and oracle 11g client 64 on the same machine.
    Is it possible to install both 32 and 64 bit instance on the same machine.
    Thanks
    Sambityes, possible; but minor challenge to manage dynamically
    how to ensure that you actually use the flavor you desire?

  • DW9, PHP, and Oracle

    We've just installed DWCS3 and now our Oracle (Oracle Thin
    Client) database connections are no longer available with DWCS3. We
    have just learned that DWCS3 will not work with Phakt and that PHP
    now only supports MySQL. Dropping Phakt without any PHP-to-Oracle
    alternatives is a serious threat to our continued use of Adobe web
    products because TCO / ROI concerns, facing the fact we may have to
    rebuild our websites.
    We need to continue to use PHP to access our Oracle dBs. Does
    anyone have any recomendations for a work-around to this sorry
    behavior?

    All of the public documented Workflow Engine PL/SQL APIs and Java APIs enable customers to build their own screens based on workflow, such as building your own specialized worklist.
    Hi everyone,
    Is it possible to use PHP and Oracle Workflow together? I means use PHP to generate user-interface and PHP-OCI8 API to call WFEngine PL/SQL code?

  • Re: PHP  and Oracle Connection

    Are any specific links that will give me all knowledge regarding php and oracle connection? I am a new babie in this please help me out.

    Hi,
    I'm looking for specialists in PHP, Ajax and Oracle BPEL...
    Pages are: Praxisbörse und Jobs für Arzt und Zahnarzt http://www.praxis-welt.de für Praxisangebote und Jobangebote für Ärzte
    sowie auf http://www.berlin-umzug.net für Umzugsunternehmen aus Berlin für Umzüge, Klaviertransport und Tresortransport in Berlin.
    Any ideas / information / knowhow?
    Regards,
    Mic

  • Trying to get Apache, PHP and MySQL up and running

    I have just bought a new MacBook and I want to set up Apache, PHP and MySQL in order to create a local mirror of a website I have in my 'Sites' folder.
    I fall at the first fence!! To get Apache, I switch web sharing on in System Preferences' and I get the green light. When I click the links for personal website or computer's website I get a "Safari can't connect to the server" message.
    Any ideas what I should do now?

    Stephen Dancer wrote:
    Any ideas what I should do now?
    You will need to make some change to the index file in your Sites directory in order to enable Apache for that directory.
    You will have to enable PHP in the Apache config file at /etc/apache2/httpd.conf
    For MySQL, you will have to install it, and then fix it. You'll want to remove the StartupItem it wants to use and replace it with a launchd file. This discussion has a good roundup of the very latest tricks to get MySQL up and running with the latest security updates.

  • A book for php and oracle

    Hi.I' m working in an application using php for web development and oracle for server database.My question is until now I found many links about this subject also many books about oracle,plsql and many books about php but I can't found a book about php with oracle and plsql.So my question is are there books about php and oracle?
    Thanks in advance thrylos

    I have seen one in my local book shop, not sure about Internet though.

  • OCIEnvNlsCreate() failed: OCI8+PHP+Linux+Oracle 11g

    Hi All,
    I've been struggling with this since 3 days. I'm getting the following error while using oci_connect:
    Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries
    My system configuration:
    PHP : 5.3.3
    OS: Red Hat Enterprise Linux Server release 6.1
    Oracle: 11g
    OCI8: 1.4.9
    My phpInfo() shows that OCI8 is configured with PHP. I did set the LD_LIBRARY_PATH to Instantclient in httpd conf file itself and gave permission 777 just to make sure it's not permission issue. I did not set any ORACLE_HOME because my Oracle database is on a different server.
    Please help!!

    Your post doesn't contain enough detail to identify a cause.
    See Unable load  library '/usr/lib64/php/modules/oci8.so' - libclntsh.so.11.1 It is an example of a post that has good detail.

  • Fedora 17 and Oracle 11g x64

    Hi
    I try to install oracle 11g on my fedora 17 x64(gnome) and then kde. I don't know what i doing wrong.
    I did everything from :
    http://www.oracle-base.com/articles/11g/oracle-db-11gr2-installation-on-fedora-17.php
    and first is that why when i enter my e-mail and click next it ask me for my proxy(connection fail<2>), i checked the option on the bootom and then i insall at the 84% i have fail and i don't know what to do.
    My logs:
    http://sendfile.pl/181468/oraclelogi.zip
    and screen:
    http://www.wrzucaj.com/631252
    thanks for any help

    Hi;
    But this not resolved this problem i thing many people would have the same problem in the futureYou may go wiht this OS and you may also succeded. If you have any issue in future then oracle support will ignore your SR because of you are working on not certfied platform ;)
    Regard
    Helios

  • Create PDF report with APEX and Oracle 11g doesn't work

    Hi everyone,
    I have a problem with the downloading of PDF reports from APEX with Oracle 11g.
    When I try to download a PDF, Acrobat Reader says it can not open the file.
    I have done the same test in an environment with APEX and Oracle 10g and it works perfectly.
    Does anyone know if there is a known bug for version 11g.
    Thank you very much.

    Hi Munky,
    I open the generated file the Notepad++ I can read the next message:
    *<HTML><HEAD><TITLE>500 Internal Server Error</TITLE></HEAD><BODY><H1>500 Internal Server Error</H1>OracleJSP:*
    An error occurred. Consult your application/system administrator for support. Programmers should consider setting the init-param <code>debug_mode</code> to "true" to see the complete exception message.</BODY></HTML>
    I have not idea can I solve the problem.
    Have you got any solution for this problem??
    Thank you so much.
    Victor Muñoz.

  • PDF PRINTING using Apache FOP and Oracle Containers for J2EE

    Hi,
    I am having major confusion about the pdf printing in Oracle XE and Apex 3.1.2.00.02
    It clearly states that this is an available option on the Oracle website.
    According to Apex there are two options for printing report regions.
    Standard - which is free
    Advanced - which uses BI and requires a licence
    Standard requires me to have Apache FOP (which is provided by Oracle in the Apex release) and Oracle Containers for J2EE (OC4J)
    Where my understanding of all this falls down is the part where I am downloading the Oracle Containers for J2EE and the license agreement states this cannot be used in a production system (only as a protptype). Can anyone clarify this? This is surely a required componenet and for the standard report printing which is supposed to be free.
    My problem is that I need to have a database system on a laptop that will go off site for a number of weeks. We need report printing options.
    Can anyone help with this. im desperate.
    Kind regards
    colin mclay

    no not yet with Application Server.
    I have tried to compare the settings to another installation with a separeted oc4j as described in the howto. But at the moment i found no mistakes.
    If i call the url adresse like:
    http://localhost:18101/fop/apex_fop.jsp
    i get:
    500 Internal Server Error
    Servlet error: java.lang.ClassNotFoundException: fop.apex__fop
    I installed it another time with these settings:
    Web Anwendung= .../fop.war (selected war file from apex install directory)
    Anwendungsname= fop
    URL zuordnen= /fop
    I would like to know if its possible to use the fop.war out of apex install directory with the Application server? In the standalone version (as described in howto) it works. But if you install it there you don't need to define an URL.
    Is the URL /fop correct or what do i have to insert there?

Maybe you are looking for

  • Performance problem with WPF Viewer CRVS2010

    Hi, We are using Crystal Reports 2010 and the new WPF Viewer. Last week when we set up a test machine to run our integration tests (several hundred) all report tests failed (about 30 tests) with a timeout exception. The testmachine setup: HP DL 580 G

  • Inbound delivery Idoc to create Batch with Characteristics

    Hi Experts, Need your help... We have the scenario where the inbound delivery in ECC is created by an external Idoc (DESADV). However the batch field is blank. Requirement is to create a batch per line item (as per the number range in ECC) during inb

  • Export speech to text

    I've done a speech-to-text on a clip, and now I want to export the text. I can't find anything in the help or on the forums. Can anyone help?

  • How do I get my windows 7 itunes music to sync to my IOS 5.1.1 ipad 2?

    Olindedg                 I  cant get windows 7 itunes music to sync to ipad 2. I initially used my windows DVD drive to rip a cd to iTunes. How do I put the album on my iPad 2? Thank you very much.

  • How do I open and close a DB ?

    How do I open and close a database ? How do I retrieve values from a database, is it retrieved by using sql statement ? Thank you