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
Return to the default flat view Create a new topic Submit Reply
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 previous message
btran007 is currently offline  btran007
Messages: 3
Registered: June 2014
Karma:
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Thu Nov 21 13:43:36 GMT 2024

Total time taken to generate the page: 0.04689 seconds