Oci8 and $Oracle_Home

Hey all,
I've been trying to get Oracle-XE 10G working with PHP on Ubuntu 10.04 (Not server) which is prooving to be quite an experience; I'll try to summerise everything I've done and what I'm having problems with below. Any pointers at all would be great - I feel like I've read everything there is to read about oci8 but I'm obviously missing something.
Nb: I already have Apache2 and PHP installed both of which work well.
Installed Oracle-XE 10G and instant client. Sqlplus works fine.
Installed Pear and PHP5-dev.
Installed Oci8 via Pecl with no errors; phpinfo shows the extension and php --ri oci8 shows that its enabled.
This is where I'm having a problem. I'm running oci_connect('user', 'pass', 'localhost/xe'); and its complaining that I haven't set oracle_home or ld_library_path.
I've made a script in /etc/profile.d which contains:
export oracle_home=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
export ld_library_path=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib
I rebooted and the script works, but I still get the same error when I run oci_connect.
I've been trying to get this working for quite a while now, so I'd really appreciate it if someone could tell me what I'm doing wrong / not doing. I'm assuming I need to set the variables somewhere else, but I haven't a clue where since this is the most advanced thing I've ever done with linux.
Cheers,
MIM.

I'm using the same httpd.conf as before, however, I did add the following:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
So it should be loading the php5 module. Is there something else I'm missing in httpd.conf?

