Re: #18623 [Ver]: touch, fopen, fwrite don't work
| From: | Melvyn Sopacua | Date: | Tue, 30 Jul 2002 22:03:50 +0000 |
| Subject: | Re: #18623 [Ver]: touch, fopen, fwrite don't work | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86349@lists.php.net to get a copy of this message | ||
Attached a test. Additionally I added a cast (char *) to line 360 to get rid of the
compiler warning. Z_STRVAL_PP doesn't work there so I'm not actually sure this
fix create more problems than it solves:
Index: filestat.c
===================================================================
RCS file: /repository/php4/ext/standard/filestat.c,v
retrieving revision 1.101
diff -u -r1.101 filestat.c
--- filestat.c 30 Jul 2002 20:24:13 -0000 1.101+++ filestat.c 30 Jul 2002 21:57:21 -0000 @@ -555,7 +555,8 @@
RETURN_FALSE;
}
- if (php_check_open_basedir(filename TSRMLS_CC)) {
+ if (php_check_open_basedir((char *) filename TSRMLS_CC)) {
+
RETURN_FALSE;
}
At 22:51 30-7-2002, you wrote:
Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn SopacuaID: 18623 Updated by: nohn@php.net Reported By: nohn@php.net Status: Verified Bug Type: Filesystem function relatedOperating System: Compaq Tru64/AlphaPHP Version: 4CVS-2002-07-29New Comment: I think, you meant this one (it's from sfox@php.net, not stef@php.net):--- old_filestat.c 2002-07-28 23:35:50.000000000 +0000+++ filestat.c 2002-07-30 17:16:48.000000000 +0000 @@ -481,9 +481,7 @@newtime = &newtimebuf;if (ac == 1 && zend_get_parameters_ex(1, &filename) != FAILURE){ -#ifndef HAVE_UTIME_NULLnewtime->modtime = newtime->actime = time(NULL);-#endif} else if (ac == 2 && zend_get_parameters_ex(2, &filename,&filetime) != FAILURE) {convert_to_long_ex(filetime); newtime->actime = time(NULL);---- and yes... It works fine. Tested with php4-200207301200 tested on Compaq Testdrive machine (a little bit slow, but it does what it should do). Full report here: http://www.nohn.net/lalafarm/php4-test-reports/4.3.0-dev-1028061991.xml