@@ -1590,39 +1590,8 @@ static void sigchld_handler(int apar)
1590
1590
/* }}} */
1591
1591
#endif
1592
1592
1593
- /* {{{ php_start_sapi()
1594
- */
1595
- static int php_start_sapi (void )
1596
- {
1597
- int retval = SUCCESS ;
1598
-
1599
- if (!SG (sapi_started )) {
1600
- zend_try {
1601
- PG (during_request_startup ) = 1 ;
1602
-
1603
- /* initialize global variables */
1604
- PG (modules_activated ) = 0 ;
1605
- PG (header_is_being_sent ) = 0 ;
1606
- PG (connection_status ) = PHP_CONNECTION_NORMAL ;
1607
-
1608
- zend_activate ();
1609
- zend_set_timeout (EG (timeout_seconds ), 1 );
1610
- zend_activate_modules ();
1611
- PG (modules_activated )= 1 ;
1612
- } zend_catch {
1613
- retval = FAILURE ;
1614
- } zend_end_try ();
1615
-
1616
- SG (sapi_started ) = 1 ;
1617
- }
1618
- return retval ;
1619
- }
1620
-
1621
- /* }}} */
1622
-
1623
1593
/* {{{ php_request_startup
1624
1594
*/
1625
- #ifndef APACHE_HOOKS
1626
1595
int php_request_startup (void )
1627
1596
{
1628
1597
int retval = SUCCESS ;
@@ -1702,61 +1671,6 @@ int php_request_startup(void)
1702
1671
1703
1672
return retval ;
1704
1673
}
1705
- # else
1706
- int php_request_startup (void )
1707
- {
1708
- int retval = SUCCESS ;
1709
-
1710
- zend_interned_strings_activate ();
1711
-
1712
- #if PHP_SIGCHILD
1713
- signal (SIGCHLD , sigchld_handler );
1714
- #endif
1715
-
1716
- if (php_start_sapi () == FAILURE ) {
1717
- return FAILURE ;
1718
- }
1719
-
1720
- php_output_activate ();
1721
- sapi_activate ();
1722
- php_hash_environment ();
1723
-
1724
- zend_try {
1725
- PG (during_request_startup ) = 1 ;
1726
- if (PG (expose_php )) {
1727
- sapi_add_header (SAPI_PHP_VERSION_HEADER , sizeof (SAPI_PHP_VERSION_HEADER )- 1 , 1 );
1728
- }
1729
- } zend_catch {
1730
- retval = FAILURE ;
1731
- } zend_end_try ();
1732
-
1733
- return retval ;
1734
- }
1735
- # endif
1736
- /* }}} */
1737
-
1738
- /* {{{ php_request_startup_for_hook
1739
- */
1740
- int php_request_startup_for_hook (void )
1741
- {
1742
- int retval = SUCCESS ;
1743
-
1744
- zend_interned_strings_activate ();
1745
-
1746
- #if PHP_SIGCHLD
1747
- signal (SIGCHLD , sigchld_handler );
1748
- #endif
1749
-
1750
- if (php_start_sapi () == FAILURE ) {
1751
- return FAILURE ;
1752
- }
1753
-
1754
- php_output_activate ();
1755
- sapi_activate_headers_only ();
1756
- php_hash_environment ();
1757
-
1758
- return retval ;
1759
- }
1760
1674
/* }}} */
1761
1675
1762
1676
/* {{{ php_request_shutdown_for_exec
@@ -1771,60 +1685,6 @@ void php_request_shutdown_for_exec(void *dummy)
1771
1685
}
1772
1686
/* }}} */
1773
1687
1774
- /* {{{ php_request_shutdown_for_hook
1775
- */
1776
- void php_request_shutdown_for_hook (void * dummy )
1777
- {
1778
-
1779
- if (PG (modules_activated )) zend_try {
1780
- php_call_shutdown_functions ();
1781
- } zend_end_try ();
1782
-
1783
- if (PG (modules_activated )) {
1784
- zend_deactivate_modules ();
1785
- }
1786
-
1787
- if (PG (modules_activated )) {
1788
- php_free_shutdown_functions ();
1789
- }
1790
-
1791
- zend_try {
1792
- zend_unset_timeout ();
1793
- } zend_end_try ();
1794
-
1795
- zend_try {
1796
- int i ;
1797
-
1798
- for (i = 0 ; i < NUM_TRACK_VARS ; i ++ ) {
1799
- zval_ptr_dtor (& PG (http_globals )[i ]);
1800
- }
1801
- } zend_end_try ();
1802
-
1803
- zend_deactivate ();
1804
-
1805
- zend_try {
1806
- sapi_deactivate ();
1807
- } zend_end_try ();
1808
-
1809
- zend_try {
1810
- php_shutdown_stream_hashes ();
1811
- } zend_end_try ();
1812
-
1813
- zend_interned_strings_deactivate ();
1814
-
1815
- zend_try {
1816
- shutdown_memory_manager (CG (unclean_shutdown ), 0 );
1817
- } zend_end_try ();
1818
-
1819
- #ifdef ZEND_SIGNALS
1820
- zend_try {
1821
- zend_signal_deactivate ();
1822
- } zend_end_try ();
1823
- #endif
1824
- }
1825
-
1826
- /* }}} */
1827
-
1828
1688
/* {{{ php_request_shutdown
1829
1689
*/
1830
1690
void php_request_shutdown (void * dummy )
0 commit comments