FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Oracle Wallet and PHP issue.
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Oracle Wallet and PHP issue. [message #179426] Sat, 27 October 2012 16:34 Go to next message
shashi.divekar is currently offline  shashi.divekar
Messages: 1
Registered: October 2012
Karma: 0
Junior Member
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
Re: Oracle Wallet and PHP issue. [message #179428 is a reply to message #179426] Sun, 28 October 2012 00:29 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 10/27/2012 12:34 PM, shashi(dot)divekar(at)gmail(dot)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(at)attglobal(dot)net
==================
Re: Oracle Wallet and PHP issue. [message #179430 is a reply to message #179426] Sun, 28 October 2012 06:06 Go to previous messageGo to next message
Michael Vilain is currently offline  Michael Vilain
Messages: 88
Registered: September 2010
Karma: 0
Member
In article <ddbd4219-15dc-4abc-aa4e-7f197e7c3d89(at)googlegroups(dot)com>,
shashi(dot)divekar(at)gmail(dot)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]
Re: Oracle Wallet and PHP issue. [message #179444 is a reply to message #179426] Sun, 28 October 2012 23:51 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
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
Re: Oracle Wallet and PHP issue. [message #186076 is a reply to message #179426] Thu, 12 June 2014 18:30 Go to previous messageGo to next message
btran007 is currently offline  btran007
Messages: 3
Registered: June 2014
Karma: 0
Junior Member
On Saturday, October 27, 2012 12:34:40 PM UTC-4, Shashikant Divekar 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

Hello Shashi,

I am struggling to get perl to connect using Oracle wallet. You say perl and sqlplus works for Oracle Wallet for reading from database and well as writing into database. Would you mind sharing how you did that. I have Oracle Wallet setup and I can connect running sqlplus from the command line. However, I keep getting ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin). Here is my script:

use DBI;

my $db=DBI->connect("dbi:Oracle:tnsname");

It's very simple but it's not working. Can you please help?

Thanks
Re: Oracle Wallet and PHP issue. [message #186077 is a reply to message #186076] Thu, 12 June 2014 19:02 Go to previous messageGo to next message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma: 0
Senior Member
btran007(at)gmail(dot)com wrote:

> I am struggling to get perl to connect using Oracle wallet. You say
> perl and sqlplus works for Oracle Wallet for reading from database
> and well as writing into database. Would you mind sharing how you
> did that. I have Oracle Wallet setup and I can connect running
> sqlplus from the command line. However, I keep getting ORA-01017:
> invalid username/password; logon denied (DBD ERROR: OCISessionBegin).

You are better off to ask Perl related questions in a Perl related
newsgroup or forum. This is comp.lang.php, which obviously deals with
PHP related topics.

HTH

--
Christoph M. Becker
Re: Oracle Wallet and PHP issue. [message #186089 is a reply to message #186077] Fri, 13 June 2014 17:28 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Christoph Michael Becker wrote:

> btran007(at)gmail(dot)com wrote:
>> I am struggling to get perl to connect using Oracle wallet. You say
>> perl and sqlplus works for Oracle Wallet for reading from database
>> and well as writing into database. Would you mind sharing how you
>> did that. I have Oracle Wallet setup and I can connect running
>> sqlplus from the command line. However, I keep getting ORA-01017:
>> invalid username/password; logon denied (DBD ERROR: OCISessionBegin).
>
> You are better off to ask Perl related questions in a Perl related
> newsgroup or forum. This is comp.lang.php, which obviously deals with
> PHP related topics.

ACK. But the line

>> On Saturday, October 27, 2012 12:34:40 PM UTC-4, Shashikant Divekar
>> wrote:

in the previous poster’s *reply* speaks for itself, don’t you think? ;-)

<http://twovoyagers.com/improve-usenet.org/>


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
Re: Oracle Wallet and PHP issue. [message #186093 is a reply to message #186077] Fri, 13 June 2014 19:15 Go to previous messageGo to next message
btran007 is currently offline  btran007
Messages: 3
Registered: June 2014
Karma: 0
Junior Member
On Thursday, June 12, 2014 3:02:33 PM UTC-4, Christoph Michael Becker wrote:
> btran007(at)gmail(dot)com wrote:
>
>
>
>> I am struggling to get perl to connect using Oracle wallet. You say
>
>> perl and sqlplus works for Oracle Wallet for reading from database
>
>> and well as writing into database. Would you mind sharing how you
>
>> did that. I have Oracle Wallet setup and I can connect running
>
>> sqlplus from the command line. However, I keep getting ORA-01017:
>
>> invalid username/password; logon denied (DBD ERROR: OCISessionBegin).
>
>
>
> You are better off to ask Perl related questions in a Perl related
>
> newsgroup or forum. This is comp.lang.php, which obviously deals with
>
> PHP related topics.
>
>
>
> HTH
>
>
>
> --
>
> Christoph M. Becker

I took your suggestion and tried to post on perl forum/group 3 times but they appear. Do I not have privs?

Thanks
Re: Oracle Wallet and PHP issue. [message #186094 is a reply to message #186089] Fri, 13 June 2014 19:17 Go to previous messageGo to next message
btran007 is currently offline  btran007
Messages: 3
Registered: June 2014
Karma: 0
Junior Member
On Friday, June 13, 2014 1:28:04 PM UTC-4, Thomas 'PointedEars' Lahn wrote:
> Christoph Michael Becker wrote:
>
>
>
>> btran007(at)gmail(dot)com wrote:
>
>>> I am struggling to get perl to connect using Oracle wallet. You say
>
>>> perl and sqlplus works for Oracle Wallet for reading from database
>
>>> and well as writing into database. Would you mind sharing how you
>
>>> did that. I have Oracle Wallet setup and I can connect running
>
>>> sqlplus from the command line. However, I keep getting ORA-01017:
>
>>> invalid username/password; logon denied (DBD ERROR: OCISessionBegin).
>
>>
>
>> You are better off to ask Perl related questions in a Perl related
>
>> newsgroup or forum. This is comp.lang.php, which obviously deals with
>
>> PHP related topics.
>
>
>
> ACK. But the line
>
>
>
>>> On Saturday, October 27, 2012 12:34:40 PM UTC-4, Shashikant Divekar
>
>>> wrote:
>
>
>
> in the previous poster's *reply* speaks for itself, don't you think? ;-)
>
>
>
> <http://twovoyagers.com/improve-usenet.org/>
>
>
>
>
>
> PointedEars
>
> --
>
> Use any version of Microsoft Frontpage to create your site.
>
> (This won't prevent people from viewing your source, but no one
>
> will want to steal it.)
>
> -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)

I am sorry I don't follow. There's nothing useful. May be I missed something.

Thanks
Re: Oracle Wallet and PHP issue. [message #186095 is a reply to message #186093] Fri, 13 June 2014 19:23 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/13/2014 3:15 PM, btran007(at)gmail(dot)com wrote:
> On Thursday, June 12, 2014 3:02:33 PM UTC-4, Christoph Michael Becker wrote:
>> btran007(at)gmail(dot)com wrote:
>>
>>
>>
>>> I am struggling to get perl to connect using Oracle wallet. You say
>>
>>> perl and sqlplus works for Oracle Wallet for reading from database
>>
>>> and well as writing into database. Would you mind sharing how you
>>
>>> did that. I have Oracle Wallet setup and I can connect running
>>
>>> sqlplus from the command line. However, I keep getting ORA-01017:
>>
>>> invalid username/password; logon denied (DBD ERROR: OCISessionBegin).
>>
>>
>>
>> You are better off to ask Perl related questions in a Perl related
>>
>> newsgroup or forum. This is comp.lang.php, which obviously deals with
>>
>> PHP related topics.
>>
>>
>>
>> HTH
>>
>>
>>
>> --
>>
>> Christoph M. Becker
>
> I took your suggestion and tried to post on perl forum/group 3 times but they appear. Do I not have privs?
>
> Thanks
>

The people in a PHP newsgroup would have no idea what you need to post
to a perl forum/group. Why not ask someone in that group?

Or, if it is a forum, ask the forum admin?

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: PHP and Sqlite Encryption extension
Next Topic: function for preserving special characters?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Dec 03 17:03:03 GMT 2024

Total time taken to generate the page: 0.03356 seconds