PHP ON THE ORACLE

I am trying connection with the Oracle 9i, and is presented the error below:
Log apache
[Sat Aug 26 12:23:38 2006] [notice] Apache/2.2.3 (Win32) PHP/5.1.5 configured -- resuming normal operations
[Sat Aug 26 12:23:38 2006] [notice] Server built: Jul 27 2006 16:49:49
[Sat Aug 26 12:23:38 2006] [notice] Parent: Created child process 244
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\\php\\ext\\php_oci8.dll' - N\xe3o foi poss\xedvel encontrar o procedimento especificado.\r\n in Unknown on line 0
[Sat Aug 26 12:23:46 2006] [notice] Child 244: Child process is running
[Sat Aug 26 12:23:46 2006] [notice] Child 244: Acquired the start mutex.
[Sat Aug 26 12:23:46 2006] [notice] Child 244: Starting 250 worker threads.
[Sat Aug 26 12:23:46 2006] [notice] Child 244: Starting thread to listen on port 80.
[Sat Aug 26 12:55:34 2006] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function OCILogon() in C:\\Arquivos de programas\\Apache Software Foundation\\Apache2.2\\htdocs\\PHP\\file.php on line 8
Test connection PHP
<?php
* Created on 26/08/2006
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
$conn = OCILogon("system", "system", "//192.168.182.130/MANFRONX");
$query = 'select * from teste';
$stid = OCIParse($conn, $query);
OCIExecute($stid, OCI_DEFAULT);
while ($succ = OCIFetchInto($stid, $row)) {
foreach ($row as $item) {
echo $item." ";
echo "<br>\n";
OCILogoff($conn);
?>
The file php_oci8.dll exist in the C:\php\ext
On the php.ini, this configured for oracle as well as mysql, as below:
extension=php_mysql.dll
extension=php_oci8.dll
I obtain to carry through a connection with the MySql normally.
I am trying to conect in server Oracle 9i windows 2003.
configuration of the my computer:
Windows XP SP2
Apache 2.2.3
PHP Version 5.1.6
Client Oracle 9 installed and connecting in the server oracle it saw SQLPlus.
Any help would be appreciated. Thanks

1)the variables:
ORACLE_HOME=C:\ORACLE\ORA92
NLS_LANG=BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1
2)I installed client 10, none of them functioned
3)the libraries php_oci8, none of them functioned
The problem persists

