Note that there are some explanatory texts on larger screens.

plurals
  1. POconfiguring php with oracle usin tns on mac os x
    primarykey
    data
    text
    <p>I am new to php but I've got it running (php 5.3.3) on my mac (OS 10.6). However when I try to run this script:</p> <pre><code> &lt;?php // Create connection to Oracle $conn = oci_connect("user", "pass", "tnsnames.ora"); if (!$conn) { $m = oci_error(); echo $m['message'], "\n"; exit; } else { print "Connected to Oracle!"; } // Close the Oracle connection oci_close($conn); ?&gt; </code></pre> <p>I get the error: "Fatal error: Call to undefined function oci_connect()..."</p> <p>Now, I've checked oracle's website and downloaded their instant client, but I'm stuck as to what to do next. Their instructions are:</p> <blockquote> <p>On non-Windows platforms rebuild PHP using the following configuration option: --with-oci8=shared,instantclient,/path/to/instant/client/libs Edit your php.ini file and add: extension = oci8.so Ensure that your extension_dir parameter (in php.ini) points to the location where oci8.so was installed. Set environment variables required by Oracle, such as PATH (Windows) or LD_LIBRARY_PATH (on Linux) Restart you webserver.</p> </blockquote> <p>But could someone explain that to me in simpler language? I am really confused. I can't find an oci8.so file in the instant client folder, and I don't know where to put the extention = oci8.so in the file (all I have are php.ini-production and php.ini-development. And I don't know how "rebuild" PHP with configuration options.</p> <p>Oh and I don't know how to pull in the tnsnames.org file either. Is this the right way? Since I don't even have a connection yet, I don't know if this is failing or not.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload