views:

591

answers:

5
+1  A: 

Is there anything in Apache's error_log? Is this mod_php or FastCGI or normal CGI PHP? What happens if you run the script via the command line?

You could also try setting PHP's error log and looking in there.


EDIT1: Try:

echo "before";
if(!function_exists('oci_connect')) die('Oracle Not Installed');

And post the results...


EDIT2: I'm really not sure. My best bet is this info from the PHP manual:

The most common problem with installing OCI8 is not having the Oracle environment correctly set. This typically appears as a problem using oci_connect() or oci_pconnect(). The error may be a PHP error such as Call to undefined function oci_connect(), an Oracle error such as ORA-12705, or even an Apache crash. Check the Apache log files for startup errors and see the sections above to resolve this problem.

Anyone else have any ideas to help out Bryan?

Josh
Error_log doesn't report anything.Normal CGI.From command line it returns the "before" but not the "after".
Bryan
I have set this in my .htaccess:php_flag display_startup_errors onphp_flag display_errors onphp_flag html_errors onphp_flag log_errors onphp_flag ignore_repeated_errors offphp_flag ignore_repeated_source offphp_flag report_memleaks onphp_flag track_errors onphp_value docref_root 0php_value docref_ext 0php_value error_reporting 999999999php_value error_log /data/project/http/logs/PHP_errors.log
Bryan
Sorry, formatted htaccess: http://gist.github.com/323117
Bryan
@Bryan: Thanks. You can also edit your question and post things like that in a <code> block in your question.
Josh
Submitted results.
Bryan
Nothing in log during the time of running of that file.
Bryan
A: 

are you connecting to remote or to local db? i think, for localhost you must replace "host" with "false". I hope, this will help you...

edit: i think, you are missing a parameter...my last suggestions are: 1. you must set the port (default 1521) AND/OR 2. You must enter db name AND/OR you must set the instance name (the ORACLE_SID parameter)

cupakob
Remote. I can connect to it via my local development machine (Windows).
Bryan
i think, you are missing a parameter...my last suggestions are: 1. you must set the port (default 1521) AND/OR 2. You must enter db name AND/OR you must set the instance name (the ORACLE_SID parameter)
cupakob
I removed the actual information for security purposes. It works on my locals machine and if any of those parameters are skewed, it returns a timeout error, not a blank page.
Bryan
try it this way: $conn = oci_connect( "username", "password", "//host/dbname" ); (if not works - sorry, i can't help you)
cupakob
Still not showing anything.
Bryan
A: 

You never check the return value of oci_connect() or call oci_error() but it doesn't look relevant to your problem since you seem to be suffering from a PHP crash. There's an open bug for RHEL that may affect you too:

http://pecl.php.net/bugs/bug.php?id=16626

Did you build the oci8 package yourself? Are you using a third-party binary?

Álvaro G. Vicario
I built it myself. Check by trace posted above, I'll look through the open bug.
Bryan
+1  A: 

Bryan,

I am going to be honest: I tried this two years ago and failed miserably. :) I could not get the OCI functions to work for anything by compiling myself.

But in the interest of getting it done I looked for an alternate solution and found it in Zend Core for Oracle. All I did was download, run the installer, and it was done. It installs Apache/PHP, MySQL (optional), and the InstantClient for you.

Now as Zend Server, it is basically the same product. I realize that this may not be the solution you hoped for, but if it works...

Zend Server

TomWilsonFL
I am hoping I don't have to do that. It will require a bit of rewriting of code. See the update above. More confusing situations...
Bryan
A: 

It has been fixed. See the top for details but here is the cliff notes: virtualiztion environments matter.

Bryan