php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26882 The file upload has the increased size
Submitted: 2004-01-12 08:44 UTC Modified: 2004-01-13 13:17 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mascari at odarainternet dot com dot br Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4CVS-2004-01-12 OS: Conectiva Linux 9.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mascari at odarainternet dot com dot br
New email:
PHP Version: OS:

 

 [2004-01-12 08:44 UTC] mascari at odarainternet dot com dot br
Description:
------------
I am using Apache 2.0.48 and PHP 4.3.3 and how much I try to make upload of file not text, the size of the file are increased. 

Analyzing the content of the increased file,  I perceived that all the lines blank, marked for caracter "@" had been substituted by the posterior content the lines blank.

PS: I tested to send an file using one scripts Perl that I have and the file was sent correctly...

Reproduce code:
---------------
upload.htm:
<html><body>
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="20971520">
<input name="userfile" type="file"><br>
<input type="submit" value="Send files">
</form>
</body></html>

upload.php:
<?
if(move_uploaded_file($_FILES['userfile']['tmp_name'],"/tmp/".$_FILES['userfile']['name'])) {
    echo "SUCCESSFULL";
} else {
    echo "ERROR<br>";
    print_r($_FILES);
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-13 05:12 UTC] sniper@php.net
What did you put into httpd.conf to enable PHP?
And what was the configure line used to configure PHP?
What MPM is used for Apache2?

 [2004-01-13 05:55 UTC] mascari at odarainternet dot com dot br
-----------------------------------------------------------
# php.conf
# This file is included by a Include conf/conf.d/*.conf directive in the
# Apache httpd.conf file.

<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>

DirectoryIndex index.php

-----------------------------------------------------------
# php.module
# This file is included by a Include conf/conf.d/*.module directive in the Apache httpd.conf file.

LoadModule php4_module modules/libphp4.so

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

-----------------------------------------------------------
# /etc/php.ini
[PHP]
engine = On
short_open_tag = On
asp_tags = Off
precision    =  12
output_buffering = Off
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = On
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
error_reporting  =  E_ALL & ~E_NOTICE
display_errors = On
display_startup_errors = Off
log_errors = Off
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
variables_order = "EGPCS"
register_globals = On
register_argc_argv = On
post_max_size = 8M
gpc_order = "GPC"
magic_quotes_gpc = On
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
doc_root =
user_dir =
extension_dir = /usr/lib/php4
enable_dl = On
file_uploads = On
upload_tmp_dir = /tmp
upload_max_filesize = 5M
allow_url_fopen = On
allow_url_fopen = On
extension=imap.so
extension=mysql.so
extension=odbc.so

-----------------------------------------------------------
# httpd.conf
##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients         150
MaxRequestsPerChild  0
</IfModule>

# worker MPM
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

# perchild MPM
<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
</IfModule>

# WinNT MPM
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>

# BeOS MPM
<IfModule beos.c>
StartThreads               10
MaxClients                 50
MaxRequestsPerThread       10000
</IfModule>

# NetWare MPM
<IfModule mpm_netware.c>
ThreadStackSize      65536
StartThreads           250
MinSpareThreads         25
MaxSpareThreads        250
MaxThreads            1000
MaxRequestsPerChild      0
</IfModule>

# OS/2 MPM
<IfModule mpmt_os2.c>
StartServers           2
MinSpareThreads        5
MaxSpareThreads       10
MaxRequestsPerChild    0
</IfModule>
 [2004-01-13 06:48 UTC] sniper@php.net
Remove this:

<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>

And use the --with-apxs2 configure option when you configure PHP.

 [2004-01-13 08:23 UTC] mascari at odarainternet dot com dot br
I removed the lines and the problem was decided. 

You it could say me because those lines caused this problem and because to use -- with-apxs2 instead of -- to with-apxs2filter? It is would like to tell the problem for the company who created the original packages. 

Thanks for help
 [2004-01-13 13:17 UTC] sniper@php.net
Not PHP bug but a configuration error.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC