LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   PHP-OCI and YUM (https://www.linuxquestions.org/questions/fedora-35/php-oci-and-yum-595404/)

cristinaaragon 10-29-2007 04:05 AM

PHP-OCI and YUM
 
Hi all,

I'm newbie and I donīt know if my question is something obvious.
Well, I have Fedora Core 5 and PHP installed through RPM packages.
Now, I have to make PHP work with Oracle (installed in other machine).
I think that I have to find a package with php-oci module but I can't.
If I type:
[root@mola modules]# yum install php-oci
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/3]
extras [2/3]
updates [3/3]
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: php-oci
Nothing to do

(The same happens if I type yum install php-oci8).

Any help would be appreciate.
Thanks in advance!
Cristina

shafty023 10-29-2007 07:36 AM

Have you tried checking phpinfo() yet?

Create a php file named info.php, then copy paste the following into it. Place it into your web directory and navigate to it from your browser. I'm hoping you know how to do this. And by navigating to it from your browser I don't mean File->open file. I mean http://localhost/info.php if you happen to put it in your root web server directory. Make sure apache (httpd) is running. Let me know if you have any questions. The output you'll see in your browser will tell you if php was compiled with oci8 support

<?php

phpinfo();
?>

If you do not have php compiled with oci8 support (yes I know you installed php via yum) this means you'll need to uninstall php from your system and download the source code and compile it with oci8 support. Unless of course you can find a package on the net with this already compiled in. You'll also need the oracle client installed as you'll need to point php to your oracle installation directory. Lots of stuff to do and know when adding oracle support.

cristinaaragon 10-30-2007 04:48 AM

PHP-OCI and YUM
 
Thanks Shafty,

Then I have to uninstall php and re-install it with oci support.

I have another question: ŋyou said that I need to install oracle client too to point php to my oracle installation directory? But i have Oracle installed in other machine!
Isīt possible to connect to oracle installed remotely?

Thanks very much!!
Cristina

shafty023 10-30-2007 09:32 AM

PHP will need the Oracle client in order to make a connection to a remote Oracle database. It's not like php opens a direct connection to the oracle database. From my understanding and how I see it configured here at my office, PHP talks with the oracle client via oci8, which then makes a connection to the oracle database we have remotely on another server. Check out this link -> http://us.php.net/oci8 and also google "compile php with oci8"


All times are GMT -5. The time now is 01:48 AM.