Problem with ocilogon
am 16.02.2007 15:25:14 von Dominik Helle
Hi,
I've a problem with php-oci and I hope anybody can help me. I want to
connect with ocilogon to an Oracle Database. If i call my php-Script in
the browser, this error message turn up:
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...
That is very funny, because if i activate the file on the command line -
the connect is possible and no error message turns up.
FYI: My System: Ubunutu 6, Apache 2 and php 5-with-oci & Oracle
Database 10g (10.1.0.2).
Thank you for helping.
Dominik
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem with ocilogon
am 16.02.2007 15:50:04 von Brad Bonkoski
Dominik Helle wrote:
> Hi,
>
> I've a problem with php-oci and I hope anybody can help me. I want to
> connect with ocilogon to an Oracle Database. If i call my php-Script
> in the browser, this error message turn up:
>
> 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...
>
> That is very funny, because if i activate the file on the command line
> - the connect is possible and no error message turns up.
>
> FYI: My System: Ubunutu 6, Apache 2 and php 5-with-oci & Oracle
> Database 10g (10.1.0.2).
>
> Thank you for helping.
>
> Dominik
>
I'm assuming since you mention the apache, this is a web application...
It looks like the ORACLE_HOME path is not know by apache/PHP. So, you
might try stopping apache, and doing something like 'source
/etc/profile' or wherever your ORACLE_HOME env variable is set, and then
restarting apache and trying again...
HTH
-B
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem with ocilogon
am 16.02.2007 15:58:16 von Dominik Helle
Brad Bonkoski schrieb:
> Dominik Helle wrote:
>> Hi,
>>
>> I've a problem with php-oci and I hope anybody can help me. I want to
>> connect with ocilogon to an Oracle Database. If i call my php-Script
>> in the browser, this error message turn up:
>>
>> 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...
>>
>> That is very funny, because if i activate the file on the command line
>> - the connect is possible and no error message turns up.
>>
>> FYI: My System: Ubunutu 6, Apache 2 and php 5-with-oci & Oracle
>> Database 10g (10.1.0.2).
>>
>> Thank you for helping.
>>
>> Dominik
>>
> I'm assuming since you mention the apache, this is a web application...
> It looks like the ORACLE_HOME path is not know by apache/PHP. So, you
> might try stopping apache, and doing something like 'source
> /etc/profile' or wherever your ORACLE_HOME env variable is set, and then
> restarting apache and trying again...
> HTH
> -B
Mhmmm I set this variables in the Apache - but it don't work :(
SetEnv ORACLE_HOME /xxx
SetEnv TNS_ADMIN /xxx
SetEnv LD_LIBRARY_PATH /xxx
SetEnv ORACLE_SID orcl10g
SetEnv NLS_LANG GERMAN_GERMANY.WE8ISO8859P1
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem with ocilogon
am 16.02.2007 16:40:08 von roy.a.jones
--=_alternative 0056131985257284_=
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: 7bit
Here are a couple of things I have done ...
1) Edit the apachectl script and set the variables there
2) Set the variables in your shell then start apache
3) use phpinfo() to display your settings (I also found the below php
script to work well)
<--------------------->
phpinfo();
$a= ini_get_all(); //Call ini_get_all()
$output="
"; //Start an output string
while(list($key, $value)=each($a)) //Loop through results
{
list($k, $v)= each($a[$key]); //Access each array
$output.="
$key
|
$v
|
$k
|
"; //Build output
}//while
$output.="
"; //Finish up
echo $output; //Spit it all out
?>
<--------------------->
Roy A. Jones
US Distribution IT
GlaxoSmithKline Inc. US Pharma IT, Financial Shared Services IT
External:
(919) 483-0266
Internal:
703-0266
Fax:
(919) 315-4979
Office:
STH D-1228
Email:
roy.a.jones@gsk.com
Pager:
(919) 312-0729
"Dominik Helle"
16-Feb-2007 09:58
To
php-db@lists.php.net
cc
Subject
Re: [PHP-DB] Problem with ocilogon
Brad Bonkoski schrieb:
> Dominik Helle wrote:
>> Hi,
>>
>> I've a problem with php-oci and I hope anybody can help me. I want to
>> connect with ocilogon to an Oracle Database. If i call my php-Script
>> in the browser, this error message turn up:
>>
>> 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...
>>
>> That is very funny, because if i activate the file on the command line
>> - the connect is possible and no error message turns up.
>>
>> FYI: My System: Ubunutu 6, Apache 2 and php 5-with-oci & Oracle
>> Database 10g (10.1.0.2).
>>
>> Thank you for helping.
>>
>> Dominik
>>
> I'm assuming since you mention the apache, this is a web application...
> It looks like the ORACLE_HOME path is not know by apache/PHP. So, you
> might try stopping apache, and doing something like 'source
> /etc/profile' or wherever your ORACLE_HOME env variable is set, and then
> restarting apache and trying again...
> HTH
> -B
Mhmmm I set this variables in the Apache - but it don't work :(
SetEnv ORACLE_HOME /xxx
SetEnv TNS_ADMIN /xxx
SetEnv LD_LIBRARY_PATH /xxx
SetEnv ORACLE_SID orcl10g
SetEnv NLS_LANG GERMAN_GERMANY.WE8ISO8859P1
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--=_alternative 0056131985257284_=--
Re: Problem with ocilogon
am 21.02.2007 10:50:12 von Haydar TUNA
Hello,
if you add your ENV variables for the oracle user (for example
ORACLE_HOME, ORACLE_SID) in the Apache startup script, your problem will be
solved.:) . You can create your your own Apache startup script
/etc/rc.d/init.d folder after this step. You should create a link file. You
can find many tutorials about Apache startup file on the web.
By the way you can see your oracle env variables in the oracle user
home directory .bash_profile file.
"Dominik Helle" wrote in message
news:45D5BECA.5090205@gmx.de...
> Hi,
>
> I've a problem with php-oci and I hope anybody can help me. I want to
> connect with ocilogon to an Oracle Database. If i call my php-Script in
> the browser, this error message turn up:
>
> 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...
>
> That is very funny, because if i activate the file on the command line -
> the connect is possible and no error message turns up.
>
> FYI: My System: Ubunutu 6, Apache 2 and php 5-with-oci & Oracle Database
> 10g (10.1.0.2).
>
> Thank you for helping.
>
> Dominik
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php