Subject: pkg/18693: unbreak ap2-php4
To: None <gnats-bugs@gnats.netbsd.org>
From: None <corecode@corecode.ath.cx>
List: netbsd-bugs
Date: 10/18/2002 15:10:11
>Number:         18693
>Category:       pkg
>Synopsis:       unbreak ap2-php4
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 18 06:11:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Simon Schubert
>Release:        NetBSD 1.6
>Organization:
	
>Environment:
	
	
System: NetBSD pride.uni.stoert.net 1.6 NetBSD 1.6 (GENERIC) #0: Sun Sep 8 19:43:40 UTC 2002 autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	
	php 4.2.3 contains code which prevents the usage with apache2:
	on systems with virtual path support some stat() functions don't work right.
	this has been corrected in php cvs.
	thus, pull in patch.
>How-To-Repeat:
	
	use apache2+php4 and file_exists()
>Fix:

new patch (pkgsrc/www/php4/patches/patch-ak[or whatever]):
---8<----
$NetBSD$

--- ext/standard/filestat.c.orig	Tue Aug 20 21:02:59 2002
+++ ext/standard/filestat.c
@@ -559,19 +559,6 @@ static void php_stat(const char *filenam
 		RETURN_FALSE;
 	}
 
-#ifndef PHP_WIN32
-    switch (type) {
-        case FS_IS_W:
-            RETURN_BOOL (!access (filename, W_OK));
-        case FS_IS_R:
-            RETURN_BOOL (!access (filename, R_OK));
-        case FS_IS_X:
-            RETURN_BOOL (!access (filename, X_OK));
-        case FS_EXISTS:
-            RETURN_BOOL (!access (filename, F_OK));
-    }
-#endif
-
 	stat_sb = &BG(sb);
 
 	if (!BG(CurrentStatFile) || strcmp(filename, BG(CurrentStatFile))) {
	
>Release-Note:
>Audit-Trail:
>Unformatted: