|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-03-29 11:01 UTC] steve dot cersosimo at bellsouth dot com
Description:
------------
I currently have my Oracle 8 environment set up properly as far as I can tell. With the simple code below, I do not understand why PHP is exiting with a 255. I think it should exit with a 0 status. In other cases I get a segmentation fault, but I believe if the problem here is solved, the seg fault will go away.
Interestingly, the connection works fine, I can query and update perfectly. This is causing me problems when it generates a segmentation fault and dumps that string to the browser.
Reproduce code:
---------------
# cat ocitest
#!/usr/local/bin/php
<?php
error_reporting(E_ALL);
$db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
(HOST = 172.16.0.153)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=SPEED.WORLD)))";
$connection = oci_connect("speed", "pass", $db);
var_dump($connection);
?>
# ocitest
resource(6) of type (oci8 connection)
# echo $?
255
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 18:00:01 2025 UTC |
I think the problem was somewhere in the OCI8 stuff. Here are my results from a few tests. # cat clitest #!/usr/local/bin/php <?php ?> # clitest # echo $? 0 # cat clitest2 #!/home/software/apps/php5-STABLE-200503291430/sapi/cli/php <?php ?> # clitest2 # echo $? 0 # cat ocitest #!/usr/local/bin/php <?php error_reporting(E_ALL); $db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST = 172.16.0.153)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=SPEED.WORLD)))"; $connection = oci_connect("speed", "pass", $db); var_dump($connection); ?> # ocitest resource(6) of type (oci8 connection) # echo $? 255 # cat ocitest2 #!/home/software/apps/php5-STABLE-200503291430/sapi/cli/php <?php error_reporting(E_ALL); $db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST = 172.16.0.153)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=SPEED.WORLD)))"; $connection = oci_connect("speed", "pass", $db); var_dump($connection); ?> # ocitest2 resource(6) of type (oci8 connection) # echo $? 0 Both of the first 2 tests exited with a 0 status, while the OCI8 test was only successful with the newly compiled PHP.