--- main/fopen_wrappers.c.orig Fri Aug 23 01:00:49 2002 +++ main/fopen_wrappers.c Wed Jan 15 20:34:42 2003 @@ -388,6 +388,23 @@ SG(request_info).path_translated = NULL; return FAILURE; } + + /* check for /home/joe/public_html/example.php/pathinfo */ + if (1) { + char *s; + for (s=filename+1; *s; s++) { + if (*s == PHP_DIR_SEPARATOR && *(s-1) != PHP_DIR_SEPARATOR) { + *s = 0; + if (0 == stat (filename, &st)) { + if (S_ISREG(st.st_mode)) { + break; + } + } + *s = PHP_DIR_SEPARATOR; + } + } + } + fp = VCWD_FOPEN(filename, "rb"); /* refuse to open anything that is not a regular file */