ID: 31222 User updated by: amonw at hotmail dot com Reported By: amonw at hotmail dot com -Status: Feedback +Status: Open Bug Type: OCI8 related Operating System: redhat linux 7.2 PHP Version: 4.3.10 New Comment:
I tried compiling oci8 statically and it produced the same result. I'm building a test system. After I finish it, I'll send you a telnet account to test, if you're willing to. Previous Comments: ------------------------------------------------------------------------ [2004-12-21 15:05:16] [EMAIL PROTECTED] Yes, I tried to run exactly your code, with one modification: I changed login & password. 4.2.2 is too old to talk about, try PHP 5.0.3 instead, if you can. Also, it would be nice if you try to compile OCI8 module statically and to run the same code with it. ------------------------------------------------------------------------ [2004-12-21 14:56:44] amonw at hotmail dot com Thanks for your trying and reply. I tried php-cli and it print the same result plus a new line with some blanks and no records was deleted either. And I tried php 4.2.2 on the other machine connected to oracle 8.1.7,php 4.3.10 connected to oracle 9.2.0.1.0,php 4.2.2 connected to oracle 9.2.0.1.0. They all produced the same result. Except that when I used php-cli 4.2.2, it also printed "Segmentation fault" at the end. Are you sure you used exactly the same code as I quoted? As I mentioned, even some minor changes which seem not relevant may affect the result. Thank you again for your quick response. ------------------------------------------------------------------------ [2004-12-21 10:48:21] [EMAIL PROTECTED] I can't reproduce it with any of PHP versions and Oracle 9.2. Did you try to run this code using PHP-CLI? Does it work for you? ------------------------------------------------------------------------ [2004-12-21 08:31:53] amonw at hotmail dot com Description: ------------ ocicommit not working in the following code when connected to oracle 8.1.7 . The oddest thing is I can avoid this by doing any one of the following: 1. don't use the user defined function "query", and used it's content to replace the function calls or 2. use different veriable name for the two connections or 3. use different veriable name for the two query results or 4. add $statement=anything or unset($statement) before the second "$statement=query($c,$sql)" configure command(from phpinfo()): './configure' '--with-apxs' '--with-gd' '--with-oci8=shared' '--with-zlib' '--with-jpeg-dir' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-ttf' '--enable-ftp' Reproduce code: --------------- <?php function query($conn,$sqlstr) { $statement=ociparse($conn,$sqlstr); ociexecute($statement,OCI_DEFAULT); return $statement; } dl('oci8.so'); $c=ocilogon('user','pwd'); $sql="select sysdate from dual"; $statement=query($c,$sql); $c=ocilogon('user','pwd'); $sql="delete from info_user where device_number='1234567890'"; $statement=query($c,$sql); if(!ocicommit($c)) { $error = OCIError($c); echo 'Commit failed. Oracle reports: ' . $error['message']; } print("$sql :".ocirowcount($statement).' records updated.'); ?> Expected result: ---------------- Prints out "delete from info_user where device_number='1234567890' :x records deleted" and all records with device_number='1234567890' should be deleted. Actual result: -------------- Prints out "delete from info_user where device_number='1234567890' :x records deleted" but no records was deleted. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31222&edit=1