[PHP-DEV] Bug #14898 Updated: $HTTP_POST_FILES['uploadedfile']['name'] error

2002-02-08 Thread a1593

 ID:   14898
 Updated by:   [EMAIL PROTECTED]
-Summary:  $HTTP_POST_FILES['uploadedfile']['name'] error
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: HTTP related
 Operating System: linux slackware8
 PHP Version:  4.1.1
 New Comment:

it is better to say that this is an improvement to make the upload
function can treat mulit-byte codes like BIG5. there is a explanation
in my first post.  


Previous Comments:


[2002-02-07 22:52:59] [EMAIL PROTECTED]

Is this a patch proposal? I don't see any bugs...



[2002-01-11 06:24:44] [EMAIL PROTECTED]

anyway, i hope this is the final post about this issue.
--
s = strrchr(filenamebuf, '\\');
tmps=filenamebuf;
while (!(*tmps==NULL)) {
  if (!(*tmps0  *tmps160)) {//looks like a chinese word
if (!*(tmps+1)==NULL) tmps++;
  } else {
if (*tmps=='\\') s=tmps;
  }
  tmps++;
}
---



[2002-01-09 03:42:34] [EMAIL PROTECTED]

---code modified--
//s = strrchr(filenamebuf, '\\');
char *tmps;
s=filenamebuf; // set initial value 
for (tmps=filenamebuf;*tmps;tmps++) {
  if (*tmps0){// *tmps127, looks like 2 bytes of chinese code
if (!*(tmps+1)) tmps++;
continue;
  }
  if (*tmps=='\\') s=tmps;
}
--code modified end ---



[2002-01-08 09:37:12] [EMAIL PROTECTED]

the following code works well for chinese double-byte checking.
---code modified--
//s = strrchr(filenamebuf, '\\');
char *tmps;
for (tmps=filenamebuf;*tmps;tmps++) {
  if (*tmps0){// *tmps127, looks like 2 bytes of chinese code
if (!*(tmps+1)) tmps++;
contonue;
  }
  if (*tmps=='\\') s=tmps;
}
--code modified end --- 




[2002-01-07 22:48:48] [EMAIL PROTECTED]

the fix is too rough and can't handle all chinese words, it need more
efforts to check. i will do it in a few days.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/14898

-- 
Edit this bug report at http://bugs.php.net/?id=14898edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Bug #14898 Updated: $HTTP_POST_FILES['uploadedfile']['name'] error

2002-01-11 Thread a1593

ID: 14898
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: HTTP related
Operating System: linux slackware8
PHP Version: 4.1.1
New Comment:

anyway, i hope this is the final post about this issue.
--
s = strrchr(filenamebuf, '\\');
tmps=filenamebuf;
while (!(*tmps==NULL)) {
  if (!(*tmps0  *tmps160)) {//looks like a chinese word
if (!*(tmps+1)==NULL) tmps++;
  } else {
if (*tmps=='\\') s=tmps;
  }
  tmps++;
}
---


Previous Comments:


[2002-01-09 03:42:34] [EMAIL PROTECTED]

---code modified--
//s = strrchr(filenamebuf, '\\');
char *tmps;
s=filenamebuf; // set initial value 
for (tmps=filenamebuf;*tmps;tmps++) {
  if (*tmps0){// *tmps127, looks like 2 bytes of chinese code
if (!*(tmps+1)) tmps++;
continue;
  }
  if (*tmps=='\\') s=tmps;
}
--code modified end ---



[2002-01-08 09:37:12] [EMAIL PROTECTED]

the following code works well for chinese double-byte checking.
---code modified--
//s = strrchr(filenamebuf, '\\');
char *tmps;
for (tmps=filenamebuf;*tmps;tmps++) {
  if (*tmps0){// *tmps127, looks like 2 bytes of chinese code
if (!*(tmps+1)) tmps++;
contonue;
  }
  if (*tmps=='\\') s=tmps;
}
--code modified end --- 




[2002-01-07 22:48:48] [EMAIL PROTECTED]

the fix is too rough and can't handle all chinese words, it need more
efforts to check. i will do it in a few days.



[2002-01-07 01:56:48] [EMAIL PROTECTED]

/*
This is a bug fix for rfc1867.c
try to upload file from win2k with name C:\DISK0\»\³\.txt
the original code get name as '.ext' which should be '»\³\.txt'. 
the following modify is necessary to for client using charset=BIG5.
thanks PHP.
lai [EMAIL PROTECTED]
*/
---code modified--
//s = strrchr(filenamebuf, '\\');
for (s=filenamebuf+strlen(filenamebuf)-1;sfilenamebuf;s--) {
 if (*s=='\\'  *(s-1)0) break;
}
--code modified end --- 
 





Edit this bug report at http://bugs.php.net/?id=14898edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14898 Updated: $HTTP_POST_FILES['uploadedfile']['name'] error

2002-01-09 Thread a1593

ID: 14898
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: HTTP related
Operating System: linux slackware8
PHP Version: 4.1.1
New Comment:

---code modified--
//s = strrchr(filenamebuf, '\\');
char *tmps;
s=filenamebuf; // set initial value 
for (tmps=filenamebuf;*tmps;tmps++) {
  if (*tmps0){// *tmps127, looks like 2 bytes of chinese code
if (!*(tmps+1)) tmps++;
continue;
  }
  if (*tmps=='\\') s=tmps;
}
--code modified end ---


Previous Comments:


[2002-01-08 09:37:12] [EMAIL PROTECTED]

the following code works well for chinese double-byte checking.
---code modified--
//s = strrchr(filenamebuf, '\\');
char *tmps;
for (tmps=filenamebuf;*tmps;tmps++) {
  if (*tmps0){// *tmps127, looks like 2 bytes of chinese code
if (!*(tmps+1)) tmps++;
contonue;
  }
  if (*tmps=='\\') s=tmps;
}
--code modified end --- 




[2002-01-07 22:48:48] [EMAIL PROTECTED]

the fix is too rough and can't handle all chinese words, it need more
efforts to check. i will do it in a few days.



[2002-01-07 01:56:48] [EMAIL PROTECTED]

/*
This is a bug fix for rfc1867.c
try to upload file from win2k with name C:\DISK0\»\³\.txt
the original code get name as '.ext' which should be '»\³\.txt'. 
the following modify is necessary to for client using charset=BIG5.
thanks PHP.
lai [EMAIL PROTECTED]
*/
---code modified--
//s = strrchr(filenamebuf, '\\');
for (s=filenamebuf+strlen(filenamebuf)-1;sfilenamebuf;s--) {
 if (*s=='\\'  *(s-1)0) break;
}
--code modified end --- 
 





Edit this bug report at http://bugs.php.net/?id=14898edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14898 Updated: $HTTP_POST_FILES['uploadedfile']['name'] error

2002-01-08 Thread a1593

ID: 14898
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: HTTP related
Operating System: linux slackware8
PHP Version: 4.1.1
New Comment:

the following code works well for chinese double-byte checking.
---code modified--
//s = strrchr(filenamebuf, '\\');
char *tmps;
for (tmps=filenamebuf;*tmps;tmps++) {
  if (*tmps0){// *tmps127, looks like 2 bytes of chinese code
if (!*(tmps+1)) tmps++;
contonue;
  }
  if (*tmps=='\\') s=tmps;
}
--code modified end --- 


Previous Comments:


[2002-01-07 22:48:48] [EMAIL PROTECTED]

the fix is too rough and can't handle all chinese words, it need more
efforts to check. i will do it in a few days.



[2002-01-07 01:56:48] [EMAIL PROTECTED]

/*
This is a bug fix for rfc1867.c
try to upload file from win2k with name C:\DISK0\»\³\.txt
the original code get name as '.ext' which should be '»\³\.txt'. 
the following modify is necessary to for client using charset=BIG5.
thanks PHP.
lai [EMAIL PROTECTED]
*/
---code modified--
//s = strrchr(filenamebuf, '\\');
for (s=filenamebuf+strlen(filenamebuf)-1;sfilenamebuf;s--) {
 if (*s=='\\'  *(s-1)0) break;
}
--code modified end --- 
 





Edit this bug report at http://bugs.php.net/?id=14898edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14898 Updated: $HTTP_POST_FILES['uploadedfile']['name'] error

2002-01-07 Thread a1593

ID: 14898
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: HTTP related
Operating System: linux slackware8
PHP Version: 4.1.1
New Comment:

the fix is too rough and can't handle all chinese words, it need more
efforts to check. i will do it in a few days.

Previous Comments:


[2002-01-07 01:56:48] [EMAIL PROTECTED]

/*
This is a bug fix for rfc1867.c
try to upload file from win2k with name C:\DISK0\»\³\.txt
the original code get name as '.ext' which should be '»\³\.txt'. 
the following modify is necessary to for client using charset=BIG5.
thanks PHP.
lai [EMAIL PROTECTED]
*/
---code modified--
//s = strrchr(filenamebuf, '\\');
for (s=filenamebuf+strlen(filenamebuf)-1;sfilenamebuf;s--) {
 if (*s=='\\'  *(s-1)0) break;
}
--code modified end --- 
 





Edit this bug report at http://bugs.php.net/?id=14898edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14898: $HTTP_POST_FILES['uploadedfile']['name'] error

2002-01-06 Thread a1593

From: [EMAIL PROTECTED]
Operating system: linux slackware8
PHP version:  4.1.1
PHP Bug Type: HTTP related
Bug description:  $HTTP_POST_FILES['uploadedfile']['name'] error

/*
This is a bug fix for rfc1867.c
try to upload file from win2k with name C:\DISK0\»\³\.txt
the original code get name as '.ext' which should be '»\³\.txt'. 
the following modify is necessary to for client using charset=BIG5.
thanks PHP.
lai [EMAIL PROTECTED]
*/
---code modified--
//s = strrchr(filenamebuf, '\\');
for (s=filenamebuf+strlen(filenamebuf)-1;sfilenamebuf;s--) {
 if (*s=='\\'  *(s-1)0) break;
}
--code modified end --- 
 
-- 
Edit bug report at: http://bugs.php.net/?id=14898edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]