2

I can run my script just fine from the command line: php test.php and it connects, returns my simple query and then disconnects from oracle. when I run:

isql -v dsn uname pw

it connects and I can query as well. The problem is when I run the script from the browser, I get a wonderful 500 error and a segfault as a present in my log files. Now apache is not compiled for debugging (which is annoying). I would love to not have to reinstall apache with debugging.

I am using: PHP:

PHP 5.3.6 (cli) (built: Mar 17 2011 20:56:13)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator

Apache:

Server version: Apache/2.2.17 (Unix)
Server built:   Oct 27 2010 10:04:21
Server's Module Magic Number: 20051115:25
Server loaded:  APR 1.4.5, APR-Util 1.3.12
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture:   64-bit

Oracle Client:

client64, both sdk and instant client

Linux Kernel:

2.6.35.13-91.fc14.x86_64

unixODBC: unixODBC.x86_64 2.2.14-12.fc14 (from yum)

I cannot even run advanced debugging or logging on php because apache/php just quits once I go to the URL in the browser.

I'm currently trying to see if I can run:

<?php exec('php test.php'); ?>

to see if I can, for the time being, get around this. I will gladly share anything else if need be.

1 Answer 1

1

I would guess that its almost certainly (given you are on a 64 bit platform) due to the unixODBC you are using being build with sizeof( SQLLEN ) == 4, which was the default for 2.2.x, and sizeof( SQLLEN ) == 8 which is what 2.3.x builds with.

Sign up to request clarification or add additional context in comments.

4 Comments

ok, so my course of action will be to recompile and rebuild the unixODBC driver? I cannot just use the "yum install" command?
That would be my suggestion. 2.2.14 is almost 3 years old now.
Quick question, how do you link php to use that version of unixODBC driver? That is the problem I am facing now.
Well, to get it to build against the newer header files, install the unixODBC source, and build from than, then build php with its odbc interface so that it finds the headers from the installed unixODBC. At run time, make sure the libs from the new install (default location /usr/local/lib) are found by the php subsystem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.