Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7359 > unrolled thread

Oracle Wallet and PHP issue.

Started byshashi.divekar@gmail.com
First post2012-10-27 09:34 -0700
Last post2012-10-28 23:51 +0000
Articles 4 — 4 participants

Back to article view | Back to comp.lang.php


Contents

  Oracle Wallet and PHP issue. shashi.divekar@gmail.com - 2012-10-27 09:34 -0700
    Re: Oracle Wallet and PHP issue. Jerry Stuckle <jstucklex@attglobal.net> - 2012-10-27 20:29 -0400
    Re: Oracle Wallet and PHP issue. Michael Vilain <vilain@NOspamcop.net> - 2012-10-27 23:06 -0700
    Re: Oracle Wallet and PHP issue. Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-28 23:51 +0000

#7359 — Oracle Wallet and PHP issue.

Fromshashi.divekar@gmail.com
Date2012-10-27 09:34 -0700
SubjectOracle Wallet and PHP issue.
Message-ID<ddbd4219-15dc-4abc-aa4e-7f197e7c3d89@googlegroups.com>
I have been struggling on this PHP-ORACLE Wallet issue and may be you have answer !

In nutshell - perl and sqlplus works for Oracle Wallet for reading from database and well as writing into database. php works for reading from database. BUT PHP DOES NOT WORK FOR WRITING INTO DATABASE !


My php.ini file contains -
# cat  /usr/php-5.4.5/lib/php.ini
extention = oci8.so
extension_dir = "/opt/php/lib/php/extensions/
no-debug-non-zts-20100525"
date.timezone = "America/Los_Angeles"
output_buffering = On
oci8.privileged_connect = On


We have two oracle accounts log_reader and log_writer. log_reader has read access for reading data. log_writer has write access writting data into database. The application is run from Apache and uses Perl and PHP. Passwords are hardcoded into php/perl scripts. Recently we are trying to migrate to Oracle Wallet to eliminate hard coded passwords. Oracle wallet is configured and following works - sqlplus and perl for both log_reader and log_writer accounts. php for log_reader account.

php does not work for log-writer account. We get following error - insert err = 1031:ORA-01031: insufficient privileges

    PHP code -
    $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT);

In short with Oracle Wallet there is no problem for sqlplus and Perl. But for PHP we are facing issue when we try to write/insert data into database. Read for PHP works fine.

I have tried following so far but no luck -

$conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT);

$conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT+OCI_SYSOPER);

$conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT+OCI_SYSDBA);

php does not work for log-writer account. We get following error - insert err = 1031:ORA-01031: insufficient privileges

Any idea how to resolve this problem ?

Thanks in advance. 
-Shashi DIvekar

[toc] | [next] | [standalone]


#7361

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-10-27 20:29 -0400
Message-ID<k6hua4$h7m$1@dont-email.me>
In reply to#7359
On 10/27/2012 12:34 PM, shashi.divekar@gmail.com wrote:
> I have been struggling on this PHP-ORACLE Wallet issue and may be you have answer !
>
> In nutshell - perl and sqlplus works for Oracle Wallet for reading from database and well as writing into database. php works for reading from database. BUT PHP DOES NOT WORK FOR WRITING INTO DATABASE !
>
>
> My php.ini file contains -
> # cat  /usr/php-5.4.5/lib/php.ini
> extention = oci8.so
> extension_dir = "/opt/php/lib/php/extensions/
> no-debug-non-zts-20100525"
> date.timezone = "America/Los_Angeles"
> output_buffering = On
> oci8.privileged_connect = On
>
>
> We have two oracle accounts log_reader and log_writer. log_reader has read access for reading data. log_writer has write access writting data into database. The application is run from Apache and uses Perl and PHP. Passwords are hardcoded into php/perl scripts. Recently we are trying to migrate to Oracle Wallet to eliminate hard coded passwords. Oracle wallet is configured and following works - sqlplus and perl for both log_reader and log_writer accounts. php for log_reader account.
>
> php does not work for log-writer account. We get following error - insert err = 1031:ORA-01031: insufficient privileges
>
>      PHP code -
>      $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT);
>
> In short with Oracle Wallet there is no problem for sqlplus and Perl. But for PHP we are facing issue when we try to write/insert data into database. Read for PHP works fine.
>
> I have tried following so far but no luck -
>
> $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT);
>
> $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT+OCI_SYSOPER);
>
> $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT+OCI_SYSDBA);
>
> php does not work for log-writer account. We get following error - insert err = 1031:ORA-01031: insufficient privileges
>
> Any idea how to resolve this problem ?
>
> Thanks in advance.
> -Shashi DIvekar
>

