PHP unixODBC Apache 段错误

发布于 2024-11-28 16:56:18 字数 1198 浏览 2 评论 0原文

我可以从命令行很好地运行我的脚本: php test.php 并且它连接,返回我的简单查询,然后断开与 Oracle 的连接。当我运行时:

isql -v dsn uname pw

它连接并且我也可以查询。问题是,当我从浏览器运行脚本时,我收到了一个美妙的 500 错误,并且日志文件中出现了一个段错误。现在 apache 没有被编译用于调试(这很烦人)。我希望不必通过调试重新安装 apache。

我正在使用: 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 客户端:

client64, both sdk and instant client

Linux 内核:

2.6.35.13-91.fc14.x86_64

unixODBC: unixODBC.x86_64 2.2.14-12.fc14(来自 yum)

我什至无法运行高级调试或登录 php,因为一旦我在浏览器中访问该 URL,apache/php 就会退出。

我目前正在尝试看看我是否可以运行:

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

看看我是否可以暂时解决这个问题。如果需要的话,我很乐意分享任何其他内容。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雪若未夕 2024-12-05 16:56:18

我猜想这几乎可以肯定(假设您在 64 位平台上),因为您使用的 unixODBC 是使用 sizeof( SQLLEN ) == 4 构建的,这是 2.2.x 的默认值,并且 sizeof( SQLLEN ) = = 8 这是 2.3.x 构建的内容。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文