php_main.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Authors: Andi Gutmans <andi@php.net> |
  14. | Zeev Suraski <zeev@php.net> |
  15. +----------------------------------------------------------------------+
  16. */
  17. #ifndef PHP_MAIN_H
  18. #define PHP_MAIN_H
  19. #include "zend_globals.h"
  20. #include "php_globals.h"
  21. #include "SAPI.h"
  22. BEGIN_EXTERN_C()
  23. PHPAPI int php_request_startup(void);
  24. PHPAPI void php_request_shutdown(void *dummy);
  25. PHPAPI int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint32_t num_additional_modules);
  26. PHPAPI void php_module_shutdown(void);
  27. PHPAPI int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals);
  28. PHPAPI int php_register_extensions(zend_module_entry * const * ptr, int count);
  29. PHPAPI int php_execute_script(zend_file_handle *primary_file);
  30. PHPAPI int php_execute_simple_script(zend_file_handle *primary_file, zval *ret);
  31. PHPAPI int php_handle_special_queries(void);
  32. PHPAPI int php_lint_script(zend_file_handle *file);
  33. PHPAPI void php_handle_aborted_connection(void);
  34. PHPAPI int php_handle_auth_data(const char *auth);
  35. PHPAPI void php_html_puts(const char *str, size_t siz);
  36. PHPAPI int php_stream_open_for_zend_ex(zend_file_handle *handle, int mode);
  37. /* environment module */
  38. extern int php_init_environ(void);
  39. extern int php_shutdown_environ(void);
  40. #ifdef ZTS
  41. PHPAPI void php_reserve_tsrm_memory(void);
  42. PHPAPI int php_tsrm_startup(void);
  43. #endif
  44. END_EXTERN_C()
  45. #endif