Did you ask Oracle Wallet support?  They know their code better than 
anyone else.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#7363

FromMichael Vilain <vilain@NOspamcop.net>
Date2012-10-27 23:06 -0700
Message-ID<vilain-5A3C0A.23062427102012@news.individual.net>
In reply to#7359
In article <ddbd4219-15dc-4abc-aa4e-7f197e7c3d89@googlegroups.com>,
 shashi.divekar@gmail.com wrote:

> I have been struggling on this PHP-ORACLE Wallet issue and may be you have 
> answer !
> 
> In nutshell - perl and sqlplus works for Oracle Wallet for reading from 
> database and well as writing into database. php works for reading from 
> database. BUT PHP DOES NOT WORK FOR WRITING INTO DATABASE !
> 
> 
> My php.ini file contains -
> # cat  /usr/php-5.4.5/lib/php.ini
> extention = oci8.so
> extension_dir = "/opt/php/lib/php/extensions/
> no-debug-non-zts-20100525"
> date.timezone = "America/Los_Angeles"
> output_buffering = On
> oci8.privileged_connect = On
> 
> 
> We have two oracle accounts log_reader and log_writer. log_reader has read 
> access for reading data. log_writer has write access writting data into 
> database. The application is run from Apache and uses Perl and PHP. Passwords 
> are hardcoded into php/perl scripts. Recently we are trying to migrate to 
> Oracle Wallet to eliminate hard coded passwords. Oracle wallet is configured 
> and following works - sqlplus and perl for both log_reader and log_writer 
> accounts. php for log_reader account.
> 
> php does not work for log-writer account. We get following error - insert err 
> = 1031:ORA-01031: insufficient privileges
> 
>     PHP code -
>     $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT);
> 
> In short with Oracle Wallet there is no problem for sqlplus and Perl. But for 
> PHP we are facing issue when we try to write/insert data into database. Read 
> for PHP works fine.
> 
> I have tried following so far but no luck -
> 
> $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT);
> 
> $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT+OCI_SYSOPER);
> 
> $conn = OCIPLogon("/", "", "SLACDEV", "", OCI_CRED_EXT+OCI_SYSDBA);
> 
> php does not work for log-writer account. We get following error - insert err 
> = 1031:ORA-01031: insufficient privileges
> 
> Any idea how to resolve this problem ?
> 
> Thanks in advance. 
> -Shashi DIvekar

Contact your Oracle DBA.  I suspect the account used to write to the 
database doesn't have the privs or it's setup incorrectly.

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]

[toc] | [prev] | [next] | [standalone]


#7377

FromDenis McMahon <denismfmcmahon@gmail.com>
Date2012-10-28 23:51 +0000
Message-ID<k6kget$fiu$3@dont-email.me>
In reply to#7359
On Sat, 27 Oct 2012 09:34:40 -0700, shashi.divekar wrote:

> php does not work for log-writer account. We get following error -
> insert err = 1031:ORA-01031: insufficient privileges

A quick google suggests two possibilities:

1) The database tried to write to a file / device / socket / stream that 
it doesn't have write access to; or

2) The database user tried to change something that they didn't have 
sufficient access to change.

For case (1), speak to your sysadmin, and for case (2), your dba. In 
determining, in case 2, what privs are needed, it might help knowing what 
the sql command was trying to do. Eg insert / update a table, create a 
(temporary) table, alter a table structure etc etc.

Rgds

Denis McMahon

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web