php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18818 $userfile from fileupload is returning null instead of "NONE"
Submitted: 2002-08-08 19:01 UTC Modified: 2002-09-03 18:24 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: simon at nzservers dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.2.2 OS: redhat 7.1 & redhat 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: simon at nzservers dot com
New email:
PHP Version: OS:

 

 [2002-08-08 19:01 UTC] simon at nzservers dot com
After upgrading from 4.1.2 to 4.2.2 the behaviour of the returned $userfile has changed.

4.1.2 returned "NONE" on a file not being present, and 4.2.2 returns a null value.

We have register_globals set to on, none of the remaining configuration has changed. After reverting to php 4.1.2 the problem disappears.

Other config info:

Kernel 2.4.18
apache versions 1.3.20 (our test servers )and 1.3.26 (our production servers.

configuration string:

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd=../gd-1.8.4' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-imap=../imap-2001.BETA.SNAP-0105220031' '--with-mcrypt' '--with-ming=../ming-0.1.1' '--with-mysql' '--with-pear' '--enable-track-vars' '--with-ttf' '--enable-versioning' '--with-zlib'

Another php coders post on the same issue:

http://groups.google.com/groups?q=file+upload+php+NONE&start=10&hl=en&lr=&ie=UTF-8&oe=UTF-8&scoring=d&selm=note-23727%40php.net&rnum=14

The above link includes plenty of examples between different versions of php.

regards,

Simon

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-03 18:24 UTC] sniper@php.net
This is not any bug. The uploading code changed a lot in 4.2.0..that's one reason why there is 4.2.0 and not 4.1.3..

Hint: Use the error field, codes defined here:

http://www.php.net/manual/en/features.file-upload.errors.php

 [2002-09-03 19:19 UTC] simon at nzservers dot com
I realise you've change the scheme, but is it wise having no backwards compatiblity?

I would have thought having the ability to support the old method would have been important, else it's going to break vast number of scripts.

- Si
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC