cvs: /php4 main.c php_virtual_cwd.c php_virtual_cwd.h

From: Date: Mon, 10 Apr 2000 17:39:41 +0000
Subject: cvs: /php4 main.c php_virtual_cwd.c php_virtual_cwd.h
Groups: php.version4 
Request: Send a blank email to php-version4+get-13361@lists.php.net to get a copy of this message
andi Mon Apr 10 10:39:41 2000 EDT Modified files: /php4 main.c php_virtual_cwd.c php_virtual_cwd.h Log: - Try and resolve the problem with current working directories not being set to the script directory Index: php4/main.c diff -u php4/main.c:1.230 php4/main.c:1.231 --- php4/main.c:1.230 Thu Mar 30 14:41:13 2000 +++ php4/main.c Mon Apr 10 10:39:11 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.230 2000/03/30 22:41:13 andi Exp $ */ +/* $Id: main.c,v 1.231 2000/04/10 17:39:11 andi Exp $ */ #include <stdio.h> @@ -619,7 +619,11 @@ PG(connection_status) = PHP_CONNECTION_NORMAL; zend_activate(CLS_C ELS_CC); - sapi_activate(SLS_C); + sapi_activate(SLS_C); + +#ifdef VIRTUAL_DIR + virtual_cwd_activate(SG(request_info).path_translated); +#endif php_set_timeout(PG(max_execution_time)); Index: php4/php_virtual_cwd.c diff -u php4/php_virtual_cwd.c:1.30 php4/php_virtual_cwd.c:1.31 --- php4/php_virtual_cwd.c:1.30 Sun Apr 9 12:54:50 2000 +++ php4/php_virtual_cwd.c Mon Apr 10 10:39:11 2000 @@ -145,6 +145,13 @@ ZEND_INIT_MODULE_GLOBALS(cwd, cwd_globals_ctor, cwd_globals_dtor); } +CWD_API void virtual_cwd_activate(char *filename) +{ + if (filename) { + virtual_chdir_file(filename); + } +} + CWD_API void virtual_cwd_shutdown() { #ifndef ZTS Index: php4/php_virtual_cwd.h diff -u php4/php_virtual_cwd.h:1.11 php4/php_virtual_cwd.h:1.12 --- php4/php_virtual_cwd.h:1.11 Sun Apr 9 12:54:50 2000 +++ php4/php_virtual_cwd.h Mon Apr 10 10:39:11 2000 @@ -27,6 +27,7 @@ CWD_API void virtual_cwd_startup(); CWD_API void virtual_cwd_shutdown(); +CWD_API void virtual_cwd_activate(char *filename); CWD_API char *virtual_getcwd_ex(int *length); CWD_API char *virtual_getcwd(char *buf, size_t size); CWD_API int virtual_chdir(char *path);

« previous php.version4 (#13361) next »