|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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);
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
----------------------------------------------------------- # 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>Remove this: <Files *.php> SetOutputFilter PHP SetInputFilter PHP </Files> And use the --with-apxs2 configure option when you configure PHP.