echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
- # uname on the ARM produces all sorts of strangeness, and we need to
- # filter it out.
- case "$UNAME_MACHINE" in
- armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
- arm* | sa110*) UNAME_MACHINE="arm" ;;
- esac
+# # uname on the ARM produces all sorts of strangeness, and we need to
+# # filter it out.
+# case "$UNAME_MACHINE" in
+# armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
+# arm* | sa110*) UNAME_MACHINE="arm" ;;
+# esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ elf32arm) echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 ;;
elf32ppc)
# Determine Lib Version
cat >$dummy.c <<EOF
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el \
- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+ | armv[34][lb] | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
| thumb | d10v)
basic_machine=$basic_machine-unknown
;;
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* \
+ | armv[34][lb]-* \
| f301-* | armv*-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* )
buffer = cpdf_getBufferForPDF(pdf, &lenght);
php3_header();
- php3_write(buffer, lenght);
+ php_write(buffer, lenght);
RETURN_TRUE;
}
return NULL;
}
- if (PG(safe_mode) && (!_php3_checkuid(filename, 2))) {
+ if (PG(safe_mode) && (!php_checkuid(filename, 2))) {
return NULL;
}
- if (_php3_check_open_basedir(filename)) {
+ if (php_check_open_basedir(filename)) {
return NULL;
}
convert_to_string(dbf_name);
convert_to_long(options);
- if (PG(safe_mode) && (!_php3_checkuid(dbf_name->value.str.val, 2))) {
+ if (PG(safe_mode) && (!php_checkuid(dbf_name->value.str.val, 2))) {
RETURN_FALSE;
}
- if (_php3_check_open_basedir(dbf_name->value.str.val)) {
+ if (php_check_open_basedir(dbf_name->value.str.val)) {
RETURN_FALSE;
}
RETURN_FALSE;
}
- if (PG(safe_mode) && (!_php3_checkuid(filename->value.str.val, 2))) {
+ if (PG(safe_mode) && (!php_checkuid(filename->value.str.val, 2))) {
RETURN_FALSE;
}
- if (_php3_check_open_basedir(filename->value.str.val)) {
+ if (php_check_open_basedir(filename->value.str.val)) {
RETURN_FALSE;
}
sprintf(workbuf, "%s/map", dir->value.str.val);
- if (PG(safe_mode) && (!_php3_checkuid(workbuf, 2))) {
+ if (PG(safe_mode) && (!php_checkuid(workbuf, 2))) {
RETURN_FALSE;
}
- if (_php3_check_open_basedir(workbuf)) {
+ if (php_check_open_basedir(workbuf)) {
RETURN_FALSE;
}
/* Now read the records in, moving forward recsize-1 bytes each time */
sprintf(workbuf, "%s/key", FP_GLOBAL(fp_database));
- if (PG(safe_mode) && (!_php3_checkuid(workbuf, 2))) {
+ if (PG(safe_mode) && (!php_checkuid(workbuf, 2))) {
RETURN_FALSE;
}
- if (_php3_check_open_basedir(workbuf)) {
+ if (php_check_open_basedir(workbuf)) {
RETURN_FALSE;
}
/* Now read the record in */
sprintf(workbuf, "%s/key", FP_GLOBAL(fp_database));
- if (PG(safe_mode) && (!_php3_checkuid(workbuf, 2))) {
+ if (PG(safe_mode) && (!php_checkuid(workbuf, 2))) {
RETURN_FALSE;
}
- if (_php3_check_open_basedir(workbuf)) {
+ if (php_check_open_basedir(workbuf)) {
RETURN_FALSE;
}
#if WIN32|WINNT
fp = fopen(file->value.str.val, "rb");
#else
- fp = php3_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
#endif
if (fp == NULL) {
php_error(E_WARNING, "ImageFontLoad: unable to open file");
#if WIN32|WINNT
fp = fopen(file->value.str.val, "rb");
#else
- fp = php3_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
#endif
if (!fp) {
- php3_strip_url_passwd(fn);
+ php_strip_url_passwd(fn);
php3_error(E_WARNING,
"ImageCreateFromPng: Unable to open %s for reading", fn);
RETURN_FALSE;
if (argc == 2) {
convert_to_string(file);
fn = file->value.str.val;
- if (!fn || fn == empty_string || _php3_check_open_basedir(fn)) {
+ if (!fn || fn == empty_string || php_check_open_basedir(fn)) {
php3_error(E_WARNING, "ImagePng: Invalid filename");
RETURN_FALSE;
}
ap_bsetflag(php3_rqst->connection->client, B_EBCDIC2ASCII, 0);
#endif
while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) {
- php3_write(buf, b);
+ php_write(buf, b);
}
}
fclose(tmp);
#if WIN32|WINNT
fp = fopen(file->value.str.val, "rb");
#else
- fp = php3_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper(file->value.str.val, "r", IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd, NULL);
#endif
if (!fp) {
- php3_strip_url_passwd(fn);
+ php_strip_url_passwd(fn);
php_error(E_WARNING,
"ImageCreateFromGif: Unable to open %s for reading", fn);
RETURN_FALSE;
if (argc == 2) {
convert_to_string(file);
fn = file->value.str.val;
- if (!fn || fn == empty_string || _php3_check_open_basedir(fn)) {
+ if (!fn || fn == empty_string || php_check_open_basedir(fn)) {
php_error(E_WARNING, "ImageGif: Invalid filename");
RETURN_FALSE;
}
}
#endif
while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) {
- php3_write(buf, b);
+ php_write(buf, b);
}
}
}
if(php3_header())
- php3_write(ptr->data, ptr->size);
+ php_write(ptr->data, ptr->size);
RETURN_TRUE;
}
php_error(E_NOTICE,"SQL safe mode in effect - ignoring host/user/password information");
}
host=passwd=NULL;
- user=_php3_get_current_user();
+ user=php_get_current_user();
hashed_details_length = strlen(user)+5+3;
hashed_details = (char *) emalloc(hashed_details_length+1);
sprintf(hashed_details,"mysql__%s_",user);
convert_to_string_ex(arg);
- if (_php3_check_open_basedir((*arg)->value.str.val)) {
+ if (php_check_open_basedir((*arg)->value.str.val)) {
RETURN_FALSE;
}
}
if (filename && *filename) {
- if (_php3_check_open_basedir(filename)) {
+ if (php_check_open_basedir(filename)) {
goto bail;
}
convert_to_string(path);
convert_to_long(mode);
- if (php3_ini.safe_mode && (!_php3_checkuid(path->value.str.val, 3))) {
+ if (php3_ini.safe_mode && (!php_checkuid(path->value.str.val, 3))) {
RETURN_FALSE;
}
result = mkfifo(path->value.str.val, mode->value.lval);
PHP_FE(parse_str, NULL)
PHP_FALIAS(rtrim, chop, NULL)
PHP_FALIAS(strchr, strstr, NULL)
- PHP_NAMED_FE(sprintf, php3_user_sprintf, NULL)
- PHP_NAMED_FE(printf, php3_user_printf, NULL)
+ PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), NULL)
+ PHP_NAMED_FE(printf, PHP_FN(user_printf), NULL)
PHP_FE(parse_url, NULL)
PHP_FE(urlencode, NULL)
PHP_FE(register_shutdown_function, NULL)
PHP_FE(highlight_file, NULL)
- PHP_NAMED_FE(show_source, php3_highlight_file, NULL)
+ PHP_NAMED_FE(show_source, PHP_FN(highlight_file), NULL)
PHP_FE(highlight_string, NULL)
PHP_FE(ini_get, NULL)
PHP_FUNCTION(get_current_user)
{
- RETURN_STRING(_php3_get_current_user(),1);
+ RETURN_STRING(php_get_current_user(),1);
}
return FAILURE;
break;
case 3: /*save to a file*/
- logfile=php3_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL);
+ logfile=php_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL);
if(!logfile) {
php_error(E_WARNING,"error_log: Unable to write to %s",opt);
return FAILURE;
fclose(logfile);
break;
default:
- php3_log_err(message);
+ php_log_err(message);
break;
}
return SUCCESS;
}
convert_to_string_ex(arg);
- if (_php3_check_open_basedir((*arg)->value.str.val)) {
+ if (php_check_open_basedir((*arg)->value.str.val)) {
RETURN_FALSE;
}
}
convert_to_string_ex(filename);
- fp = php3_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
if (!fp && !socketd) {
if (issock != BAD_URL) {
char *tmp = estrdup((*filename)->value.str.val);
- php3_strip_url_passwd(tmp);
+ php_strip_url_passwd(tmp);
php_error(E_WARNING,"get_meta_tags(\"%s\") - %s", tmp, strerror(errno));
efree(tmp);
}
}
convert_to_string_ex(filename);
- fp = php3_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
if (!fp && !socketd) {
if (issock != BAD_URL) {
char *tmp = estrdup((*filename)->value.str.val);
- php3_strip_url_passwd(tmp);
+ php_strip_url_passwd(tmp);
php_error(E_WARNING,"file(\"%s\") - %s", tmp, strerror(errno));
efree(tmp);
}
* We need a better way of returning error messages from
* php3_fopen__wrapper().
*/
- fp = php3_fopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
if (!fp && !socketd) {
if (issock != BAD_URL) {
char *tmp = estrdup((*arg1)->value.str.val);
- php3_strip_url_passwd(tmp);
+ php_strip_url_passwd(tmp);
php_error(E_WARNING,"fopen(\"%s\",\"%s\") - %s", tmp, p, strerror(errno));
efree(tmp);
}
convert_to_string_ex(arg1);
convert_to_long_ex(arg2);
mode = (*arg2)->value.lval;
- if (PG(safe_mode) &&(!_php3_checkuid((*arg1)->value.str.val,3))) {
+ if (PG(safe_mode) &&(!php_checkuid((*arg1)->value.str.val,3))) {
RETURN_FALSE;
}
ret = mkdir((*arg1)->value.str.val,mode);
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg1);
- if (PG(safe_mode) &&(!_php3_checkuid((*arg1)->value.str.val,1))) {
+ if (PG(safe_mode) &&(!php_checkuid((*arg1)->value.str.val,1))) {
RETURN_FALSE;
}
ret = rmdir((*arg1)->value.str.val);
/*
* We need a better way of returning error messages from
- * php3_fopen_wrapper().
+ * php_fopen_wrapper().
*/
- fp = php3_fopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
if (!fp && !socketd){
if (issock != BAD_URL) {
char *tmp = estrdup((*arg1)->value.str.val);
- php3_strip_url_passwd(tmp);
+ php_strip_url_passwd(tmp);
php_error(E_WARNING,"readfile(\"%s\") - %s", tmp, strerror(errno));
efree(tmp);
}
old_name = (*old_arg)->value.str.val;
new_name = (*new_arg)->value.str.val;
- if (PG(safe_mode) &&(!_php3_checkuid(old_name, 2))) {
+ if (PG(safe_mode) &&(!php_checkuid(old_name, 2))) {
RETURN_FALSE;
}
ret = rename(old_name, new_name);
convert_to_string_ex(source);
convert_to_string_ex(target);
- if (PG(safe_mode) &&(!_php3_checkuid((*source)->value.str.val,2))) {
+ if (PG(safe_mode) &&(!php_checkuid((*source)->value.str.val,2))) {
RETURN_FALSE;
}
convert_to_string(path);
- if (_php3_check_open_basedir(path->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(path->value.str.val)) RETURN_FALSE;
#ifdef WINDOWS
/* GetDiskFreeSpaceEx is only available in NT and Win95 post-OSR2,
gid = group->value.lval;
}
- if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
RETURN_FALSE;
}
/* Check the basedir */
- if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
ret = chown(filename->value.str.val, -1, gid);
if (ret == -1) {
uid = user->value.lval;
}
- if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
RETURN_FALSE;
}
/* Check the basedir */
- if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
ret = chown(filename->value.str.val, uid, -1);
if (ret == -1) {
convert_to_string(filename);
convert_to_long(mode);
- if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
RETURN_FALSE;
}
/* Check the basedir */
- if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
ret = chmod(filename->value.str.val, mode->value.lval);
if (ret == -1) {
}
convert_to_string(filename);
- if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
if (newtime) efree(newtime);
RETURN_FALSE;
}
/* Check the basedir */
- if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
/* create the file if it doesn't exist already */
ret = stat(filename->value.str.val, &sb);
#define SOCK_CLOSE(s) shutdown(s, 0); closesocket(s)
-int _php3_sock_close(int socket)
+int php_sock_close(int socket)
{
int ret = 0;
php3i_sockbuf *sock;
SOCK_FIND(sock, socket); \
if(sock->is_blocked) _php3_sock_read_total(sock, max); else _php3_sock_read(sock)
-/* {{{ _php3_sock_fgets() */
+/* {{{ php_sock_fgets() */
/*
* FIXME: fgets depends on '\n' as line delimiter
*/
-char *_php3_sock_fgets(char *buf, size_t maxlen, int socket)
+char *php_sock_fgets(char *buf, size_t maxlen, int socket)
{
char *p = NULL;
char *ret = NULL;
* ss@2ns.de 19990528
*/
-int _php3_sock_fgetc(int socket)
+int php_sock_fgetc(int socket)
{
int ret = EOF;
SOCK_FIND_AND_READ_MAX(1);
return ret;
}
-int _php3_sock_feof(int socket)
+int php_sock_feof(int socket)
{
int ret = 0;
SOCK_FIND(sock, socket);
return ret;
}
-/* {{{ _php3_sock_fread() */
+/* {{{ php_sock_fread() */
-size_t _php3_sock_fread(char *ptr, size_t size, int socket)
+size_t php_sock_fread(char *ptr, size_t size, int socket)
{
size_t ret = 0;
SOCK_FIND_AND_READ_MAX(size);
PHP_FUNCTION(fsockopen);
PHP_FUNCTION(pfsockopen);
int lookup_hostname(const char *addr, struct in_addr *in);
-char *_php3_sock_fgets(char *buf, size_t maxlen, int socket);
-size_t _php3_sock_fread(char *buf, size_t maxlen, int socket);
-int _php3_sock_feof(int socket);
-int _php3_sock_fgetc(int socket);
+char *php_sock_fgets(char *buf, size_t maxlen, int socket);
+size_t php_sock_fread(char *buf, size_t maxlen, int socket);
+int php_sock_feof(int socket);
+int php_sock_fgetc(int socket);
int _php3_is_persistent_sock(int);
int _php3_sock_set_blocking(int socket, int mode);
int _php3_sock_destroy(int socket);
-int _php3_sock_close(int socket);
+int php_sock_close(int socket);
size_t _php3_sock_set_def_chunk_size(size_t size);
int php_msock_destroy(int *data);
}
/* Check open_basedir */
- if (_php3_check_open_basedir((*arg1)->value.str.val)) return;
+ if (php_check_open_basedir((*arg1)->value.str.val)) return;
if ((fp = fopen((*arg1)->value.str.val,"rb")) == 0) {
php_error(E_WARNING, "Unable to open %s", (*arg1)->value.str.val);
break;
}
- if (_php3_check_open_basedir((*jpeg_file)->value.str.val))
+ if (php_check_open_basedir((*jpeg_file)->value.str.val))
RETURN_FALSE;
if ((fp = fopen((*jpeg_file)->value.str.val,"rb")) == 0) {
convert_to_string_ex(topath);
convert_to_string_ex(frompath);
- if (PG(safe_mode) && !_php3_checkuid((*topath)->value.str.val, 2)) {
+ if (PG(safe_mode) && !php_checkuid((*topath)->value.str.val, 2)) {
RETURN_FALSE;
}
if (!strncasecmp((*topath)->value.str.val,"http://",7) || !strncasecmp((*topath)->value.str.val,"ftp://",6)) {
convert_to_string_ex(topath);
convert_to_string_ex(frompath);
- if (PG(safe_mode) && !_php3_checkuid((*topath)->value.str.val, 2)) {
+ if (PG(safe_mode) && !php_checkuid((*topath)->value.str.val, 2)) {
RETURN_FALSE;
}
if (!strncasecmp((*topath)->value.str.val,"http://",7) || !strncasecmp((*topath)->value.str.val,"ftp://",6)) {
}
convert_to_string_ex(filename);
- if (PG(safe_mode) && !_php3_checkuid((*filename)->value.str.val, 2)) {
+ if (PG(safe_mode) && !php_checkuid((*filename)->value.str.val, 2)) {
RETURN_FALSE;
}
RETURN_FALSE;
}
/* Clear stat cache */
- php3_clearstatcache(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ PHP_FN(clearstatcache)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
RETURN_TRUE;
}
/* }}} */
#define PUTC(a) PUTS(a)
#endif
#ifndef PHPWRITE
-#define PHPWRITE(a,n) php3_write((a),(n))
+#define PHPWRITE(a,n) php_write((a),(n))
#endif
#endif
return php3_gzopen_with_path(path, mode, PG(include_path), NULL);
}
else {
- if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!_php3_checkuid(path,1))) {
+ if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!php_checkuid(path,1))) {
return NULL;
}
- if (_php3_check_open_basedir(path)) return NULL;
+ if (php_check_open_basedir(path)) return NULL;
return gzopen(path, mode);
}
}
/* Relative path open */
if (*filename == '.') {
- if (PG(safe_mode) &&(!_php3_checkuid(filename,2))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename,2))) {
return(NULL);
}
- if (_php3_check_open_basedir(filename)) return NULL;
+ if (php_check_open_basedir(filename)) return NULL;
zp = gzopen(filename, mode);
if (zp && opened_path) {
*opened_path = expand_filepath(filename);
} else {
strlcpy(trypath,filename,sizeof(trypath));
}
- if (!_php3_checkuid(trypath,2)) {
+ if (!php_checkuid(trypath,2)) {
return(NULL);
}
- if (_php3_check_open_basedir(trypath)) return NULL;
+ if (php_check_open_basedir(trypath)) return NULL;
zp = gzopen(trypath, mode);
if (zp && opened_path) {
*opened_path = expand_filepath(trypath);
}
return zp;
} else {
- if (_php3_check_open_basedir(filename)) return NULL;
+ if (php_check_open_basedir(filename)) return NULL;
return gzopen(filename, mode);
}
}
if (!path || (path && !*path)) {
- if (PG(safe_mode) &&(!_php3_checkuid(filename,2))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename,2))) {
return(NULL);
}
- if (_php3_check_open_basedir(filename)) return NULL;
+ if (php_check_open_basedir(filename)) return NULL;
zp = gzopen(filename, mode);
if (zp && opened_path) {
*opened_path = strdup(filename);
}
snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename);
if (PG(safe_mode)) {
- if (stat(trypath,&sb) == 0 &&(!_php3_checkuid(trypath,2))) {
+ if (stat(trypath,&sb) == 0 &&(!php_checkuid(trypath,2))) {
efree(pathbuf);
return(NULL);
}
}
if ((zp = gzopen(trypath, mode)) != NULL) {
- if (_php3_check_open_basedir(trypath)) {
+ if (php_check_open_basedir(trypath)) {
gzclose(zp);
efree(pathbuf);
return NULL;
netbsd*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
# can we support soname and/or expsyms with a.out? -oliva
EOF
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
no_undefined_flag=' -z text'
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
- archive_cmds='$LD $compile_rpath -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD $compile_rpath -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
case "$host_os" in
*.o | *.obj | *.a | *.lib)
# A standard object.
- libobjs="$libobjs $arg"
+ objs="$objs $arg"
;;
*.lo)
esac
fi
- if test -n "$rpath$xrpath"; then
- # If the user specified any rpath flags, then add them.
- for libdir in $rpath $xrpath; do
- # This is the magic to use -rpath.
- case "$compile_rpath " in
- *" $libdir "*) ;;
- *) compile_rpath="$compile_rpath $libdir" ;;
- esac
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- fi
-
- # Now hardcode the library paths
- rpath=
- hardcode_libdirs=
- for libdir in $compile_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- compile_rpath="$rpath"
-
- rpath=
- hardcode_libdirs=
- for libdir in $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$finalize_perm_rpath " in
- *" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- finalize_rpath="$rpath"
-
# Create the output directory, or remove our outputs if we need to.
if test -d $output_objdir; then
$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
done
done
if test -n "$a_deplib" ; then
- newdeplibs="$newdeplibs $a_deplib"
droppeddeps=yes
echo
echo "*** Warning: This library needs some functionality provided by $a_deplib."
/* configuration module */
-extern int php3_init_config(void);
-extern int php3_shutdown_config(void);
+extern int php_init_config(void);
+extern int php_shutdown_config(void);
/* environment module */
-extern int php3_init_environ(void);
-extern int php3_shutdown_environ(void);
+extern int php_init_environ(void);
+extern int php_shutdown_environ(void);
#endif
}
-int php3_init_config(void)
+int php_init_config(void)
{
PLS_FETCH();
}
PG(safe_mode) = 0;
PG(open_basedir) = NULL;
- cfgin = php3_fopen_with_path("php.ini","r",php_ini_path,&opened_path);
+ cfgin = php_fopen_with_path("php.ini","r",php_ini_path,&opened_path);
free(php_ini_path);
if (free_default_location) {
free(default_location);
}
-int php3_shutdown_config(void)
+int php_shutdown_config(void)
{
zend_hash_destroy(&configuration_hash);
return SUCCESS;
When open_basedir is NULL, always return 0
*/
-PHPAPI int _php3_check_specific_open_basedir(char *basedir, char *path PLS_DC)
+PHPAPI int php_check_specific_open_basedir(char *basedir, char *path PLS_DC)
{
char resolved_name[MAXPATHLEN];
char resolved_basedir[MAXPATHLEN];
}
/* Resolve the real path into resolved_name */
- if ((_php3_realpath(path, resolved_name) != NULL) && (_php3_realpath(local_open_basedir, resolved_basedir) != NULL)) {
+ if ((php_realpath(path, resolved_name) != NULL) && (php_realpath(local_open_basedir, resolved_basedir) != NULL)) {
/* Check the path */
#if WIN32|WINNT
if (strncasecmp(resolved_basedir, resolved_name, strlen(resolved_basedir)) == 0) {
}
}
-PHPAPI int _php3_check_open_basedir(char *path)
+PHPAPI int php_check_open_basedir(char *path)
{
PLS_FETCH();
end++;
}
- if (_php3_check_specific_open_basedir(ptr, path PLS_CC) == 0) {
+ if (php_check_specific_open_basedir(ptr, path PLS_CC) == 0) {
efree(pathbuf);
return 0;
}
return 0;
}
-PHPAPI FILE *php3_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
+PHPAPI FILE *php_fopen_wrapper(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
int cm=2; /* checkuid mode: 2 = if file does not exist, check directory */
PLS_FETCH();
#endif
if (options & USE_PATH && PG(include_path) != NULL) {
- return php3_fopen_with_path(path, mode, PG(include_path), opened_path);
+ return php_fopen_with_path(path, mode, PG(include_path), opened_path);
} else {
if(!strcmp(mode,"r") || !strcmp(mode,"r+")) cm=0;
- if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!_php3_checkuid(path, cm))) {
+ if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!php_checkuid(path, cm))) {
return NULL;
}
- if (_php3_check_open_basedir(path)) return NULL;
+ if (php_check_open_basedir(path)) return NULL;
return fopen(path, mode);
}
}
#if CGI_BINARY || FHTTPD || USE_SAPI
-PHPAPI FILE *php3_fopen_for_parser(void)
+PHPAPI FILE *php_fopen_primary_script(void)
{
FILE *fp;
struct stat st;
* Tries to open a file with a PATH-style list of directories.
* If the filename starts with "." or "/", the path is ignored.
*/
-PHPAPI FILE *php3_fopen_with_path(char *filename, char *mode, char *path, char **opened_path)
+PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char **opened_path)
{
char *pathbuf, *ptr, *end;
char trypath[MAXPATHLEN + 1];
if(!strcmp(mode,"r") || !strcmp(mode,"r+")) cm=0;
/* Relative path open */
if (*filename == '.') {
- if (PG(safe_mode) && (!_php3_checkuid(filename, cm))) {
+ if (PG(safe_mode) && (!php_checkuid(filename, cm))) {
return NULL;
}
- if (_php3_check_open_basedir(filename)) return NULL;
+ if (php_check_open_basedir(filename)) return NULL;
fp = fopen(filename, mode);
if (fp && opened_path) {
*opened_path = expand_filepath(filename);
} else {
strlcpy(trypath,filename,sizeof(trypath));
}
- if (!_php3_checkuid(trypath, cm)) {
+ if (!php_checkuid(trypath, cm)) {
return NULL;
}
- if (_php3_check_open_basedir(trypath)) return NULL;
+ if (php_check_open_basedir(trypath)) return NULL;
fp = fopen(trypath, mode);
if (fp && opened_path) {
*opened_path = expand_filepath(trypath);
}
return fp;
} else {
- if (_php3_check_open_basedir(filename)) return NULL;
+ if (php_check_open_basedir(filename)) return NULL;
return fopen(filename, mode);
}
}
if (!path || (path && !*path)) {
- if (PG(safe_mode) && (!_php3_checkuid(filename, cm))) {
+ if (PG(safe_mode) && (!php_checkuid(filename, cm))) {
return NULL;
}
- if (_php3_check_open_basedir(filename)) return NULL;
+ if (php_check_open_basedir(filename)) return NULL;
fp = fopen(filename, mode);
if (fp && opened_path) {
*opened_path = strdup(filename);
}
snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename);
if (PG(safe_mode)) {
- if (stat(trypath, &sb) == 0 && (!_php3_checkuid(trypath, cm))) {
+ if (stat(trypath, &sb) == 0 && (!php_checkuid(trypath, cm))) {
efree(pathbuf);
return NULL;
}
}
if ((fp = fopen(trypath, mode)) != NULL) {
- if (_php3_check_open_basedir(trypath)) {
+ if (php_check_open_basedir(trypath)) {
fclose(fp);
efree(pathbuf);
return NULL;
PLS_FETCH();
if (options & USE_PATH) {
- fp = php3_fopen_with_path((char *) path, mode, PG(include_path), opened_path);
+ fp = php_fopen_with_path((char *) path, mode, PG(include_path), opened_path);
} else {
int cm=2;
if(!strcmp(mode,"r") || !strcmp(mode,"r+")) cm=0;
- if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!_php3_checkuid(path, cm))) {
+ if (options & ENFORCE_SAFE_MODE && PG(safe_mode) && (!php_checkuid(path, cm))) {
fp = NULL;
} else {
- if (_php3_check_open_basedir((char *) path)) {
+ if (php_check_open_basedir((char *) path)) {
fp = NULL;
} else {
fp = fopen(path, mode);
return strtol(tmp_line, NULL, 10);
}
-PHPAPI int php3_isurl(char *path)
+PHPAPI int php_is_url(char *path)
{
return (!strncasecmp(path, "http://", 7) || !strncasecmp(path, "ftp://", 6));
}
-PHPAPI char *php3_strip_url_passwd(char *url)
+PHPAPI char *php_strip_url_passwd(char *url)
{
register char *p = url, *url_start;
#endif
#define SOCK_WRITE(d,s) send(s,d,strlen(d),0)
#define SOCK_WRITEL(d,l,s) send(s,d,l,0)
-#define SOCK_FGETC(s) _php3_sock_fgetc((s))
-#define SOCK_FGETS(b,l,s) _php3_sock_fgets((b),(l),(s))
-#define SOCK_FEOF(sock) _php3_sock_feof((sock))
-#define SOCK_FREAD(ptr,size,sock) _php3_sock_fread((ptr),(size),(sock))
-#define SOCK_FCLOSE(s) _php3_sock_close(s)
+#define SOCK_FGETC(s) php_sock_fgetc((s))
+#define SOCK_FGETS(b,l,s) php_sock_fgets((b),(l),(s))
+#define SOCK_FEOF(sock) php_sock_feof((sock))
+#define SOCK_FREAD(ptr,size,sock) php_sock_fread((ptr),(size),(sock))
+#define SOCK_FCLOSE(s) php_sock_close(s)
#define FP_FGETS(buf,len,sock,fp,issock) \
((issock)?SOCK_FGETS(buf,len,sock):fgets(buf,len,fp))
#define IS_SOCKET 1
#define BAD_URL 2
-extern PHPAPI FILE *php3_fopen_wrapper(char *filename, char *mode, int options, int *issock, int *socketd, char **opened_path);
+extern PHPAPI FILE *php_fopen_wrapper(char *filename, char *mode, int options, int *issock, int *socketd, char **opened_path);
-PHPAPI FILE *php3_fopen_for_parser(void);
+PHPAPI FILE *php_fopen_primary_script(void);
-extern PHPAPI int _php3_check_open_basedir(char *path);
-extern PHPAPI int _php3_check_specific_open_basedir(char *basedir, char *path PLS_DC);
+extern PHPAPI int php_check_open_basedir(char *path);
+extern PHPAPI int php_check_specific_open_basedir(char *basedir, char *path PLS_DC);
-extern PHPAPI FILE *php3_fopen_with_path(char *filename, char *mode, char *path, char **opened_path);
+extern PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char **opened_path);
-extern PHPAPI int php3_isurl(char *path);
-extern PHPAPI char *php3_strip_url_passwd(char *path);
+extern PHPAPI int php_is_url(char *path);
+extern PHPAPI char *php_strip_url_passwd(char *path);
extern PHPAPI char *expand_filepath(char *filepath);
#ifndef _INTERNAL_FUNCTIONS_REGISTRY_H
#define _INTERNAL_FUNCTIONS_REGISTRY_H
-extern int php3_init_mime(INIT_FUNC_ARGS);
+extern int php_init_mime(INIT_FUNC_ARGS);
#if APACHE
-extern php3_module_entry apache_module_entry;
+extern zend_module_entry apache_module_entry;
#define phpext_apache_ptr &apache_module_entry
-extern void php3_virtual(INTERNAL_FUNCTION_PARAMETERS);
+extern void php_virtual(INTERNAL_FUNCTION_PARAMETERS);
#else
#define phpext_apache_ptr NULL
#endif
/* environment functions */
-extern int php3_init_environment(void);
+extern int php_init_environment(void);
#endif
#endif
#endif
-void php3_log_err(char *log_message)
+void php_log_err(char *log_message)
{
FILE *log_file;
char error_time_str[128];
#define PRINTF_BUFFER_SIZE 1024*4
/* wrapper for modules to use PHPWRITE */
-PHPAPI int php3_write(void *buf, int size)
+PHPAPI int php_write(void *buf, int size)
{
return PHPWRITE(buf, size);
}
char log_buffer[1024];
snprintf(log_buffer, 1024, "PHP %s: %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno);
- php3_log_err(log_buffer);
+ php_log_err(log_buffer);
}
if (PG(display_errors)) {
char *prepend_string = INI_STR("error_prepend_string");
FILE *retval;
old_chunk_size = _php3_sock_set_def_chunk_size(1);
- retval=php3_fopen_wrapper((char *) filename, "r", USE_PATH|IGNORE_URL_WIN, &issock, &socketd, opened_path);
+ retval=php_fopen_wrapper((char *) filename, "r", USE_PATH|IGNORE_URL_WIN, &issock, &socketd, opened_path);
_php3_sock_set_def_chunk_size(old_chunk_size);
if (issock) {
case ZMSG_FAILED_INCLUDE_FOPEN: {
PLS_FETCH();
- php_error(E_WARNING, "Failed opening '%s' for inclusion (include_path='%s')", php3_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
+ php_error(E_WARNING, "Failed opening '%s' for inclusion (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
}
break;
case ZMSG_FAILED_REQUIRE_FOPEN: {
PLS_FETCH();
- php_error(E_COMPILE_ERROR, "Failed opening required '%s' (include_path='%s')", php3_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
+ php_error(E_COMPILE_ERROR, "Failed opening required '%s' (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
}
break;
case ZMSG_FAILED_HIGHLIGHT_FOPEN:
- php_error(E_WARNING, "Failed opening '%s' for highlighting", php3_strip_url_passwd((char *) data));
+ php_error(E_WARNING, "Failed opening '%s' for highlighting", php_strip_url_passwd((char *) data));
break;
case ZMSG_MEMORY_LEAK_DETECTED:
case ZMSG_MEMORY_LEAK_REPEATED: {
static int php3_config_ini_startup(void)
{
- if (php3_init_config() == FAILURE) {
+ if (php_init_config() == FAILURE) {
php_printf("PHP: Unable to parse configuration file.\n");
return FAILURE;
}
static void php3_config_ini_shutdown(void)
{
- php3_shutdown_config();
+ php_shutdown_config();
}
#define MAXPATHLEN 256 /* Should be safe for any weird systems that do not define it */
#endif
-#define PHP_FN(name) php3_##name
+#define PHP_FN(name) php_if_##name
#define PHP_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
-#define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(php3_##name)
+#define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(PHP_FN(name))
#define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types },
-#define PHP_FE(name, arg_types) PHP_NAMED_FE(name, php3_##name, arg_types)
-#define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, php3_##alias, arg_types)
+#define PHP_FE(name, arg_types) PHP_NAMED_FE(name, PHP_FN(name), arg_types)
+#define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, PHP_FN(alias), arg_types)
-#define PHP_MINIT(module) php3_minit_##module
-#define PHP_MSHUTDOWN(module) php3_mshutdown_##module
-#define PHP_RINIT(module) php3_rinit_##module
-#define PHP_RSHUTDOWN(module) php3_rshutdown_##module
-#define PHP_MINFO(module) php3_info_##module
-#define PHP_GINIT(module) php3_ginit_##module
-#define PHP_GSHUTDOWN(module) php3_gshutdown_##module
+#define PHP_MINIT(module) php_minit_##module
+#define PHP_MSHUTDOWN(module) php_mshutdown_##module
+#define PHP_RINIT(module) php_rinit_##module
+#define PHP_RSHUTDOWN(module) php_rshutdown_##module
+#define PHP_MINFO(module) php_info_##module
+#define PHP_GINIT(module) php_ginit_##module
+#define PHP_GSHUTDOWN(module) php_gshutdown_##module
#define PHP_MINIT_FUNCTION(module) int PHP_MINIT(module)(INIT_FUNC_ARGS)
#define PHP_MSHUTDOWN_FUNCTION(module) int PHP_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
extern void phperror(char *error);
extern PHPAPI void php_error(int type, const char *format,...);
-extern PHPAPI int php3_write(void *buf, int size);
+extern PHPAPI int php_write(void *buf, int size);
extern PHPAPI int php_printf(const char *format,...);
-extern void php3_log_err(char *log_message);
+extern void php_log_err(char *log_message);
extern int Debug(char *format,...);
extern int cfgparse(void);
#ifndef _PHP_REALPATH_H_
#define _PHP_REALPATH_H_
-extern char *_php3_realpath(const char *path, char resolved_path []);
+extern char *php_realpath(const char *path, char resolved_path []);
#endif
/*
#include "SAPI.h"
/*
- * _php3_checkuid
+ * php_checkuid
*
* This function has four modes:
*
* 2 - if file does not exist, check directory
* 3 - only check directory (needed for mkdir)
*/
-PHPAPI int _php3_checkuid(const char *fn, int mode) {
+PHPAPI int php_checkuid(const char *fn, int mode) {
struct stat sb;
int ret;
long uid=0L, duid=0L;
}
-PHPAPI char *_php3_get_current_user()
+PHPAPI char *php_get_current_user()
{
#if CGI_BINARY || USE_SAPI || FHTTPD
struct stat statbuf;
#ifndef _SAFE_MODE_H_
#define _SAFE_MODE_H_
-extern PHPAPI int _php3_checkuid(const char *filename, int mode);
-extern PHPAPI char *_php3_get_current_user(void);
+extern PHPAPI int php_checkuid(const char *filename, int mode);
+extern PHPAPI char *php_get_current_user(void);
#endif
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
#endif
-char *_php3_realpath(char *path, char resolved_path[]);
+char *php_realpath(char *path, char resolved_path[]);
-char *_php3_realpath(char *path, char resolved_path []) {
+char *php_realpath(char *path, char resolved_path []) {
char path_construction[MAXPATHLEN]; /* We build the result in here */
char *writepos; /* Position to write next char */
}
/* If for some reason the CGI interface is not setting the
PATH_TRANSLATED correctly, SG(request_info).path_translated is NULL.
- We still call php3_fopen_for_parser, because if you set doc_root
+ We still call php_fopen_primary_script, because if you set doc_root
or user_dir configuration directives, PATH_INFO is used to construct
- the filename as a side effect of php3_fopen_for_parser.
+ the filename as a side effect of php_fopen_primary_script.
*/
if(cgi) {
SG(request_info).path_translated = getenv("PATH_TRANSLATED");
}
if (cgi || SG(request_info).path_translated) {
- file_handle.handle.fp = php3_fopen_for_parser();
+ file_handle.handle.fp = php_fopen_primary_script();
file_handle.filename = SG(request_info).path_translated;
}
*/
SETSTRING( SG(request_info).path_translated, pathTranslated );
getcwd(cwd,MAXPATHLEN);
- file_handle.handle.fp = php3_fopen_for_parser();
+ file_handle.handle.fp = php_fopen_primary_script();
chdir(cwd);
file_handle.filename = SG(request_info).path_translated;
file_handle.free_filename = 0;