@@ -1354,13 +1354,20 @@ PHP_MINFO_FUNCTION(oci)
1354
1354
1355
1355
php_info_print_table_start ();
1356
1356
php_info_print_table_row (2 , "OCI8 Support" , "enabled" );
1357
+ #if defined(HAVE_OCI8_DTRACE )
1358
+ php_info_print_table_row (2 , "OCI8 DTrace Support" , "enabled" );
1359
+ #else
1360
+ php_info_print_table_row (2 , "OCI8 DTrace Support" , "disabled" );
1361
+ #endif
1357
1362
php_info_print_table_row (2 , "OCI8 Version" , PHP_OCI8_VERSION );
1358
1363
php_info_print_table_row (2 , "Revision" , "$Id$" );
1359
1364
1360
1365
#if ((OCI_MAJOR_VERSION > 10 ) || ((OCI_MAJOR_VERSION == 10 ) && (OCI_MINOR_VERSION >= 2 )))
1361
1366
php_oci_client_get_version (& ver TSRMLS_CC );
1362
1367
php_info_print_table_row (2 , "Oracle Run-time Client Library Version" , ver );
1363
1368
efree (ver );
1369
+ #else
1370
+ php_info_print_table_row (2 , "Oracle Run-time Client Library Version" , "Unknown" );
1364
1371
#endif
1365
1372
#if defined(OCI_MAJOR_VERSION ) && defined(OCI_MINOR_VERSION )
1366
1373
snprintf (buf , sizeof (buf ), "%d.%d" , OCI_MAJOR_VERSION , OCI_MINOR_VERSION );
@@ -1384,6 +1391,7 @@ PHP_MINFO_FUNCTION(oci)
1384
1391
#endif
1385
1392
#endif
1386
1393
1394
+
1387
1395
php_info_print_table_end ();
1388
1396
1389
1397
DISPLAY_INI_ENTRIES ();
@@ -1467,11 +1475,11 @@ static void php_oci_pconnection_list_np_dtor(zend_rsrc_list_entry *entry TSRMLS_
1467
1475
OCI_G (num_persistent )-- ;
1468
1476
}
1469
1477
1470
- #ifdef HAVE_DTRACE
1478
+ #ifdef HAVE_OCI8_DTRACE
1471
1479
if (DTRACE_OCI8_CONNECT_P_DTOR_CLOSE_ENABLED ()) {
1472
1480
DTRACE_OCI8_CONNECT_P_DTOR_CLOSE (connection );
1473
1481
}
1474
- #endif /* HAVE_DTRACE */
1482
+ #endif /* HAVE_OCI8_DTRACE */
1475
1483
} else {
1476
1484
/*
1477
1485
* Release the connection to underlying pool. We do this unconditionally so that
@@ -1484,11 +1492,11 @@ static void php_oci_pconnection_list_np_dtor(zend_rsrc_list_entry *entry TSRMLS_
1484
1492
*/
1485
1493
php_oci_connection_release (connection TSRMLS_CC );
1486
1494
1487
- #ifdef HAVE_DTRACE
1495
+ #ifdef HAVE_OCI8_DTRACE
1488
1496
if (DTRACE_OCI8_CONNECT_P_DTOR_RELEASE_ENABLED ()) {
1489
1497
DTRACE_OCI8_CONNECT_P_DTOR_RELEASE (connection );
1490
1498
}
1491
- #endif /* HAVE_DTRACE */
1499
+ #endif /* HAVE_OCI8_DTRACE */
1492
1500
}
1493
1501
}
1494
1502
/* }}} */
@@ -1687,11 +1695,11 @@ sb4 php_oci_error(OCIError *err_p, sword status TSRMLS_DC)
1687
1695
break ;
1688
1696
}
1689
1697
1690
- #ifdef HAVE_DTRACE
1698
+ #ifdef HAVE_OCI8_DTRACE
1691
1699
if (DTRACE_OCI8_ERROR_ENABLED ()) {
1692
1700
DTRACE_OCI8_ERROR (status , errcode );
1693
1701
}
1694
- #endif /* HAVE_DTRACE */
1702
+ #endif /* HAVE_OCI8_DTRACE */
1695
1703
1696
1704
return errcode ;
1697
1705
}
@@ -1771,23 +1779,23 @@ void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclus
1771
1779
return ;
1772
1780
}
1773
1781
1774
- #ifdef HAVE_DTRACE
1782
+ #ifdef HAVE_OCI8_DTRACE
1775
1783
if (DTRACE_OCI8_CONNECT_ENTRY_ENABLED ()) {
1776
1784
DTRACE_OCI8_CONNECT_ENTRY (username , dbname , charset , session_mode , persistent , exclusive );
1777
1785
}
1778
- #endif /* HAVE_DTRACE */
1786
+ #endif /* HAVE_OCI8_DTRACE */
1779
1787
1780
1788
if (!charset_len ) {
1781
1789
charset = NULL ;
1782
1790
}
1783
1791
1784
1792
connection = php_oci_do_connect_ex (username , username_len , password , password_len , NULL , 0 , dbname , dbname_len , charset , session_mode , persistent , exclusive TSRMLS_CC );
1785
1793
1786
- #ifdef HAVE_DTRACE
1794
+ #ifdef HAVE_OCI8_DTRACE
1787
1795
if (DTRACE_OCI8_CONNECT_RETURN_ENABLED ()) {
1788
1796
DTRACE_OCI8_CONNECT_RETURN (connection );
1789
1797
}
1790
- #endif /* HAVE_DTRACE */
1798
+ #endif /* HAVE_OCI8_DTRACE */
1791
1799
1792
1800
1793
1801
if (!connection ) {
@@ -1955,11 +1963,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
1955
1963
}
1956
1964
}
1957
1965
1958
- #ifdef HAVE_DTRACE
1966
+ #ifdef HAVE_OCI8_DTRACE
1959
1967
if (DTRACE_OCI8_CONNECT_LOOKUP_ENABLED ()) {
1960
1968
DTRACE_OCI8_CONNECT_LOOKUP (connection , connection && connection -> is_stub ? 1 : 0 );
1961
1969
}
1962
- #endif /* HAVE_DTRACE */
1970
+ #endif /* HAVE_OCI8_DTRACE */
1963
1971
1964
1972
/* If we got a pconnection stub, then 'load'(OCISessionGet) the real connection from its
1965
1973
* private spool A connection is a stub if it is only a cached structure and the real
@@ -2186,11 +2194,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
2186
2194
OCI_G (num_links )++ ;
2187
2195
}
2188
2196
2189
- #ifdef HAVE_DTRACE
2197
+ #ifdef HAVE_OCI8_DTRACE
2190
2198
if (DTRACE_OCI8_CONNECT_TYPE_ENABLED ()) {
2191
2199
DTRACE_OCI8_CONNECT_TYPE (connection -> is_persistent ? 1 : 0 , exclusive ? 1 : 0 , connection , OCI_G (num_persistent ), OCI_G (num_links ));
2192
2200
}
2193
- #endif /* HAVE_DTRACE */
2201
+ #endif /* HAVE_OCI8_DTRACE */
2194
2202
2195
2203
return connection ;
2196
2204
}
@@ -2773,11 +2781,11 @@ static int php_oci_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC)
2773
2781
connection = (php_oci_connection * )le -> ptr ;
2774
2782
2775
2783
if (!connection -> used_this_request && OCI_G (persistent_timeout ) != -1 ) {
2776
- #ifdef HAVE_DTRACE
2784
+ #ifdef HAVE_OCI8_DTRACE
2777
2785
if (DTRACE_OCI8_CONNECT_EXPIRY_ENABLED ()) {
2778
2786
DTRACE_OCI8_CONNECT_EXPIRY (connection , connection -> is_stub ? 1 : 0 , connection -> idle_expiry , timestamp );
2779
2787
}
2780
- #endif /* HAVE_DTRACE */
2788
+ #endif /* HAVE_OCI8_DTRACE */
2781
2789
if (connection -> idle_expiry < timestamp ) {
2782
2790
/* connection has timed out */
2783
2791
return ZEND_HASH_APPLY_REMOVE ;
@@ -2913,11 +2921,11 @@ static php_oci_spool *php_oci_create_spool(char *username, int username_len, cha
2913
2921
PHP_OCI_CALL (OCIHandleFree , ((dvoid * ) spoolAuth , (ub4 ) OCI_HTYPE_AUTHINFO ));
2914
2922
}
2915
2923
2916
- #ifdef HAVE_DTRACE
2924
+ #ifdef HAVE_OCI8_DTRACE
2917
2925
if (DTRACE_OCI8_SESSPOOL_CREATE_ENABLED ()) {
2918
2926
DTRACE_OCI8_SESSPOOL_CREATE (session_pool );
2919
2927
}
2920
- #endif /* HAVE_DTRACE */
2928
+ #endif /* HAVE_OCI8_DTRACE */
2921
2929
2922
2930
return session_pool ;
2923
2931
}
@@ -3241,11 +3249,11 @@ static int php_oci_create_session(php_oci_connection *connection, php_oci_spool
3241
3249
connection -> using_spool = 1 ;
3242
3250
}
3243
3251
3244
- #ifdef HAVE_DTRACE
3252
+ #ifdef HAVE_OCI8_DTRACE
3245
3253
if (DTRACE_OCI8_SESSPOOL_TYPE_ENABLED ()) {
3246
3254
DTRACE_OCI8_SESSPOOL_TYPE (session_pool ? 1 : 0 , session_pool ? session_pool : connection -> private_spool );
3247
3255
}
3248
- #endif /* HAVE_DTRACE */
3256
+ #endif /* HAVE_OCI8_DTRACE */
3249
3257
3250
3258
/* The passed in "connection" can be a cached stub from plist or freshly created. In the former
3251
3259
* case, we do not have to allocate any handles
@@ -3294,15 +3302,15 @@ static int php_oci_create_session(php_oci_connection *connection, php_oci_spool
3294
3302
/* }}} */
3295
3303
3296
3304
/* {{{ Debug statements */
3297
- #ifdef HAVE_DTRACE
3305
+ #ifdef HAVE_OCI8_DTRACE
3298
3306
if (DTRACE_OCI8_SESSPOOL_STATS_ENABLED ()) {
3299
3307
ub4 numfree = 0 , numbusy = 0 , numopen = 0 ;
3300
3308
PHP_OCI_CALL_RETURN (OCI_G (errcode ), OCIAttrGet , ((dvoid * )actual_spool -> poolh , OCI_HTYPE_SPOOL , (dvoid * )& numopen , (ub4 * )0 , OCI_ATTR_SPOOL_OPEN_COUNT , OCI_G (err )));
3301
3309
PHP_OCI_CALL_RETURN (OCI_G (errcode ), OCIAttrGet , ((dvoid * )actual_spool -> poolh , OCI_HTYPE_SPOOL , (dvoid * )& numbusy , (ub4 * )0 , OCI_ATTR_SPOOL_BUSY_COUNT , OCI_G (err )));
3302
3310
numfree = numopen - numbusy ; /* number of free connections in the pool */
3303
3311
DTRACE_OCI8_SESSPOOL_STATS (numfree , numbusy , numopen );
3304
3312
}
3305
- #endif /* HAVE_DTRACE */
3313
+ #endif /* HAVE_OCI8_DTRACE */
3306
3314
/* }}} */
3307
3315
3308
3316
/* Ping loop: Ping and loop till we get a good connection. When a database instance goes
@@ -3471,11 +3479,11 @@ static sword php_oci_ping_init(php_oci_connection *connection, OCIError *errh TS
3471
3479
*/
3472
3480
void php_oci_dtrace_check_connection (php_oci_connection * connection , sword errcode , ub4 serverStatus )
3473
3481
{
3474
- #ifdef HAVE_DTRACE
3482
+ #ifdef HAVE_OCI8_DTRACE
3475
3483
if (DTRACE_OCI8_CHECK_CONNECTION_ENABLED ()) {
3476
3484
DTRACE_OCI8_CHECK_CONNECTION (connection , connection && connection -> is_open ? 1 : 0 , (int )errcode , (unsigned long )serverStatus );
3477
3485
}
3478
- #endif /* HAVE_DTRACE */
3486
+ #endif /* HAVE_OCI8_DTRACE */
3479
3487
}
3480
3488
/* }}} */
3481
3489
0 commit comments