static char *php_optarg = NULL;
static int php_optind = 1;
+static zend_module_entry cgi_module_entry;
static const opt_struct OPTIONS[] = {
{'a', 0, "interactive"},
static int php_cgi_startup(sapi_module_struct *sapi_module)
{
- if (php_module_startup(sapi_module, NULL, 0) == FAILURE) {
+ if (php_module_startup(sapi_module, &cgi_module_entry, 1) == FAILURE) {
return FAILURE;
}
return SUCCESS;
cgi_sapi_module.additional_functions = additional_functions;
/* startup after we get the above ini override se we get things right */
- if (php_module_startup(&cgi_sapi_module, &cgi_module_entry, 1) == FAILURE) {
+ if (cgi_sapi_module.startup(&cgi_sapi_module) == FAILURE) {
#ifdef ZTS
tsrm_shutdown();
#endif
#endif
/* startup after we get the above ini override se we get things right */
- if (php_module_startup(&cli_sapi_module, NULL, 0)==FAILURE) {
+ if (cli_sapi_module.startup(&cli_sapi_module)==FAILURE) {
/* there is no way to see if we must call zend_ini_deactivate()
* since we cannot check if EG(ini_directives) has been initialised
* because the executor's constructor does not set initialize it.