summaryrefslogtreecommitdiff
path: root/sapi/pi3web
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-08-20 14:29:00 +0000
committerSascha Schumann <sas@php.net>2000-08-20 14:29:00 +0000
commit1d68a02df36170851b4c3e72faea43129022642e (patch)
tree30e9672cd229cac4cd65dce9f06d8fbf9474a446 /sapi/pi3web
parent320105bcd8540a6673e54106c03d569249af48f9 (diff)
downloadphp-git-1d68a02df36170851b4c3e72faea43129022642e.tar.gz
The status quo in PHP is that the current directory is initialized
to the directory where the executing script is located. Since this needs to be implemented for all SAPI modules anyway, this change moves the functionality to php_execute_script() and gets rid of the per-module code.
Diffstat (limited to 'sapi/pi3web')
-rw-r--r--sapi/pi3web/pi3web_sapi.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sapi/pi3web/pi3web_sapi.c b/sapi/pi3web/pi3web_sapi.c
index ff2951e708..a9099e0b11 100644
--- a/sapi/pi3web/pi3web_sapi.c
+++ b/sapi/pi3web/pi3web_sapi.c
@@ -24,9 +24,6 @@
#if WIN32|WINNT
# include <windows.h>
-# define PATH_DELIMITER '\\'
-#else
-# define PATH_DELIMITER '/'
#endif
#include "pi3web_sapi.h"
@@ -309,8 +306,8 @@ static sapi_module_struct sapi_module = {
static void init_request_info(sapi_globals_struct *sapi_globals, LPCONTROL_BLOCK lpCB)
{
- char *path_end = strrchr(lpCB->lpszFileName, PATH_DELIMITER);
- if ( path_end ) *path_end = PATH_DELIMITER;
+ char *path_end = strrchr(lpCB->lpszFileName, PHP_SEPARATOR);
+ if ( path_end ) *path_end = PHP_SEPARATOR;
SG(server_context) = lpCB;
SG(request_info).request_method = lpCB->lpszMethod;
@@ -384,7 +381,6 @@ static void hash_pi3web_variables(ELS_D SLS_DC)
DWORD fnWrapperProc(LPCONTROL_BLOCK lpCB)
{
zend_file_handle file_handle;
- char *path_end;
SLS_FETCH();
CLS_FETCH();
ELS_FETCH();
@@ -392,13 +388,6 @@ DWORD fnWrapperProc(LPCONTROL_BLOCK lpCB)
if (setjmp( EG(bailout)) != 0 ) return PIAPI_ERROR;
- path_end = strrchr( lpCB->lpszFileName, PATH_DELIMITER );
- if ( path_end ) {
- *path_end = 0;
- chdir( lpCB->lpszFileName );
- *path_end = PATH_DELIMITER;
- };
-
file_handle.filename = lpCB->lpszFileName;
file_handle.free_filename = 0;
file_handle.type = ZEND_HANDLE_FILENAME;