|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-10-26 00:42 UTC] nick dot saraniti at gmail dot com
-Package: PDO OCI
+Package: Oracle related
[2015-10-26 00:42 UTC] nick dot saraniti at gmail dot com
[2015-10-26 03:17 UTC] laruence@php.net
-Assigned To:
+Assigned To: sixd
[2015-11-02 19:28 UTC] sixd@php.net
-Status: Assigned
+Status: Feedback
-Package: Oracle related
+Package: OCI8 related
[2015-11-02 19:28 UTC] sixd@php.net
[2015-11-02 21:16 UTC] nick dot saraniti at gmail dot com
[2015-11-08 20:39 UTC] sixd@php.net
[2015-11-22 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
Description: ------------ PHP 7RC5 Centos 6.7 Oracle Instaclient 12.1 (from rpm) Apache/2.2.15 If you uncomment the oci_free_results() in the code below apache will segfault. If you only call oci_free_results() once, it does not. Test script: --------------- <?php $SETTINGS_DB_username = "xxxxx"; $SETTINGS_DB_password = "xxxxx"; $SETTINGS_DB_ip = "10.10.10.202/XX"; // Connection String if (!isset ($dbConx)) { $dbConx = oci_pconnect ( "$SETTINGS_DB_username", "$SETTINGS_DB_password", "$SETTINGS_DB_ip" ); } function ORACLE_GET_MONTH() { $SQL="SELECT TRUNC(SYSDATE, 'MONTH') AS MONTH FROM DUAL"; $stmt = oci_parse ( $GLOBALS ['dbConx'], $SQL ); oci_execute ( $stmt, OCI_DEFAULT ); $result = oci_fetch_assoc ( $stmt ); return $result['MONTH']; //oci_free_statement ( $stmt ); } function ORACLE_GET_YEAR() { $SQL="SELECT TRUNC(SYSDATE, 'YEAR') AS YEAR FROM DUAL"; $stmt = oci_parse ( $GLOBALS ['dbConx'], $SQL ); oci_execute ( $stmt, OCI_DEFAULT ); $result = oci_fetch_assoc ( $stmt ); return $result['YEAR']; //oci_free_statement ( $stmt ); } $oci_month=ORACLE_GET_MONTH(); $oci_year=ORACLE_GET_YEAR(); echo "Month: $oci_month<br />"; echo "Year: $oci_year<br />";