PHP 5 + Oracle 10g

I am trying to work with PHP 5 and Apache 1.3.29 on Windows XP with the Oracle 10g client libraries.
I have tried v5.0.0, 5.0.1 and 5.0.2-dev as of today's CVS build with no luck.
Apache keeps hanging with an error caused probably by the oci8 extension of PHP 5.
I tried to find out the error and the crash happens in oraclent10.dll, so I'm pretty sure this has to do with the Oracle support.
Has anybody experienced anything like that?
With PHP 4 everything works perfectly with the same version of Apache and the same Oracle 10g client libraries.
Valerio Santinelli

OCI8 functions are not compiled by default in PHP.
So if PHP was installed from sources then you need recompile it with with-oci8 or with-oci8-instant-client option.

Similar Messages

  • Free web hosting for PHP Oracle 10g XE applications

    Hi guys
    I am a student currently completing my final year project of a BSc Information Systems / Computer Science programme. I am using PHP and Oracle 10g XE and I was hoping that someone could advise me on a good web hosting site for student applications that is available at no cost, since I can't afford to pay for hosting. It is important that I host my site because my university tutor (in the UK) needs to access my site and provide feedback at this point in the project. Any assistance will be very much appreciated.

    Just to let everyone know, i will do free hosting for students needing it for there projects, i will need an academic email address for corespodence, so thats a .edu or .ac.uk for example.
    I have just relaunched the website and slashed my prices, so starter packages are from 2.99 a month for oracle and php. www.phporaclehosting.com
    Any questions reply to this thread

  • [질문] unix 에서 php와 oracle 10g 를 연동하고 있는데요 한글데이터가 ? 로 나와요

    os : unix AIX 5
    db : oracle 10g
    웹 : apache, php
    이렇게 구성되어 있는데
    oracle, php 설치를 했는데요
    웹은 뜨는데
    쿼리를 해서 한글 데이터를 조회하면 한글이 ?(물음표)로 조회가 됩니다.
    sqlplus 로 접속해서 보면 한글로 제대로 나오는데 php로 웹상에 보여질때는 한글이 물음표(?)로 나오는데 어떻게 해야 하나요?
    인터넷 검색해서 보면 euc-kr 이런 한글 옵션이나 nls 이런 옵션을 맞추면 된다고 하는데 이것저것 해봤는데 안되서 이렇게 글을 올립니다. 오라클 설치시 옵션을 잘못 줘서 그런거지 아니면 php를 설치를 잘못 한건지 정말 모르겠습니다. 고수님들 많은 조언 바랍니다.

    charater set을 확인해 보세요 5601 또는 949,,,,
    949가 디폴트로 알고 있네요 기억이잘;;
    글 수정:
    user612568

  • Problem with javascript/PHP/ oracle 10g smart quotes

    I have a problem with my php form that passes the text field to a javascript object. When I copy text from MS Word that includes smart quotes, the form inputs that into the database as ? (upside down) marks. The charset of the DB is WE8MSWIN1252. How do I store these smart quotes as regular quotes? And also if I can do any conversions on the front end (js or php). I tried doing some conversion but to no avail. Any help would be appreciated thank you. “double”

    Decide if you want your HTML pages in Windows code page 1252 or Unicode UTF-8. Then, make sure the pages are properly tagged as either "text/html;charset=windows-1252" or "text/html;charset=utf-8". Use HTTP header Content-type or the corresponding <META HTTP-EQUIV=...> tag. Then, set NLS_LANG environment variable for your PHP engine to either AMERICAN_AMERICA.WE8MSWIN1252 or to AMERICAN_AMERICA.AL32UTF8, depending on which encoding you selected for your HTML.
    -- Sergiusz

  • Help Oracle 10g+PHP and Bengali language support !!!!

    Hi All:
    i have a emp having a column names namewhich is of nvarchar2 datatype. What I want is to insert a value from a html from which will insert Bengali language as my input to the name filed in my database and show me the same on the browser when required.
    Here am attaching a sample code which am using to connect/insert and show my table. This is working perfectly fine.
    Please help me as am unable to insert data in local language. Please guide me the steps how to configure the NLS_LANG and how to do it.
    ht.html
    =====
    <form action="insert.php" method="post">
    <p> Your ID : <input type="number" name="id" /></p>
    <p> Your NAME: <input type="text" name="name" /></p>
    <p><input type="submit" /></p>
    insert.php
    =======
    <?php
    # if ($REQUEST_METHOD=="POST")
    // Before running, create the table:
    // CREATE TABLE MYTABLE (mid NUMBER, myd VARCHAR2(20));
    $dbuser = "bob";
    $dbpass = "bob";
    #$dbtsn = "orcl"
    $dbconn = oci_connect($dbuser, $dbpass);
    echo "The Oracle Database established";
    $query = "INSERT INTO demo
         (id,name)
    VALUES('".$_POST['id']."','".$_POST['name']."')";
    $resultSet = oci_parse($dbconn,$query);
    if (oci_execute($resultSet))
    echo ("<BR> Record inserted");
    else
    echo ("<BR> error!!!!!!");
    ?>
    showv.php
    ========
    <?php
    $conn = oci_connect('bob', 'bob', 'orcl');
    if (!$conn) {
    $e = oci_error();
    print htmlentities($e['message']);
    exit;
    $query = 'SELECT * FROM demo';
    $stid = oci_parse($conn, $query);
    if (!$stid) {
    $e = oci_error($conn);
    print htmlentities($e['message']);
    exit;
    $r = oci_execute($stid, OCI_DEFAULT);
    if (!$r) {
    $e = oci_error($stid);
    echo htmlentities($e['message']);
    exit;
    print '<table border="2">';
    while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {
    print '<tr>';
    foreach ($row as $item) {
    print '<td>'.($item?htmlentities($item):' ').'</td>';
    print '</tr>';
    print '</table>';
    oci_close($conn);
    ?>
    I am using RedHat Enterprise linux 4 update 1 and Oracle 10g.
    Regards,
    Pradyumna

    Right... I found out how you can solve this, well not through the web interface... but oh well it is possible though...
    the error I was getting was: ORA-01704:     string literal too long.
    the keyword/phrase is "bind variables"... Did a little more searching and found this site:
    http://www.akadia.com/services/ora_bind_variables.html
    So basically you use bind variables to insert data which fills more than 4000 bytes...
    Since the data I will be inserting will be inserted via Java/.NET application I found the section called "Bind Variables in VB, Java and other applications" the most interesting... During my testing and I had neglected to use PreparedStatements in Java, and according to the site, using PreparedStatement provided an easier solution as the API does most of the work for you. My solution was to create a small program which read the large amounts of data from a file then feed this to a PreparedStatement, setObject or setASCIIStream/setCharacterStream, then execute it.
    Well I hope this helps other people who get the same error code.

  • PHP 5.2.4 with Oracle 10g.

    OS: Windows Vista
    PHP: 5.2.4
    Oracle: 10g (XE)
    Apache 2.2
    Hey all,
    hoping for a bit of help if possible! I'm unsure if this is the right place for this question. But here goes anyway!
    I installed PHP 5.2.4, Apache 2.2 and Oracle XE 10g today. I've set it up, and PHP is working fine on my server. However i'm having a bit of trouble with Oracle. I've pointed php.ini to the correct ext directory, and i've 'uncommented' the line "extension = php_oci8.dll".
    However when I go to connect to the database, I get the error "Call to undefined function: ora_logon()/ ocilogon()" I checked phpinfo, and the module has not been activated (which explains the error.)
    So I did a bit of research, and I read that I need uncomment the line ";extension = php_oracle.dll" in php.ini. However this line does not exist and nor did the 'php_oracle.dll' file.
    So I found the file in the binary .zip for PHP 5.2.4, put it in the 'ext' directory, and added the line to php.ini. But this did not help either.
    I'm at a bit of a loss how to do this?
    Any help would be much appreciated.
    Message was edited by:
    user600685

    The only thing I can see is this, which keeps repeating:
    [Thu Oct 18 12:34:55 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.4 configured -- resuming normal operations
    [Thu Oct 18 12:34:55 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Thu Oct 18 12:34:55 2007] [notice] Parent: Created child process 880
    [Thu Oct 18 12:34:56 2007] [notice] Child 880: Child process is running
    [Thu Oct 18 12:34:56 2007] [notice] Child 880: Acquired the start mutex.
    [Thu Oct 18 12:34:56 2007] [notice] Child 880: Starting 250 worker threads.
    [Thu Oct 18 12:34:56 2007] [notice] Child 880: Starting thread to listen on port 80.

  • Connecting PHP 5.0.3 to Oracle 10g

    I have read dozens of documents and postings, but I cannot identify why my PHP scripts fail to connect to my db.
    When I run:
    $connection = OCI_Connect('db_user_name', 'pw', 'db');
    I consistently get:
    Warning: oci_connect() [function.oci-connect]: ociopen_server:
    I have: Oracle 10g, PHP 5.0.3, MS IIS 5.0
    1. phpinfo() executes without any errors.
    2. phpinfo() reports: the correct location of my php.ini, the correct location of my extensions, and the correct values of my enviroment variables (ORACLE_HOME and ORACLE_SID.)
    3. I have un-commented php_oci8.dll in php.ini (phpinfo reports it as enabled.)
    4. I have installed the Oracle 10g client on the web server and can connect to the db from the web server using SQLPlus.
    5. I have given IUSR_<machine name> on my web server "Full Control" priviledges in both the Oracle client directory and the PHP directory.
    I must still be missing something though.... Does anyone know what?
    Thanks for your help - Chris

    I had similar problem…
    From dos
    set path=%PATH%;”path to php”;’path to php\ext”
    D:\ My Documents>more tst.php
    <?php
    $user="SCOTT";
    $password="tiger";
    $dbname="test";
    $connection = ocilogon($user, $password, $dbname);
    $query = "SELECT EMPNO,ENAME,JOB FROM emp";
    $statement = oci_parse ($connection, $query);
    oci_execute ($statement);
    while ($row = oci_fetch_array ($statement, OCI_ASSOC)) {
    $id = $row['EMPNO'];
    $name = $row['ENAME'];
    $lob_field = $row['JOB'];
    echo $id.' '.$name.' '.$lob_field,"\n";
    oci_free_statement($statement);
    oci_close($connection);
    ?>
    D: \My Documents>php tst.php
    7369 SMITH CLERK
    7499 ALLEN SALESMAN
    7521 WARD SALESMAN
    7566 JONES MANAGER
    D:\My Documents>
    Now it should work
    Robert

  • PHP 5.1.4 and Oracle 10G XE ?

    I am using PHP 5.1.4 with OCI8.dll module, and Oracle 10G XE. My question is how to Edit and Delete Record in my table using PHP syntax ?.
    Best Regards,
    /Harso Adjie.

    You use SQL syntax not PHP syntax to UPDATE / DELETE the records and run the query in a similar manner to SELECT statements:
    Parse your Oracle statement: oci_parse()
    Execute your Oracle statement: oci_execute()
    (You will need to commit transaction if not using auto-commit) Commit your transaction: oci_commit()
    http://uk.php.net/manual/en/ref.oci8.php

  • Installing and configuring PHP for ORACLE 10g Release 1

    Hello Lads,
    Please can anybody help me finish PHP install...
    I have got this error when executing the following command..
    #make install
    Here is the error:
    /usr/local/php-5.1.4/sapi/cli/php: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory
    Thanks!

    I answered in your other thread... the one without the I in the title :)
    nstalling and configuring PHP for ORACLE 10g Release 1

  • OracleAS 10g Installation Problem on RedHat AS 3.0

    Hi
    I need to install OracleAS 10g on RedHat AS 3.0 and it seems that I need a patch (Patch 3006854) and the installation is impossible without it.I just started using oracleAS 10g and I dont have any metalink id.
    I think something is wrong here.
    a free trial version with a commercial patch !!!
    can any one please help me out.
    regards yashar

    dear fredrik
    I tried to install it according to the installation guid on http://www.oracle-base.com/articles/10g/OracleAS10gInstallationOnRedHatAS3.php as you see it asked for installation of a patch.
    and yes I tried to install it without installing this patch and I got an error saying that I am missing a file named ld.so in /etc.I thought it might be connected to that patch.
    beside when I was looking for the solution to my problem I saw many people having the same problem and asking the exact same question.
    please notify about any solution that you think might help me solving this problem. I am in a hurry
    regards yashar

  • Oracle 10g RAC on Windows

    Installed Oracle 10g RAC on Windows... Everything was
    working fine, now when I install CRS it completed at 100% and then in the configuration it gives error
    INFO: exitonly tools to be excuted passed: 0
    INFO: Starting to execute configuration assistants
    INFO: Command = C:\WINDOWS\system32\cmd /c call C:\oracle\product\10.2.0\crs/install/crssetup.config.bat
    PROT-1: Failed to initialize ocrconfig
    Step 1: checking status of CRS cluster
    Step 2: creating directories (C:\oracle\product\10.2.0\crs)
    Step 3: configuring OCR repository
    ocr upgrade failed with (-1)
    Execution of the plugin was aborted
    INFO: Configuration assistant "Oracle Clusterware Configuration Assistant" was canceled.
    *** Starting OUICA ***
    Oracle Home set to C:\oracle\product\10.2.0\crs
    Configuration directory is set to C:\oracle\product\10.2.0\crs\cfgtoollogs. All xml files under the directory will be processed
    INFO: The "C:\oracle\product\10.2.0\crs\cfgtoollogs/configToolFailedCommands" script contains all commands that failed, were skipped or were cancelled. This file may be used to run these configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same.
    I am using VMware WorkStation 5
    http://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnWindows2003UsingVMware.php
    I can see my disks from both machines. Open the "Computer Management" dialog (Start > All Programs > Administrative Tools > Computer Management
    I use Windows XP SP2 as the host operating system
    Any suggestion?
    Message was edited by:
    MEXMAN

    You know its not certified?
    My first thought when I read the subject of this thread, and before reading what you posted, is that you've either done no research on RAC or didn't understand what you've read.
    You can create a RAC cluster using any operating system certified by Oracle.
    But the operating system is the least important part of creating a cluster. The questions you need to be able to address are:
    1. What is your solution to created shared storage?
    2. What is your solution to create the cache fusion interconnect and VIPs?
    If you don't have an answer to these questions you can not build a RAC cluster.

  • Apex 3.1.2 installation on Oracle 10g Standard Edition (10gSE)

    Hi..We're trying to install apex 3.1.2 on 10gSE (No application server 10gAS is available but just the database).
    Can it be installed with the embedded plsql gateway (EPG) option?
    or
    Oracle HTTP Server mod_plsql option?
    Currently there's Apache webserver already running on the box with PHP applications running. Want to make sure that apex/http-server install will not corrupt the existing environment.
    Please provide any pointers/references. IF YOU CAN OFFER PHONE SUPPORT FOR 1-2 HOURS, YOUR TIME IS Sincerely APPRECIATED. PLEASE EMAIL: [email protected] For Direct contact. Also, I may need help to solve some apex screen issues.
    * Removing the tagging with $ compensation on the post..Apex Community as in the past has been extremely helpful in solving many great apex challenges. Thanks for the continued support. *
    Edited by: Shravanv on Feb 18, 2010 12:09 PM
    Edited by: Shravanv on Feb 18, 2010 4:11 PM

    1- Here is what I mean, the oracle website is showing Web Logic in the download page of oracle application server:
    http://www.oracle.com/technology/software/products/ias/index.html
    Is there a separate download link for Oracle Application Server, if it's different from the web logic server?
    2- I Installed HTML_DB which is found in the Oracle 10g companion CD, I think I installed the HTTP Server with it, but now I want to install APEX 3.1.2 which I downloaded separately, if I uninstalled the HTML_DB using Oracle Universal Installer, will it remove the HTTP Server as well? since it lists the HTML_DB only as being installed without listing the HTTP Server separetly.
    Thanks.

  • Problems: install oracle 10g 32 bits on RH 5.8 x64

    Hello,
    Someone has given me an oracle 10g 32 bits to install on a Redhat 5.8 64 bits server (no other server available).
    I have a lot of errors during the installation process
    exemple:
    INFO: /usr/bin/ld: skipping incompatible /oracle/client/10x_32/lib/libxml10.a when searching for -lxml10
    /usr/bin/ld: cannot find -lxml10
    collect2: ld returned 1 exit status
    I installed libxml10 64 and 32 bits on the system !
    I would like to know if this configuration is POSSIBLE ???!
    If yes, what is the solution / process to fix these compli. problems :-|
    Thanks for your help !

    962147 wrote:
    yes i read the installprocess and pre requisits:
    But first "**is it possible to install oracle 10g 32 bits on redhat 64 bits ???* "
    yes or no ? :-(
    I've never seen any 32-bit software that DIDN'T run on a 64 bit OS, as long as the necessary libraries are installed.
    I used this process: is it the good one ?
    http://www.oracle-base.com/articles/10g/oracle-db-10gr2-installation-on-rhel-5.php
    Tim does a very nice job with his stuff on oracle-base, but that is NOT the official documentation. Why not use ORACLE'S own installation guide? Have you seen http://docs.oracle.com/cd/B19306_01/install.102/b15667/toc.htm
    And why are you installing a a version of Oracle that is out of support?
    And as long as you have a 64-bit OS, why would you want to run a 32-bit version of Oracle?
    Edited by: 962147 on 29 sept. 2012 13:06Edited by: EdStevens on Sep 29, 2012 9:22 PM

  • Problem with retrieving data from Oracle 10g / PHP4.3 / Apache 1.3.27

    Hi,
    I re-open a new thread following the opened post 'Getting RPMs for php-oracle for PHP4.3 on RHEL 4.0 and issue with OCI8 '
    I could re-installed PHP4.3 and apache 1.3.27 from the normal tar package (./configure then make) - I had some issues with the RPMs packages before.
    I could connect successfully PHP4.3 to my Oracle 10g DB with no issues by using some of the (deprecated) functions contained in oracle.so library in command line mode by executing a simple PHP script ;-)
    But ...when I try to execute the same script (a simple log on to the DB) or the application throught my web browser there are some errors in the apache error_log file that crash the process:
    [Wed Jul 25 13:19:23 2007] [notice] child pid 25450 exit signal Segmentation fault (11)
    [Wed Jul 25 13:19:31 2007] [notice] child pid 25451 exit signal Segmentation fault (11)
    *** glibc detected *** realloc(): invalid size: 0x08338898 ***
    [Wed Jul 25 13:19:42 2007] [notice] child pid 25441 exit signal Aborted (6)
    *** glibc detected *** realloc(): invalid size: 0x08338898 ***
    [Wed Jul 25 13:54:52 2007] [notice] child pid 25508 exit signal Aborted (6)
    [Fri Jul 27 04:39:56 2007] [notice] child pid 20550 exit signal Segmentation fault (11)
    After some investigations it looks like this is due to the connection of Oracle 10G and php.
    I tried to recompile Apache as the following:
    # cd /usr/src/apache_1.3.xx
    # make clean
    # LIBS=-lpthread ./config.status
    # make
    # make install
    but the issue is the same ...
    How can I workaround that issue and fix it in order to connect to Oracle 10 G by using PHP4.3 / apache 1.3.27 ?
    I need to use the oracle.so library to avoid to re-rewrite all my application ...
    Any help much very appreciated !
    Cheers
    Dominique

    You are in unchartered territory. But check the common "gotcha" and
    make sure that all the Oracle environment variables are set in the
    shell that starts Apache. Load the script <?php phpinfo(); ?> in a
    browser and see that whatever variables you need are set in the
    Environment section. See the section "Oracle Environment Variables
    for Connections" in Underground PHP and Oracle Manual
    I suspect it would be beneficial to migrate the PHP code to oci8.
    Check table 16-1 in Underground PHP and Oracle Manual for the mapping
    between 'oracle' and 'oci8' functions.
    -- cj

  • PHP- Oracle not working- Call to undefined function OCILogon() ERROR

    Hi,
    I am trying to just do a test program to test php - oracle connection,
    My versions are: php5.2.1-Win32 and Oracle 10g
    I have made the following settings:
    1.) Uncommented the following lines in php.ini:
    extension=php_oci8.dll
    extension=php_oracle.dll
    2.) Set extension_dir = "C:\php-5.2.1-Win32\ext"
    Changed the httpd.conf file as: ADDED
    1.)LoadModule php5_module C:/php-5.2.1-Win32/php5apache2.dll
    2.)PHPIniDir "C:/Program Files/Apache Group/Apache2/conf-"
    3.) LoadFile "C:/php/php5ts.dll"
    4.)<IfModule php5_module>
    <Location />
    AddType text/html .php .phps
    AddHandler application/x-httpd-php .php
    AddHandler application/x-httpd-php-source .phps
    </Location>
    </IfModule>
    5.) AddType application/x-httpd-php .php
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php-source .phps
    But when I am tryin to run the following program:
    <?php
    echo "<h1>OCI Test</h1>\n";
    $conn=OCILogon("system", "sheetal16", "orcl");
    $stmt = OCIParse($conn, "SELECT table_name FROM user_tables ORDER BY table_name");
    OCIExecute($stmt, OCI_DEFAULT);
    while (OCIFetch($stmt)) {
         $table_name = OCIResult($stmt, "TABLE_NAME");
         echo "$table_name<br />\n";
    OCIFreeStatement($stmt);
    OCILogoff($conn);
    ?>
    I am getting the following error:
    OCI Test
    Fatal error: Call to undefined function OCILogon() in C:\Program Files\Apache Group\Apache2\htdocs\test2.php on line 3
    Please help me to solve this problem.
    Thanks,
    Sheetal

    See Re: PHP- Oracle not working- Call to undefined function OCILogon() ERROR

Maybe you are looking for