Similar Messages

  • Can not compile php with "-with-oracle=/usr/local/oracle"

    I work on Linux engine with a x86_64 architecture and use Oracle 10g 10.2.0.1 client for x86_64 linux
    so - when i try to compile php with the oracle argument (-with-oracle=/usr/local/oracle) i get everytime the same error:
    checking Oracle version... configure: error: Oracle needed libraries not found
    I think, maybe i have a problem because configure not found my "64 bit libraries"...
    Can someone help me? I am realy helpless...
    thx

    Did you really want the obsolete "oracle" driver - why not use --with-oci8?
    The user comments in http://www.php.net/oci8 have some good info on 64bit configuration.

  • Oracle AS 10.1.3.3 - why is XML disabled in the Oracle built PHP version?

    I have just upgraded Oracle AS version 10.1.3.0.0 to 10.1.3.3. This includes an upgrade of PHP from 4.3.3 to 5.1.2.
    Looking at the phpinfo() output I notice that pretty much all XML functionality is disabled:-
    disable-libxml' 'disable-dom' '--disable-simplexml' '--disable-xml' '--disable-xmlreader' '--disable-xmlwriter'
    Why is this the case?
    I also notice that Pear is disabled. Very very disappointing.

    I noticed this a week or so ago. Perhaps you should post it again on the Oracle AS forum, they probably know more about their product?

  • Using the Auth pear package with php 4 and oracle

    Hi all.
    I was wondering if anybody out there has had any success (or else) using the Auth Pear package with php 4 and Oracle.
    I'm trying to do just that but can't get it to work.
    I've found lots of examples on the web for mysql but none for oracle...
    Feedback on your experiences with this would be most appreciated.
    Thanks in advance.
    Rob

    Hi cj.
    Thanks for your advice. I came across those documents but discarded them as they didn't deal with the Auth pear package I was intending on using. I didn't want to look at other alternatives as the focus of my project was primarily on migrating existing data from a mysql setup to an oracle setup. And quickly.
    I hadn't found any documentation out there on using Auth with Oracle. All examples available on the web were mysql specific.
    I eventually got round to gutting the code from the package and finding the fix to my problem.
    Just for info, Auth expects by default an auth table containing two fields username and password. That's lowercase table and field names.
    If the table name or field names to be used differ from these then they must be explicitly defined when calling Auth. Doing so resolved my problem.
    My mysql db had all lowercase naming, while my oracle db has all uppercase naming throughout.
    It is important to note that the Auth package uses the table and field names quoted, thus referring to the table and fields in a case sensitive way.
    So for an uppercase table and fields setup the call has to be :
    $options = array(
        'dsn' => "$dsn_for_my_oracledb",
        'table' => 'AUTH',
        'usernamecol' => 'USERNAME',
        'passwordcol' => 'PASSWORD',
        'db_fields' => '*',
    $a = new Auth("DB", $options , "loginFunction");I hope this helps anybody trying to use this package with oracle. It worked great for me.
    Pear Auth package documentation:
    http://www.pear.php.net/manual/en/package.authentication.auth.intro.php
    Regards,
    Robert

  • PHP 5.0.5 CLI: Am I able to set the Oracle home directory at runtime?

    I have two versions of Oracle installed on a SUN Solaris server:
    /opt/app/oracle/product/8.1.7
    /opt/app/oracle/product/9.2.0
    Am I able to set the Oracle home directory at runtime using PHP CLI?
    Thanks,

    The real answer is it depends how PHP loads Oracle. If the loading
    occurs when PHP starts and before your script executes then you will
    start to see problems. This could be as minor as missing error
    message text or it could be more subtle. In general set the Oracle
    environment before starting PHP.
    What about creating your scripts like:
    #!/bin/sh
    export ORACLE_HOME=/opt/app/oracle/product/9.2.0
    php ...-- cj

  • Convert php script to oracle procedure

    To all please help me... I wanna convert php script to oracle procedure..and the script is (exp)..
    <?php
    include("../config/koneksi.php");
    $customer=$_POST['customer'];
    $tanggal1=$_POST['theDate1'];
    $tanggal2=$_POST['theDate2'];
    $no_bulan=substr($tanggal1,0,2);
    $bulan_sajah= (substr($no_bulan,0,1)=='0')? substr($no_bulan,1,1) : $no_bulan;          
    $tahun_sajah=substr($tanggal1,3,4);
    $blnkmrn=(int)$bulan_sajah;
    $thnkmrn=(int)$tahun_sajah;
    if ($blnkmrn==1) {
         $bulan_lalu=12;
         $tahun_lalu=$thnkmrn-1;}
    else {
         $bulan_lalu=$blnkmrn-1;
         $tahun_lalu=$thnkmrn;
    $bulanlalu=strval($bulan_lalu);
    $tahunlalu=strval($tahun_lalu);
    $sql = "select nip_nas from edo_customer_master_dives where standard_name='$customer'";
         $stm = ociparse($conn,$sql);
         ociexecute($stm);
         ocifetch($stm);
         $data=ociresult($stm,1);
         $sql12 = "select PRODUCT_LINE_ID,sum(REVENUE)
    from PA_FACT_REV_BILLED_CC
    where nip_nas='$data' and year_id='$tahun_sajah' and month_id='$bulan_sajah' group by PRODUCT_LINE_ID";
         $stm12 = ociparse($conn,$sql12);
         ociexecute($stm12);
         $total_revenue=0;
         $i="0";
    while (ocifetch($stm12)){
         $rev_items=ociresult($stm12,1);
         $revenue=ociresult($stm12,2);
         $sql2 = "select * from PA_FACT_REV_BILLED_CC
    where nip_nas='$data' and PRODUCT_LINE_ID='$rev_items'";
         $stm2 = ociparse($conn,$sql2);
         ociexecute($stm2);
         ocifetch($stm2);
    $tahun=ociresult($stm2,1);
    $bulan=ociresult($stm2,2);
    $nipnas=ociresult($stm2,3);
    $prod_line=ociresult($stm2,4);
    $rev_item=ociresult($stm2,5);
    //$revenue=ociresult($stm2,6);
    $query1 = "select standard_name from edo_customer_master_dives where nip_nas='$nipnas'";
         $st1 = ociparse($conn,$query1);
         ociexecute($st1);
         ocifetch($st1);
         $nama_cust=ociresult($st1,1);
         $query2 = "select prod_line_lname from parameter.p_prod_line@dwhnas where prod_line_id='$prod_line'";
         $st2 = ociparse($conn,$query2);
         ociexecute($st2);
         ocifetch($st2);
         $nama_prod_line=ociresult($st2,1);
         $query3 = "select REV_TYPE_LNAME from parameter.p_rev_type@dwhnas where REV_TYPE_ID='$rev_item'";
         $st3 = ociparse($conn,$query3);
         ociexecute($st3);
         ocifetch($st3);
         $nama_rev_item=ociresult($st3,1);
         $query4="select sum(total_usage) from PA_FACT_TRAFFIC_CC where PRODUCT_LINE_ID='$prod_line' and nip_nas='$nipnas' and year_id='$tahun_sajah' and month_id='$bulan_sajah' group by PRODUCT_LINE_ID";
         $st4 = ociparse($conn,$query4);
         ociexecute($st4);
         ocifetch($st4);
         $total_usage=ociresult($st4,1);
         $total=$revenue + $total_usage;
         echo $tahun." ".$bulan." ".$nama_cust." ".$nama_prod_line." ".$nama_rev_item." ".$revenue." ".$total_usage." ".$total."<br>";
         $total_revenue=$total_revenue+$total;
    $i++;
    echo $total_revenue;
    //cost of product
    $query5="select * from PA_FACT_TRAFFIC_CC where nip_nas='$nipnas' and year_id='$tahunlalu' and month_id='$bulanlalu'";
    $st5 = ociparse($conn,$query5);
         ociexecute($st5);
         $total1=0;
         $total2=0;
         $total3=0;
         $total4=0;
         $total5=0;
    while (ocifetch($st5)){
         $nipnas=ociresult($st5,3);
         $lineid=ociresult($st5,4);
         $itemid=ociresult($st5,5);
         $call=ociresult($st5,6);
         $unit=ociresult($st5,7);
         $query6 = "select prod_line_lname from parameter.p_prod_line@dwhnas where prod_line_id='$lineid'";
         $st6 = ociparse($conn,$query6);
         ociexecute($st6);
         ocifetch($st6);
         $nama_prod_line=ociresult($st6,1);
         $query7 = "select REV_item_LNAME from parameter.p_rev_item@dwhnas where REV_item_ID='$itemid'";
         $st7 = ociparse($conn,$query7);
         ociexecute($st7);
         ocifetch($st7);
         $nama_rev_item=ociresult($st7,1);
    $query8 = "select * from cost_of_product where prod_line_lname='$nama_prod_line' and REV_item_LNAME='$nama_rev_item' and end_date is null";
         $st8 = ociparse($conn,$query8);
         ociexecute($st8);
         ocifetch($st8);
         $lineid_cost=ociresult($st8,1);
         $itemid_cost=ociresult($st8,2);
         $satuan=ociresult($st8,5);
         $nilai=ociresult($st8,7);
         if (strtoupper($satuan)=='MENIT') $total1=$total1+(($unit/60)*$nilai);
         if (strtoupper($satuan)=='KBPS') $total2=$total2+($unit*$nilai);
         if (strtoupper($satuan)=='SMS') $total3=$total3+($call*$nilai);
         if (strtoupper($satuan)=='SSL') $total4=$total4+($call*$nilai);
         if (strtoupper($satuan)=='SST') $total5=$total5+($call*$nilai);
    $total_cost_pots=$total1+$total2+$total3+$total4+$total5;
    echo $total_cost_pots;
    ?>
    this script just for exp.

    Please convert step by step. for example
    (1) remove inverted quotation mark ( ` )
    (2) modify constraints syntax (PRIMARY KEY,UNIQUE KEY, KEY etc.) to [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/clauses002.htm#g1053592]Oracle constraints.
    (3) modify some datatype to [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i45441]Oracle datatype
    (4) think how to convert auto_increment ([url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6015.htm#i2067093]Sequence, [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#i2235611]Beffore Trigger etc. on Oracle)
    http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_packages.htm#sthref864
    http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm

  • PHP connection to Oracle basic question.

    Forgive me if I am missing a very basic piece of knowledge here.
    I have a small local web server I run with Apache 2.2.3 and PHP 5.1.6.
    I am working on a project that uses Oracle tables located on the corporate network servers.
    These tables are normally maintained by the IT department using TOAD. I'd like for the business process 'owners' to be able to maintain the tables themselves - but the company has limited TOAD licensing and some of the dependencies between tables are not readily apparent (especially to a non-IT person).
    Therefore I am trying to develop a simple web app to allow table updates, using PHP to connect to the Oracle tables. The idea is I'll put the app and web server on a USB stick for the designated business person to use. (yeah, I know - seems crazy, but the paperwork to get this all into a true 'production' system is impossible, and I really don't want to have to maintain these tables myself for the rest of my working life)
    I've got the basics of the app working through some MySQL tables, now I just need to know how to connect to the 'real' Oracle tables.
    Here's what I've gathered from my reading:
    I need to download Instant Client and install to my 'server' (on my USB stick)
    I need to change PHP.ini to enable the extension for php_oci8.dll
    I need to set some environment variables....and here is where I am lost.
    Are these environment variables on my web server?
    I am running my USB web server on a Windows XP system (as will the business users). But it doesn't make sense to me to set my PC's environment variables, because then I'd need to worry about ever PC the USB stick got used on.
    Could someone clear this up for me? I am sure I am just missing something very basic.
    Oh, and is there anything else I'm missing?
    Thanks for any help!
    mary

    Get it working on a full machine first, and then move to using the USB stick. Refer to Underground PHP and Oracle Manual for standard installation information.
    PHP/Apache will need to be able to find the Oracle Instant Client libraries. Normally on WIndows this is done with the PATH environment variable on the machine running the web server.
    -- cj
    PS your IT department might like the free SQL Developer tool from Oracle instead of TOAD.

  • How to store image in the oracle database 10.2. using File Maker 10.

    Hi.,
    I want to store image, media file in the oracle database using File Maker as a front end.
    I connect Oracle using odbc from file maker. There are table and in that table there a column "pict" of blob type. but this column is not showing in the file maker.
    2. Here I can not change the data type of any column.
    Now how to store images in the oracle table using odbc or any other tool.
    Regards,
    Shyam

    I wrote an example for my students, you can find it here. It's using PHP as the front end but all you need to do is know how and leverage the stored procedures. All code is downloadable in zip files from the blog.
    http://blog.mclaughlinsoftware.com/php-programming/oracle-lob-processing/

  • PHP and remote Oracle DB

    Does anyone know what is needed to connect PHP to a remote Oracle 10g DB? I have followed the steps at http://www.oracle.com/technology/pub/notes/technote_php_instant.html but and a little confused because I am not the Oracle guy.
    They speak of Oracle 10g's Easy Connect syntax and use a PHP variable $c = OCILogon('hr', 'hr_password', '//mymachine.mydomain/MYDB');. Now is there something on the Oracle DB side that allows this connection syntax? Is there anything on the DB side that I have to enable to allow this remote connection?
    I've used MySQL and PHP but having no knowledge of Oracle makes it hard for trial and error.
    I cant seem to find a simple answer (or it may be I dont understand it) on what is needed for a remote DB connection without them going into other avenues that involving tnsnames.ora or Oracle client environment variables.
    I have PHP 5, Apache 2, and the Instant client on a Windows 2000 Pro machine, and a remote Red Hat AS 4 Oracle 10g Database.
    Any help to lead me on the right path will be appreciated.

    You probably don't have to do anything at the DB end.
    Grab 10g instant client for your platform and build php with oci8 support.
    In your php script you will only have to enter the "Easy Connect URL" for the database.
    Let's say your oracle DB is running on a machine called alpha.com and the SID of the DB is FOO and the listener port is 1521. Then the easy connect URL is
    //alpha.com:1521/FOO
    You must already know the service name/SID of your DB.
    The "Easy Connect" naming automatically changes the "easy connect url" to the correct TNSNAMES format.
    (TNSNAME is the standard way of telling the OCI client the complete location details of the DB).

  • PHP 5 and ORacle 9i Client?

    We would like to install PHP 5 on an windows 2003 and IIS 6 machine.
    Currently we have the oracle 9i client installed to access our 9i databases.
    Do we have to install the 10G client?
    Can anyone tell us how this will affect the 9i client install?
    Thanks!

    Do we have to install the 10G client?No, you could use 9i client.

  • Are there different php functions for Oracle 8 and 9?

    Hi!
    Are there different php functions for Oracle 8 and 9?
    Thanks for your answer!

    You can use the oci8* functions for Oracle 8, 9 and 10.
    It is the most recent PHP interface to Oracle, and uses Oracle's most recent
    API.
    The name oci8 comes from the version number of Oracle - version 8 - when
    Oracle introduced a new C API. It succeeded the original OCI and got the
    common name OCI8. The original OCI now has the common name of OCI7.
    -- CJ

  • Is it possible to work with PHP pages in Oracle ERP R12 and how to set up ?

    Hi,
    Is it possible to work with PHP pages in Oracle ERP R12 and how to set up ?
    Regards
    Nandhakumar P

    Hi Nandhakumar,
    To be able to access any Oracle database using PHP you require the following:
    A server with Apache 2+  (Unix, windows etc)
    PHP enabled using OCI8
    tnsnames.ora
    Oracle instant client and associated libraries
    This gives you direct access into oracle database. As for E-Business, you will compromise the security and safty of of R12 by going in through php. Oracle is not likely to support it either.
    I have got a apache/php/Oracle XE working on a test environment and Ithe performance is not a big issue. If you must I would hughly recommend Oracle Linux for quality and security.

  • Portal development with open source and without any of the Oracle products

    Hi would like to know whether is there is any portal framework (pure java) available to develop portal application where I can integrate JSF, RICHFACES, GWT and .NET applications. I dont want to use any of the oracle products. Please help

    You come to an Oracle specific forum and ask whether or not you someone can recommend you a portal product without needing oracle technology...
    Sorry but that does not exist because java is also oracle so if you want a portal without wanting to use oracle than you will have to go for .net or php or something like that because java is oracle...
    Don't you think it's a bit odd asking such a question on the official Oracle forums? It's like going into a BMW garage and asking if you can have a free car that has nothing of the BMW technology inside...
    oh wait... 1 April, damn...
    Edited by: Yannick Ongena on Apr 1, 2011 10:46 AM

  • I use Apache in Oracle 9i DB. I keep php in C:\oracle\ora92\Apache\Apache\h

    I use Apache in Oracle 9i DB. I keep php in C:\oracle\ora92\Apache\Apache\htdocs. Why I can't run php. I must use driver, doesn't me?.
    Thank you!
    Sorry, I'm not well in English.

    Have you installed the php program into Oracle's Apache?
    There are some notes on this at:
    http://otn.oracle.com/products/ias/ohs/htdocs/php_instructions_for_ohs.htm
    What error are you getting?
    -- CJ

  • Recompiling PHP to add Oracle extensions

    Windows 2000 SP2|Oracle 9.2|PHP 5.2.4
    I have tried to install php_oci8.dll and php_oracle.dll.
    I added these lines to the php.ini file
    extension=php_oci8.dll;
    extensoin=php_oracle.dll
    I downloaded the dll files from PECL
    When I run the php file it displays everything up until it gets to the ociconnect then displays nothing after that. no errors.
    I read somewhere to run php -v in my command prompt and this is what I got.
    Unable to load dynamic library './php_oci8.dll'
    The specified module could not be fonud. I made sure that the dlls are in the c:\php folder. I tried putting the oci8.dll after the oracle.dll extension and that did not work. So Im installing more oracle client things to see if that works.

    okay I have 5.2.4 running again and I have
    a if statement and it basically says if connection is good say good and not good say no good and I get a no good from it
    Under phpfinfo() I have a oci8 sectin that I did not have before here's the setting is has.
    OCI8 Support enabled
    Version 1.2.4
    Revision $Revision: 1.269.2.16.2.38 $
    Active Persistent Connections 0
    Active Connections 0
    Temporary Lob support enabled
    Collections support enabled
    Directive Local Value Master Value
    oci8.default_prefetch 10 10
    oci8.max_persistent -1 -1
    oci8.old_oci_close_semantics 0 0
    oci8.persistent_timeout -1 -1
    oci8.ping_interval 60 60
    oci8.privileged_connect Off Off
    oci8.statement_cache_size 20 20
    and the ODBC has these
    ODBC Support enabled
    Active Persistent Links 0
    Active Links 0
    ODBC library Win32
    Directive Local Value Master Value
    odbc.allow_persistent On On
    odbc.check_persistent On On
    odbc.default_db no value no value
    odbc.default_pw no value no value
    odbc.default_user no value no value
    odbc.defaultbinmode return as is return as is
    odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
    odbc.max_links Unlimited Unlimited
    odbc.max_persistent Unlimited Unlimited
    I am working on trying and install a Oracle ODBC Driver since there does not seem to be one installed.

Maybe you are looking for