#include "tls.h"
#endif
#include "php.h"
+#include "php_globals.h"
#include <stdio.h>
#include <stdlib.h>
# endif
#endif
-char *
-tempnam(const char *dir, const char *pfx)
+
+char *tempnam(const char *dir, const char *pfx)
{
int save_errno;
char *f, *name;
}
#endif
+
function_entry php3_file_functions[] = {
{"pclose", php3_pclose, NULL},
{"popen", php3_popen, NULL},
"PHP_file", php3_file_functions, php3_minit_file, NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
};
+
/* {{{ proto array get_meta_tags(string filename [, int use_include_path])
Extracts all meta tag content attributes from a file and returns an array */
-void php3_get_meta_tags(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_get_meta_tags(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *filename, *arg2;
FILE *fp;
char buf[8192];
/* check args */
switch (ARG_COUNT(ht)) {
- case 1:
- if (getParameters(ht,1,&filename) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- break;
- case 2:
- if (getParameters(ht,2,&filename,&arg2) == FAILURE) {
+ case 1:
+ if (getParameters(ht,1,&filename) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ break;
+ case 2:
+ if (getParameters(ht,2,&filename,&arg2) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_long(arg2);
+ use_include_path = arg2->value.lval;
+ break;
+ default:
WRONG_PARAM_COUNT;
- }
- convert_to_long(arg2);
- use_include_path = arg2->value.lval;
- break;
- default:
- WRONG_PARAM_COUNT;
}
convert_to_string(filename);
}
/* }}} */
+
/* {{{ proto array file(string filename)
Read entire file into an array */
-void php3_file(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_file(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *filename, *arg2;
FILE *fp;
char *slashed, buf[8192];
/* check args */
switch (ARG_COUNT(ht)) {
- case 1:
- if (getParameters(ht,1,&filename) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- break;
- case 2:
- if (getParameters(ht,2,&filename,&arg2) == FAILURE) {
+ case 1:
+ if (getParameters(ht,1,&filename) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ break;
+ case 2:
+ if (getParameters(ht,2,&filename,&arg2) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_long(arg2);
+ use_include_path = arg2->value.lval;
+ break;
+ default:
WRONG_PARAM_COUNT;
- }
- convert_to_long(arg2);
- use_include_path = arg2->value.lval;
- break;
- default:
- WRONG_PARAM_COUNT;
}
convert_to_string(filename);
static void __pclose(FILE *pipe)
{
-TLS_VARS;
GLOBAL(pclose_ret) = pclose(pipe);
}
+
static void _php3_closesocket(int *sock) {
int socketd=*sock;
if (socketd){
}
}
-static void _php3_unlink_uploaded_file(char *file) {
+
+static void _php3_unlink_uploaded_file(char *file)
+{
if(file) {
unlink(file);
}
}
+
int php3_minit_file(INIT_FUNC_ARGS)
{
- TLS_VARS;
-
GLOBAL(le_fp) = register_list_destructors(fclose,NULL);
GLOBAL(le_pp) = register_list_destructors(__pclose,NULL);
GLOBAL(wsa_fp) = register_list_destructors(_php3_closesocket,NULL);
return SUCCESS;
}
+
/* {{{ proto string tempnam(string dir, string prefix)
Create a unique filename in a directory */
-void php3_tempnam(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_tempnam(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1, *arg2;
char *d;
char *t;
char p[64];
- TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int fopen(string filename, string mode [, int use_include_path])
Open a file or a URL and return a file pointer */
-void php3_fopen(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_fopen(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1, *arg2, *arg3;
FILE *fp;
char *p;
int id;
int use_include_path = 0;
int issock=0, socketd=0;
- TLS_VARS;
switch(ARG_COUNT(ht)) {
- case 2:
- if (getParameters(ht,2,&arg1,&arg2) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- break;
- case 3:
- if (getParameters(ht,3,&arg1,&arg2,&arg3) == FAILURE) {
+ case 2:
+ if (getParameters(ht,2,&arg1,&arg2) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ break;
+ case 3:
+ if (getParameters(ht,3,&arg1,&arg2,&arg3) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_long(arg3);
+ use_include_path = arg3->value.lval;
+ break;
+ default:
WRONG_PARAM_COUNT;
- }
- convert_to_long(arg3);
- use_include_path = arg3->value.lval;
- break;
- default:
- WRONG_PARAM_COUNT;
}
convert_to_string(arg1);
convert_to_string(arg2);
}
/* }}} */
+
/* {{{ proto int fclose(int fp)
Close an open file pointer */
-void php3_fclose(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_fclose(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1;
int id, type;
FILE *fp;
- TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int popen(string command, string mode)
Execute a command and open either a read or a write pipe to it */
-void php3_popen(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_popen(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1, *arg2;
FILE *fp;
int id;
char *p;
char *b, buf[1024];
- TLS_VARS;
+ PLS_FETCH();
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
convert_to_string(arg2);
p = estrndup(arg2->value.str.val,arg2->value.str.len);
if (PG(safe_mode)){
- b = strchr(arg1->value.str.val,' ');
- if (!b) {
- b = strrchr(arg1->value.str.val,'/');
- } else {
- char *c;
- c = arg1->value.str.val;
- while((*b!='/')&&(b!=c)) b--;
- if (b==c) b=NULL;
- }
- if (b) {
- snprintf(buf,sizeof(buf),"%s%s",PG(safe_mode_exec_dir),b);
- } else {
- snprintf(buf,sizeof(buf),"%s/%s",PG(safe_mode_exec_dir),arg1->value.str.val);
- }
- fp = popen(buf,p);
- if (!fp) {
- php3_error(E_WARNING,"popen(\"%s\",\"%s\") - %s",buf,p,strerror(errno));
- RETURN_FALSE;
- }
+ b = strchr(arg1->value.str.val,' ');
+ if (!b) {
+ b = strrchr(arg1->value.str.val,'/');
+ } else {
+ char *c;
+ c = arg1->value.str.val;
+ while((*b!='/')&&(b!=c)) {
+ b--;
+ }
+ if (b==c) {
+ b=NULL;
+ }
+ }
+ if (b) {
+ snprintf(buf,sizeof(buf),"%s%s",PG(safe_mode_exec_dir),b);
+ } else {
+ snprintf(buf,sizeof(buf),"%s/%s",PG(safe_mode_exec_dir),arg1->value.str.val);
+ }
+ fp = popen(buf,p);
+ if (!fp) {
+ php3_error(E_WARNING,"popen(\"%s\",\"%s\") - %s",buf,p,strerror(errno));
+ RETURN_FALSE;
+ }
} else {
- fp = popen(arg1->value.str.val,p);
- if (!fp) {
- php3_error(E_WARNING,"popen(\"%s\",\"%s\") - %s",arg1->value.str.val,p,strerror(errno));
- efree(p);
- RETURN_FALSE;
- }
+ fp = popen(arg1->value.str.val,p);
+ if (!fp) {
+ php3_error(E_WARNING,"popen(\"%s\",\"%s\") - %s",arg1->value.str.val,p,strerror(errno));
+ efree(p);
+ RETURN_FALSE;
+ }
}
-/* #endif */
id = php3_list_insert(fp,GLOBAL(le_pp));
efree(p);
RETURN_LONG(id);
}
/* }}} */
+
/* {{{ proto int pclose(int fp)
Close a file pointer opened by popen() */
-void php3_pclose(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_pclose(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1;
int id,type;
FILE *fp;
- TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int feof(int fp)
Test for end-of-file on a file pointer */
-void php3_feof(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_feof(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1;
FILE *fp;
int id, type;
int issock=0;
int socketd=0, *sock;
unsigned int temp;
- TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int set_socket_blocking(int socket descriptor, int mode)
Set blocking/non-blocking mode on a socket */
void php3_set_socket_blocking(INTERNAL_FUNCTION_PARAMETERS)
int id, type, block;
int flags;
int socketd=0, *sock;
- TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
#endif
+
/* {{{ proto string fgets(int fp, int length)
Get a line from file pointer */
void php3_fgets(INTERNAL_FUNCTION_PARAMETERS)
}
/* }}} */
+
/* {{{ proto string fgetc(int fp)
Get a character from file pointer */
void php3_fgetc(INTERNAL_FUNCTION_PARAMETERS) {
char *buf;
int issock=0;
int *sock, socketd=0;
- TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* Strip any HTML tags while reading */
/* {{{ proto string fgetss(int fp, int length)
Get a line from file pointer and strip HTML tags */
char *buf, *p, *rbuf, *rp, c, lc;
int issock=0;
int *sock,socketd=0;
- TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &fd, &bytes) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int fwrite(int fp, string str [, int length])
Binary-safe file write */
void php3_fwrite(INTERNAL_FUNCTION_PARAMETERS)
}
/* }}} */
+
/* {{{ proto int rewind(int fp)
Rewind the position of a file pointer */
-void php3_rewind(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_rewind(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1;
int id,type;
FILE *fp;
- TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int ftell(int fp)
Get file pointer's read/write position */
-void php3_ftell(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_ftell(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1;
int id, type;
long pos;
FILE *fp;
- TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int fseek(int fp, int offset)
Seek on a file pointer */
-void php3_fseek(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_fseek(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1, *arg2;
int ret,id,type;
long pos;
FILE *fp;
- TLS_VARS;
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int mkdir(string pathname, int mode)
Create a directory */
-void php3_mkdir(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_mkdir(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1, *arg2;
int ret,mode;
- TLS_VARS;
+ PLS_FETCH();
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int rmdir(string dirname)
Remove a directory */
-void php3_rmdir(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_rmdir(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1;
int ret;
- TLS_VARS;
+ PLS_FETCH();
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int readfile(string filename [, int use_include_path])
Output a file or a URL */
-void php3_readfile(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_readfile(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1, *arg2;
char buf[8192];
FILE *fp;
int b, size;
int use_include_path = 0;
-
int issock=0, socketd=0;
- TLS_VARS;
/* check args */
switch (ARG_COUNT(ht)) {
}
/* }}} */
+
/* {{{ proto int umask([int mask])
Return or change the umask */
-void php3_fileumask(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_fileumask(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1;
int oldumask;
int arg_count = ARG_COUNT(ht);
- TLS_VARS;
oldumask = umask(077);
}
/* }}} */
+
/*
* Read to EOF on a file descriptor and write the output to stdout.
*/
/* {{{ proto int fpassthru(int fp)
Output all remaining data from a file pointer */
-void php3_fpassthru(INTERNAL_FUNCTION_PARAMETERS) {
+void php3_fpassthru(INTERNAL_FUNCTION_PARAMETERS)
+{
pval *arg1;
FILE *fp;
char buf[8192];
int id, size, b, type;
int issock=0;
int socketd=0, *sock;
- TLS_VARS;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int rename(string old_name, string new_name)
Rename a file */
-void php3_rename(INTERNAL_FUNCTION_PARAMETERS) {
- pval *OLD, *NEW;
- char *old, *new;
+void php3_rename(INTERNAL_FUNCTION_PARAMETERS)
+{
+ pval *old_arg, *new_arg;
+ char *old_name, *new_name;
int ret;
- TLS_VARS;
+ PLS_FETCH();
- if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &OLD, &NEW) == FAILURE) {
+ if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &old_arg, &new_arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
- convert_to_string(OLD);
- convert_to_string(NEW);
+ convert_to_string(old_arg);
+ convert_to_string(new_arg);
- old = OLD->value.str.val;
- new = NEW->value.str.val;
+ old_name = old_arg->value.str.val;
+ new_name = new_arg->value.str.val;
- if (PG(safe_mode) &&(!_php3_checkuid(old,2))) {
+ if (PG(safe_mode) &&(!_php3_checkuid(old_name, 2))) {
RETURN_FALSE;
}
- ret = rename(old, new);
+ ret = rename(old_name, new_name);
if (ret == -1) {
php3_error(E_WARNING,
}
/* }}} */
+
/* {{{ proto int copy(string source_file, string destination_file)
Copy a file */
void php3_file_copy(INTERNAL_FUNCTION_PARAMETERS)
pval *source, *target;
char buffer[8192];
int fd_s,fd_t,read_bytes;
- TLS_VARS;
+ PLS_FETCH();
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &source, &target) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* }}} */
+
/* {{{ proto int fread(int fp, int length)
Binary-safe file read */
void php3_fread(INTERNAL_FUNCTION_PARAMETERS)
}
/* }}} */
+
/* aparently needed for pdf to be compiled as a module under windows */
-PHPAPI int php3i_get_le_fp(void){
- TLS_VARS;
+PHPAPI int php3i_get_le_fp(void)
+{
return GLOBAL(le_fp);
}
#include "getopt.h"
#endif
-#ifdef ZTS
-int compiler_globals_id;
-int executor_globals_id;
-#endif
#ifndef ZTS
php_core_globals core_globals;
+#else
+int core_globals_id;
#endif
void _php3_build_argv(char * ELS_DC);
char buffer[1024];
int size = 0;
ELS_FETCH();
+ PLS_FETCH();
if (!(type & E_CORE)) {
if (!GLOBAL(initialized)) { /* don't display further errors after php3_request_shutdown() */
void php3_set_time_limit(INTERNAL_FUNCTION_PARAMETERS)
{
pval *new_timeout;
+ PLS_FETCH();
if (PG(safe_mode)) {
php3_error(E_WARNING, "Cannot set time limit in safe mode");
static void php_message_handler_for_zend(long message, void *data)
{
switch (message) {
- case ZMSG_ENABLE_TRACK_VARS:
- PG(track_vars) = 1;
+ case ZMSG_ENABLE_TRACK_VARS: {
+ PLS_FETCH();
+
+ PG(track_vars) = 1;
+ }
break;
case ZMSG_FAILED_INCLUDE_FOPEN:
php3_error(E_WARNING, "Failed opening '%s' for inclusion", php3_strip_url_passwd((char *) data));
}
-int php3_request_startup(CLS_D ELS_DC)
+int php3_request_startup(CLS_D ELS_DC PLS_DC)
{
zend_output_startup();
+
#if APACHE && defined(CRASH_DETECTION)
{
char log_message[256];
}
-static int php3_config_ini_startup(ELS_D)
+static int php3_config_ini_startup()
{
if (php3_init_config() == FAILURE) {
php3_printf("PHP: Unable to parse configuration file.\n");
#endif
}
-int php3_module_startup(CLS_D ELS_DC)
+
+int php3_module_startup()
{
zend_utility_functions zuf;
zend_utility_values zuv;
int module_number=0; /* for REGISTER_INI_ENTRIES() */
+#ifdef ZTS
+ php_core_globals *core_globals;
+#endif
#if (WIN32|WINNT) && !(USE_SAPI)
WORD wVersionRequested;
zend_startup(&zuf, NULL);
+#ifdef ZTS
+ core_globals_id = ts_allocate_id(sizeof(php_core_globals), NULL, NULL);
+ core_globals = ts_resource(core_globals_id);
+#endif
+
#if HAVE_SETLOCALE
setlocale(LC_CTYPE, "");
#endif
- EG(error_reporting) = E_ALL;
-
#if (WIN32|WINNT) && !(USE_SAPI)
/* start up winsock services */
if (WSAStartup(wVersionRequested, &wsaData) != 0) {
le_index_ptr = _register_list_destructors(NULL, NULL, 0);
FREE_MUTEX(gLock);
- if (php3_config_ini_startup(ELS_C) == FAILURE) {
+ if (php3_config_ini_startup() == FAILURE) {
return FAILURE;
}
/* in 3.1 some of this should move into sapi */
-int _php3_hash_environment(void)
+int _php3_hash_environment(PLS_D)
{
char **env, *p, *t;
unsigned char _gpc_flags[3] = {0,0,0};
#include "logos.h"
-static void php3_parse(zend_file_handle *primary_file CLS_DC ELS_DC)
+static void php3_parse(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC)
{
zend_file_handle *prepend_file_p, *append_file_p;
zend_file_handle prepend_file, append_file;
#ifdef ZTS
zend_compiler_globals *compiler_globals;
zend_executor_globals *executor_globals;
+ php_core_globals *core_globals;
#endif
+#ifndef ZTS
if (setjmp(EG(bailout))!=0) {
return -1;
}
-
-#ifdef ZTS
- sapi_startup(1,1,0);
- compiler_globals_id = ts_allocate_id(sizeof(zend_compiler_globals));
- executor_globals_id = ts_allocate_id(sizeof(zend_executor_globals));
-
- compiler_globals = ts_resource(compiler_globals_id);
- executor_globals = ts_resource(executor_globals_id);
#endif
-
-
+
#if WIN32|WINNT
_fmode = _O_BINARY; /*sets default for file streams to binary */
setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
#endif /* FORCE_CGI_REDIRECT */
}
+ if (php3_module_startup()==FAILURE) {
+ return FAILURE;
+ }
+#ifdef ZTS
+ compiler_globals = ts_resource(compiler_globals_id);
+ executor_globals = ts_resource(executor_globals_id);
+ core_globals = ts_resource(core_globals_id);
+#endif
CG(extended_info) = 0;
switch (c) {
case 'f':
if (!_cgi_started){
- if (php3_module_startup(CLS_C ELS_CC) == FAILURE || php3_request_startup(CLS_C ELS_CC) == FAILURE) {
+ if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
+ php3_module_shutdown();
return FAILURE;
}
}
break;
case 'v':
if (!_cgi_started) {
- if (php3_module_startup(CLS_C ELS_CC) == FAILURE || php3_request_startup(CLS_C ELS_CC) == FAILURE) {
+ if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
+ php3_module_shutdown();
return FAILURE;
}
}
break;
case 'i':
if (!_cgi_started) {
- if (php3_module_startup(CLS_C ELS_CC) == FAILURE || php3_request_startup(CLS_C ELS_CC) == FAILURE) {
+ if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
+ php3_module_shutdown();
return FAILURE;
}
}
#endif
if (!_cgi_started) {
- if (php3_module_startup(CLS_C ELS_CC) == FAILURE || php3_request_startup(CLS_C ELS_CC) == FAILURE) {
+ if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
+ php3_module_shutdown();
return FAILURE;
}
}
switch (behavior) {
case PHP_MODE_STANDARD:
- php3_parse(&file_handle CLS_CC ELS_CC);
+ php3_parse(&file_handle CLS_CC ELS_CC PLS_CC);
break;
case PHP_MODE_HIGHLIGHT: {
zend_syntax_highlighter_ini syntax_highlighter_ini;
#ifdef ZTS
zend_compiler_globals cg;
zend_executor_globals eg;
+ php_core_globals pcg;
zend_compiler_globals *compiler_globals=&cg;
zend_executor_globals *executor_globals=⪚
+ php_core_globals *core_globals=&pcg;
#endif
GLOBAL(php3_rqst) = r;
- if (php3_request_startup(CLS_C ELS_CC) == FAILURE) {
+ if (php3_request_startup(CLS_C ELS_CC PLS_CC) == FAILURE) {
return FAILURE;
}
php3_TreatHeaders();
setlocale(LC_CTYPE, "");
#endif
- if (php3_module_startup(CLS_C ELS_CC) == FAILURE) {
+ if (php3_module_startup() == FAILURE) {
return FAILURE;
}
signal(SIGPIPE, SIG_IGN);
return FAILURE;
}*/
- if (php3_request_startup(CLS_C ELS_CC) == FAILURE) {
+ if (php3_request_startup(CLS_C ELS_CC PLS_CC) == FAILURE) {
#if DEBUG
snprintf(logmessage,1024,"%d:php3_sapi_main: request starup failed\n",GLOBAL(sapi_rqst)->scid);
OutputDebugString(logmessage);
if (php3_config_ini_startup(_INLINE_TLS_VOID) == FAILURE) {
return 0;
}
- if (php3_module_startup(php3_globals) == FAILURE) {
+ if (php3_module_startup() == FAILURE) {
ErrorExit("module startup failed");
return 0;
}
return 0;
php3_globals = TlsGetValue(TlsIndex);
yy_init_tls();
- if (php3_module_startup(php3_globals) == FAILURE) {
+ if (php3_module_startup() == FAILURE) {
ErrorExit("module startup failed");
#if DEBUG
OutputDebugString("PHP_Core DllMain module startup failed\n");