Similar Messages

  • Oci8 and oracle thin

    I am using developer 3.0 on the NT server machine, with oracle 8
    First of all when i start my computer one error message raise that is "one of your service is not running please check the event log". I saw the event log that service is oraclestartorc1. who can i start this service. the other oraclelistener service is also give error message in starting.
    so next thing is when i click on the connection UI to make a new connection. I click on the oracle oci8 and use localhost = 127.0.0.1 and protocol = TCP and SID = orcl then error message comes that "ocijdbc8 is not in share path" who can i remove this problem also. I also use BEQ protocol to connect but the error message is same. When i use oracle thin driver then it raise message "could not establish the connection with adapter". Who can i remove this also. when i use the jdbc-odbc bridge it success the connection in test. But it does not show in connection. Who can i get driver for oci8, oci7 or for thin. Simply i want to connect my computer local database. my oracle directory is "orant" please help me thanks..
    null

    Jawada,
    Try the following:
    1. Make sure your ORACLE_HOME directory is in your PATH (JDeveloper needs this so it can find the OCI driver's client-side DLL).
    2. Make sure you have an alias set up for your database in your TNSNAMES.ORA file (usually located in ORACLE_HOME\network\admin). I believe previous posts to your other questions provided instructions for this.
    3. Within JDeveloper, select Tools | IDE Options... from the menu. Choose the Environment Tab, and in the Oracle Home section, choose the name of your Oracle Home or choose Default Home from the Select an Oracle Home list. (this isn't really required unless you have multiple Oracle Home's installed on your machine).
    4. When creating your connection within JDeveloper:
    a. Choose Oracle JDBC OCI-8 from the Select a JDBC Driver list.
    b. Choose Existing TNS Names from the Select a Connection Method list.
    c. Choose the alias for your database from the TNS Service list (this list will not appear until you choose Existing TNS Names from the Connection Method list.
    null

  • Which group should GI_HOME and ORACLE_HOME belong to after installation?

    Hi, I finished installation and creation of database.
    However now I think all the group for GI_HOME belong to grid:oinstall and ORACLE_HOME belong to oracle:oinstall.
    Do I have to change them to dba as group?
    Thanks

    Hi,
    Formerly the database admins set up the oraInventory to dba group. That works but fell outside the standards of Oracle.
    In newer versions the Oracle OUI check if oinstall group is primary group (if not a warning is returned) so during install OUI don't allow you set up manually the oraInventory group, so Installer take the primary group of your OS user.
    When you install Oracle software on the system for the first time, OUI creates the oraInst.loc file. This file identifies the name of the Oracle Inventory group (by default, oinstall), and the path of the Oracle Central Inventory directory.
    By default, if an oraInventory group does not exist, then the installer lists the primary group of the installation owner for the Oracle Grid Infrastructure for a Cluster software as the oraInventory group.
    http://download.oracle.com/docs/cd/E11882_01/install.112/e22489/prelinux.htm#BABDEAIJ
    Before installation, you can set the group as you wish, is only a issue of standards and organization of the environment.
    However after the installation exists an procedure to change it. We can not simply modify using only "chown" utility.
    Regards,
    Levi Pereira

  • Tnslsnr binary in CRS_HOME and ORACLE_HOME

    DB version:11.2.0.2 (2 node RAC)
    I can see that listener binary tnslsnr is present in GRID_HOME and ORACLE_HOME. Which one should I be using?

    Hi,
    per default the listener is configured out of the GI Home - and it is also recommended to use this one (since GI will always have the latest patch in the stack).
    However someone can configure additional listeners from DB Home - though not recommended.
    Regards
    Sebastian

  • OCI8 and ADODB loading image....

    can u kindly check what am i doing wrong? i tried using oci8 and the image is displayed but when i use adodb, my browser(firefox) says "problem loading..." can you give me some example of your code? thanks!
    OCI8
    <?php
    header("content-type: image/JPEG");
    $getId = $_GET['id'];
    $User = "scott";
    $Password = "tiger";
    $db = " (DESCRIPTION =\n";
    $db .= "(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.3)(PORT = 1521))\n";
    $db .= "(CONNECT_DATA = (SID = XE))\n";
    $db .= ")\n";
    $conn = ocilogon($User,$Password,$db);
    $sql = "select signature from approvers where empid='0481'";
    $stmt = OCIParse($conn,$sql);
    if (!OCIExecute($stmt)) { print "execution failed"; exit(); }
    OCIFetchInto($stmt, &$arr,OCI_RETURN_LOBS);
    // Also tried with OCI_ASSOC
    echo ($arr[0]);
    ?>
    in AdoDB
    <?php
    header ('content-type: image/JPEG');
    ini_set ('display_errors', 1);
    error_reporting(E_ALL);
    $getId = $_GET['id'];
    include_once ('adodb.inc.php');
    include_once ('adodb-exceptions.inc.php');
    include_once ($_SERVER['DOCUMENT_ROOT'].'/conf/inc/conf-era.inc.php');
    ini_set ('sendmail_from', MAIL_LOG);
    ini_set ('error_log', ERR_PATH);
    try
         $dsn = 'oci8://'.DB_USERNAME.':'.DB_PASSWORD.'@'.DB_SERVER.'/'.DB_SID;
         $db_Conn = ADONewConnection($dsn);
         $db_Conn->debug = 1;
         $arr = $db_Conn->GetOne("SELECT Signature FROM Approvers WHERE EmpId=:v_EmpId", array('v_EmpId' => $getId));
         #echo ($arr->fields[0]);
         echo ($arr);
    catch (Exception $e)
         echo $e->getMessage();
    ?>
    kindly help me guys! thanks! i can't see what's going on...

    sir, just to give you a hint: as i stated previously, i can display specific column value of my record if my column is approverid but if signature is replace, no nothing displayed...
    <hr />
    (oci8): SELECT ApproverId FROM Approvers WHERE ApproverId=:v_EmpId   <code>[ (v_EmpId=&gt;'0481')  ]</code>
    <hr />
    ADORecordSet_array Object
    [databaseType] => array
    [_array] => Array
    [0] => Array
    [0] => 0481
    [APPROVERID] => 0481
    [_types] =>
    [_colnames] =>
    [_skiprow1] =>
    [_fieldarr] =>
    [canSeek] => 1
    [affectedrows] =>
    [insertid] =>
    [sql] => SELECT ApproverId FROM Approvers WHERE ApproverId=:v_EmpId
    [compat] =>
    [dataProvider] => oci8
    [fields] => Array
    [0] => 0481
    [APPROVERID] => 0481
    [blobSize] => 100
    [EOF] =>
    [emptyTimeStamp] =>  
    [emptyDate] =>  
    [debug] =>
    [timeCreated] => 0
    [bind] =>
    [fetchMode] => 0
    [connection] => ADODB_oci8 Object
    [databaseType] => oci8
    [dataProvider] => oci8
    [replaceQuote] => ''
    [concat_operator] => ||
    [sysDate] => TRUNC(SYSDATE)
    [sysTimeStamp] => SYSDATE
    [metaDatabasesSQL] => SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1
    [_stmt] =>
    [_commit] => 32
    [_initdate] => 1
    [metaTablesSQL] => select table_name,table_type from cat where table_type in ('TABLE','VIEW')
    [metaColumnsSQL] => select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno
    [_bindInputArray] => 1
    [hasGenID] => 1
    [_genIDSQL] => SELECT (%s.nextval) FROM DUAL
    [_genSeqSQL] => CREATE SEQUENCE %s START WITH %s
    [_dropSeqSQL] => DROP SEQUENCE %s
    [hasAffectedRows] => 1
    [random] => abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)
    [noNullStrings] =>
    [connectSID] => 1
    [_bind] =>
    [_hasOCIFetchStatement] => 1
    [_getarray] =>
    [leftOuter] =>
    [session_sharing_force_blob] =>
    [firstrows] => 1
    [selectOffsetAlg1] => 100
    [NLS_DATE_FORMAT] => YYYY-MM-DD
    [useDBDateFormatForTextInput] =>
    [datetime] =>
    [_refLOBs] => Array
    [database] =>
    [host] => (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.7)(PORT=1521))(CONNECT_DATA=(SID=xe)))
    [user] => era
    [password] => 0rclDB3ra
    [debug] => 1
    [maxblobsize] => 262144
    [substr] => substr
    [length] => length
    [upperCase] => upper
    [fmtDate] => 'Y-m-d'
    [fmtTimeStamp] => 'Y-m-d, h:i:s A'
    [true] => 1
    [false] => 0
    [nameQuote] => "
    [charSet] =>
    [uniqueOrderBy] =>
    [emptyDate] =>  
    [emptyTimeStamp] =>  
    [lastInsID] =>
    [hasInsertID] =>
    [hasTop] =>
    [hasLimit] =>
    [readOnly] =>
    [hasMoveFirst] =>
    [hasTransactions] => 1
    [genID] => 0
    [raiseErrorFn] => adodb_throw
    [isoDates] =>
    [cacheSecs] => 3600
    [arrayClass] => ADORecordSet_array
    [numCacheHits] => 0
    [numCacheMisses] => 0
    [pageExecuteCountRows] => 1
    [uniqueSort] =>
    [rightOuter] =>
    [ansiOuter] =>
    [autoRollback] =>
    [poorAffectedRows] =>
    [fnExecute] =>
    [fnCacheExecute] =>
    [blobEncodeType] =>
    [rsPrefix] => ADORecordSet_ext_
    [autoCommit] => 1
    [transOff] => 0
    [transCnt] => 0
    [fetchMode] =>
    [_oldRaiseFn] =>
    [_transOK] =>
    [_connectionID] => Resource id #8
    [_errorMsg] =>
    [_errorCode] =>
    [_queryID] => Resource id #11
    [_isPersistentConnection] =>
    [_evalAll] =>
    [_affected] =>
    [_logsql] =>
    [_numOfRows] => 1
    [_numOfFields] => 1
    [_queryID] => Resource id #11
    [_currentRow] => 0
    [_closed] =>
    [_inited] => 1
    [_obj] =>
    [_names] =>
    [_currentPage] => -1
    [_atFirstPage] =>
    [_atLastPage] =>
    [_lastPageNo] => -1
    [_maxRecordCount] => 0
    [datetime] =>
    [_fieldobjects] => Array
    [0] => ADOFieldObject Object
    [name] => APPROVERID
    [max_length] => 4
    [type] => VARCHAR2

  • BLOB JDBC/OCI8 and dbms_lob.read

    Hi,
    using dbms_lob.read() to retrieve a BLOB with JDBC/OCI8
    we cannot use a chunk larger than 255.
    If we try, we get a 21560 error.
    Any idea?
    Thanks
    Herve
    null

    Thanks for your quick answer.
    I tried it, but doing so, it doubles those characters coming from RAW format to VARCHAR2, and I've got a PNG-file that no picture-viewer shows, not even as garbage as was with CAST_TO_VARCHAR
    file size is now 44246 bytes and debug-output from loop is:
    chunk no:1 chunk size: 8192 chunksize in bytes: 8192
    chunk no:2 chunk size: 8192 chunksize in bytes: 8192
    chunk no:3 chunk size: 8192 chunksize in bytes: 8192
    chunk no:4 chunk size: 8192 chunksize in bytes: 8192
    chunk no:5 chunk size: 8192 chunksize in bytes: 8192
    chunk no:6 chunk size: 3286 chunksize in bytes: 3286
    whole chunk-size: 44246 in bytes: 44246
    Anymore ideas?

  • What to set in ORACLE_BASE and ORACLE_HOME values ?

    Hello,
    I installed the Oracle 10g Express Edition on my Linux box with the archive file oracle-xe_10.2.0.1-1.1_i386.deb
    The install went fine.
    Then I installed the instantclient in /home/stephane/programs/oracle/instantclient_10_2 and can load it fine in my Apache PHP server.
    I set the following values in the .bashrc file:
    export ORACLE_BASE=/home/stephane/programs/oracle
    export ORACLE_HOME=/home/stephane/programs/oracle
    PATH=$PATH:$ORACLE_HOME/bin
    But my Apache PHP server shows these values:
    ORACLE_BASE /home/stephane/oracle
    ORACLE_HOME /home/stephane/install/oracle
    I wonder what to set in these values in my .bashrc file.

    And so I tried to start a listener.
    root@stephane-ThinkPad-X61s:/home/stephane# lsnrctl start
    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-OCT-2012 02:40:33
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Starting /usr/lib/oracle/xe/app/oracle//product/10.2.0/server/bin/tnslsnr: please wait...
    TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    NL-00280: error creating log stream /usr/lib/oracle/xe/app/oracle//product/10.2.0/server/network/log/listener.log
    NL-00278: cannot open log file
    SNL-00016: snlfohd: error opening file
    Linux Error: 13: Permission denied
    Listener failed to start. See the error message(s) above...
    But it didn't really want to start,

  • Cloning a Database (and ORACLE_HOME

    I want to make a total copy of a database and its ORACLE_HOME. To me, this looks like a two step process:
    1) Clone the ORACLE_HOME. I completed this successfuly using GC (10.1.0.4)
    2) Clone the database using that cloned ORACLE_HOME. This doesn't appear to work as the cloned ORACLE_HOME from #1 doesn't appear in the available ORACLE_HOME options. I did manually add entries in /etc/oratab and the oraInventory inventory.xml file (and bounced the agent) and still my ORACLE_HOME doesn't appear.
    There also appears to be a way to add an ORACLE_HOME manually -- as it really isn't a database.

    Hello,
    I’m not a trained DBA, and hardly have Patrick’s experience, and although he makes perfect sense, the following are three threads about cloning APEX, and none of them have a (reported) good ending:
    Post Clone Apex steps
    Blank screen after cloning database
    After Cloning from Production Apex Doesnt Work
    Maybe things are not that simple and straightforward, and the accumulated experience at Oracle Support suggests that what seems to be the long and hard way is actually the short and easy one. So, unless Patrick tells you that he has done/witness it himself (and as a member of the APEX development team, it’s highly possible), I would go with Oracle Support.
    Just my 2¢.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • How to find ORACLE_BASE and ORACLE_HOME ?

    Greetings,
    I am a newbie to ORACLE, I'm in the preocess of learning ORACLE DBA stuffs. I need to know how to find ORACLE_BASE, ORACLE_HOME and also ORACLE_SID in any OS ? Is there any commands or scripts to do this ?
    With regards,
    Gopinath.

    Hi,
    If you have two different database of same version like you have shown test and test1.(both are of 11.2.0 version)
    then on cmd before writing sqlplus, you need to set ORACLE_SID='service_name'
    [code]
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\gs>set ORACLE_SID=orcl
    C:\Users\gs>sqlplus
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 1 18:51:00 2013
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Enter user-name: /as sysdba
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    [code]

  • About OTT and ORACLE_HOME

    i installed oracle default, and its environment name is ORACLE_HOME1, when i run ott, it said "ORACLE_HOME:not defined", then i set the ORACLE_HOME and related CLASSPATH and run ott again, but i get the exception about "can't locate the function 'kpuhhalo' input point in oci.dll".
    what happens to me?
    thanks.

    Ensure that %ORACLE_HOME%\bin is present in your PATH environment variable.

  • BAM and ORACLE_HOME environment

    Hi all,
    while trying to install BAM i get always that the ORACLE_HOME environment could not set to my computer and after that the installation aborts with check errors!!!
    ORACLE_HOME is set on my computer to my ORACLE DB 10g!!!
    What should I do to resume the installation???
    Thanks for your help
    Haitham

    BAM install "does not" require Oracle_Home Setting. If you have this setting, you have to unset it in the dos window, before starting the BAM install. You can unset it either on the computer properties, advanced-environmment variable or from dos prompt calling "unset".

  • How to organize 2 opman's and oracle_home path entries on single computer?

    I have installed Oracle DB and AppServer on one machine and so - my oracle_home points to DB, but apparently - $oracle_home uses in AppServer config file should point to AppServer home... How to organize the environment path entries on Windows machine?
    Now I have 2 opman's as well - can they work together or should I configure and use only one? The problem is that appServer ompan looks for its configuration settings in Oracle DB opman directory and it should be really strange if Oracle can work in such configuration?
    What is the good practice in this case?

    Well - things are a bit strange now - I looked in registry - and there is no Oracle at ell (there is only some classes registered and some 'Oracle' can be found in other non-relevant locations)... - well - is this due to fact that I am using Oracle for Vista? Well - DB is working correctly (as it has support for Vista), but AppServer fails...
    And about scripts - does it mean, that Oracle DB and AppServer cann't work at the same time on the same computer??? Well - some solution could be to put AppServer on Virtual machine... But it is strange anyway, because - as I guess - developer suite will create its own home during installation?
    Well - and another strange thing - any newly installed AppServer works correctly - but errors start to appear after trying to restart (stop is done correctly - from command in StartMenu 'stop SOA Suite...')... But this is strange either, because I could see in installation logs that server was restarted several time during installation and installation (of AppServer - on machine that already had DB installed and running) completed without errors.

  • Simple misc. questions re unix password,upgrade options and $ORACLE_HOME

    Hi,
    Some very basic questions
    1: If i change my oracle user's UNIX password, do other things depend up on this? I know that OracleEM asks for it once in a while, but am unsure if anything else cares.
    2: In the Universal installer : There is an option to "get software updates via the universal installer" - does that just mean it downloads things like the CPU sets and the like and helps you install them or does it just sign you up for notifications?
    3: I recently upgraded from 11.2.0.1 to 11.2.0.3 thus creating a new db_home
    Old dir was : /u00/app/oracle/product/11.2.0/
    new one is : /u00/app/oracle/product/11.2.0.3/
    Can I now delete the old one?

    steelnwool wrote:
    Hi,
    Some very basic questions
    1: If i change my oracle user's UNIX password, do other things depend up on this? I know that OracleEM asks for it once in a while, but am unsure if anything else cares.
    Yes you can change anytime anywhere :) no issue on running database.
    2: In the Universal installer : There is an option to "get software updates via the universal installer" - does that just mean it downloads things like the CPU sets and the like and helps you install them or does it just sign you up for notifications? Notification which will suggest you to install security patches according to your release.
    >
    3: I recently upgraded from 11.2.0.1 to 11.2.0.3 thus creating a new db_home
    Old dir was : /u00/app/oracle/product/11.2.0/
    new one is : /u00/app/oracle/product/11.2.0.3/
    If you are already using 11.2.0.3 then there is no harm in removing old oracle_home. The better way to remove oracle_home is through Universal Installer, click on remove oracle_home, this will aumatically remove oracle_home you choosed.
    Can I now delete the old one?Also see-http://docs.oracle.com/cd/B28359_01/install.111/b32002/remove_oracle_sw.htm

  • SOA EDG E12036.pdf : Sharing WL_HOME and ORACLE_HOME

    I am facing a weird problem and need help.
    I have 7 physical servers and 2 sets of binaries in shared storage. The 7 servers are : 1 admin server, 2 SOA servers, 2 OSB Servers and 2 BAM servers.
    Since the node manager is under $WL_HOME/common/nodemanager, all the properties file like nodemanager.properties, nodemanager.domains etc are shared. What I am noticing is, the domains are getting overwritten.
    Let us say, I am enrolling the domain in soa server1 then it gets enrolled properly. Next, when I enroll the domain for OSB server1 with OSB domain name, it changes. Is this the expected behavior?
    Thanks
    Shanthi

    If you are following the SOA EDG as the title of your question reflects, you will see we do not use nmenrolll anywhere in it. By using pack/unpack in the different nodes we get nm domains updated....

  • Oci8 and oracle extensions mutually exclusive?

    Does anybody know if the following extensions are mutually exclusive.
    php_oci8.dll
    php_oracle.dll
    I can't getting both to load.
    They can be uncommented in the php.ini and loaded individually but if both are used this causes a fatal error and apache fails to start and doesn't leave anything in the log file.
    I am currently using php4.3.6 / NT / Apache 1.3.12 (Win32)
    I am fairly new to php and don't seem to be getting anywhere fast, any help would be appreciated.
    thanks
    Neil W.

    I have them both uncommented and usable. I'm using Apache 1.3.28.
    Maybe your four-year old Apache version is the problem?
    -- CJ

Maybe you are looking for

  • HTTPS with load balancing

    Hi guys, We have a portal system with instance 08, so we typically connect to the portal using port 50800 for HTTP, and 50801 for HTTPS. We have just created a second server node for this portal (in the config tool). When we connect to 50800, does th

  • Infotype Screen control - change field from display to change

    Hello, I have a field in a custom infotype, which is showing up as only display. I want to change it so that values can be input. I checked the screen layout in se51 and found that the field is checked as input possible field. There is no entry for t

  • Re: HELP ME PLZ

    I need a help also! I couldn't find the post button so I'm writing on your post. I apologize about that. Someone stole my ipod black video 80gb a few days ago. I know my serial number and I got a protection for it when I bought it. Is there anyway to

  • Third party export sale

    Hello,             Can anyone elaborate on the definition of third party export sale....... It is where an exporter exports on behalf of another third party exporter........here who is the seller and who is the vendor...???how to go about with this s

  • Purchased wrong version of Adobe Acrobat Pro. Please HELP!

    I have purchased the Windows version of Acrobat Pro DC by mistake and need the Mac version. I can't find anywhere where I can contact a person to help me with this. Please can someone advise what I should do to resolve this issue. There must be a way