Daen Posted May 4, 2006 Share Posted May 4, 2006 I'm running XAMPP on my machine (localhost), and Oracle on another server: ApacheFriends XAMPP (basic package) version 1.5.2 + Apache 2.2.0 + PHP 5.1.2 + PHP 4.4.2-pl1 + PEAROk, here's my code:test.php:[code]<?php include('include/connectORA.php'); echo "<html>\n<body>\n"; echo "Attempting to connect to Oracle database.<br>\n"; $conn1 = connectORA(); if(!$conn1) echo "Error connecting to database.<br>\n"; else echo "Successful!<br>\n"; echo "<br>Attempting to select data from database.<br>\n"; $table = "PERSON"; $sql = "SELECT * FROM ".$table; $stmt = oci_parse($conn1, $sql); // <-- has problem right here oci_execute($stmt); echo "Results: <br>\n"; $row = oci_fetch_assoc($stmt); print_r($row); echo "</body>\n</html>";?>[/code]connectORA.php[code]<?php function connectORA() { $db = "MYNAME"; return ocilogon("mydb", "mypass", $db); }?>[/code]When I run it in Firefox, Apache gives me the following error "Apache HTTP Server has encountered a problem and needs to close." Then it tells me that the document has no data in it, and Apache keeps running afterward. Kinda strange it tells me it crashed, and then doesn't.If I comment out the lines after $sql = "..."; then it works just fine, and I even get a connection successful notice. If I uncomment oci_parse(), then it gives me the error again. Does anybody know what might be causing this?Am I maybe getting a bad connection, even though $conn1 isn't null?I appreciate any help. Quote Link to comment https://forums.phpfreaks.com/topic/9094-fatal-error-on-oci_parse/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.