PHP and Oracle (ugh) Permissions Issue???

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
skehoe
Forum Commoner
Posts: 59
Joined: Sun Dec 22, 2002 5:57 am
Location: Denver

PHP and Oracle (ugh) Permissions Issue???

Post by skehoe »

I have oracle installed on a server (A) that I connect to via another box (B). All the proper oracle stuff is installed on B and I'm able to connect to oracle with PHP command line scripts. When I try to use the *exact* some code within a script that gets served by apache, I get errors that state it's unable to connect to the DB...

Here's the code I'm using to connect:

Code: Select all

$db = "dbname"; $user = "username"; $pass = "password";
$conn = oci_connect($user, $pass, $db);
$query = oci_parse($conn, "select * from some_table");
oci_execute($query);
oci_fetch_all($query, $results);
oci_close($conn);
Works fine when I run the script from the command line, fails terribly when I'm using it in a web page...

Any thoughts?

Thanks,

~Scott
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

try changing this line in your sqlnet.ora file on the Oracle server:

SQLNET.AUTHENTICATION_SERVICES= (NONE)

This link may be useful viewtopic.php?t=29290
User avatar
skehoe
Forum Commoner
Posts: 59
Joined: Sun Dec 22, 2002 5:57 am
Location: Denver

Post by skehoe »

I gave that a try, but it made no difference. I appreciate the suggestion though.

~Scott
User avatar
skehoe
Forum Commoner
Posts: 59
Joined: Sun Dec 22, 2002 5:57 am
Location: Denver

Still Need Help

Post by skehoe »

I've googled this and spent *days* trying just about anything I can find and still have had no luck...

Any suggestions would be *greatly* appreciated.

Thanks,

~Scott
Post Reply