Re: PHP/Oracle home problem ?



On Aug 30, 11:51 pm, Jason Cartledge <jcartledge9...@xxxxxxxxxxxxx>
wrote:
Hello all, I have what I thought was a PHP problem but I think it is
an Oracle setup and configuration problem with PHP. I know this is an
Oracle group but I have had no luck in the PHP groups and Mladen
Gogala is Oracle and PHP so I am trying to get help posting here. I
have read the charter and if I am violating it I apologize in
advance.

Here is my configuration

jason@home:~$
jason@home:~$ free
total used free shared buffers
cached
Mem: 3075856 866608 2209248 0 12532
668632
-/+ buffers/cache: 185444 2890412
Swap: 578300 0 578300
jason@home:~$ uname -a
Linux home 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686
GNU/Linux
jason@home:~$ php --version
PHP 5.2.1 (cli) (built: Jul 17 2007 18:14:23)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
jason@home:~$
jason@home:/var/www$ php testoci.php

Logon OK

jason@home:/var/www$
jason@home:/var/www$
jason@home:/var/www$ cat testoci.php
<?php
require_once('DB.php');
# $db=DB::connect("oci8://scott:tiger@orcl");
$db=OCILogon("scott","tiger","orcl");
if (!DB::iserror($db))
{
echo "\r\nLogon OK\n";
}
else
{
echo "\r\nLogon NOT OK\r\n";
#echo $db->getDebugInfo();
}
?>

jason@home:/var/www$
jason@home:/var/www$ sqlplus scott/tiger@orcl

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Aug 30 16:22:42 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing
options

SQL>

When I execute testoci.php from the command line like I show above, I
see "Logon OK" like I show above.
When I execute this program fromhttp://localhost/testoci.phpI see

Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed.
There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory in /var/www/
testoci.php on line 4
Logon OK

I don't understand it. In my Apache startup script, I have added echo
$ORACLE_HOME >/1.lst. When I reboot the computer, and examine this
file, it shows /oracle/test11g which is my Oracle home.

In a separate thread last year (http://www.thescripts.com/forum/
thread454404.html), Mladen suggests (for Oracle 10.2) trying "chmod -R
o+rx $ORACLE_HOME" but this doesn't work either. I am using 11g.

If anyone can suggest what else to test, I would be most greatful.

Thank you
Jason

Just one more thing, please post to the sig. This is just a junk e-
mail account so I can avoid getting spammed on my real one.

Ubuntu is totally new for me and take almost two days to install the
Oracle 11g database on it.
But the Oracle DB and php works well with the Ubuntu. I can use
conncet DB through command line and firefox

Here is my configuration:

Ubuntu:
#sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04
Codename: feisty

Oracle: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 -
Production
PHP: PHP 5.2.4 (cli)
Apache: Apache/2.2.4 (Unix)

You can try the whole installation again!
There is a gudie on http://www.dizwell.com/prod/node/929 , please
follow it.
"The Underground PHP and Oracle® Manual" can guide you to install the
php and apache correctly.
Goods luck!

.



Relevant Pages

  • Re: php or coldfusion?
    ... If you can't get PHP to work and you can get coldfusion to ... Interestingly enough Oracle has committed to and there are websites devoted ... to Oracle DB, web server, and PHP with appropriate extensions. ... something which utilizes PHP and Oracle PL/SQL to manipulate and query data ...
    (alt.php)
  • Re: PHP/Oracle home problem ?
    ... I have what I thought was a PHP problem but I think it is ... an Oracle setup and configuration problem with PHP. ... Oracle group but I have had no luck in the PHP groups and Mladen ...
    (comp.databases.oracle.server)
  • Re: [PHP] Re: DB Comparisons
    ... technologies like MS sequel server oracle - coldfusion etc.... ... I imagine that most middleware like php / asp / coldfusion is relatively ... language and go for a pre compiled programming language. ... MSSQL is slow, and you need the latest versions to get the features you ...
    (php.general)
  • Re: Fetch table names from query
    ... I've implemented a very simple results cache in my PHP application but I'd like to improve it. ... Writing a reliable SQL parser in PHP looks like a hard task and obtaining a full explain plan from the Oracle server looks like an overkill. ... Leave managing the database to the database professionals. ...
    (comp.databases.oracle.misc)
  • Help with php5 install under windows
    ... This includes moving php from the ... Enable the PHP scripting language engine under Apache. ... or per-virtualhost web server configuration file. ... The PHP directives register_globals, ...
    (php.general)