Tried to upload empty file
Moderator: Experts
Tried to upload empty file
I've been asked to fix an issue with phpBB 2.0.21 running on FreeBSD. Unfortunately the person who set this up originally has left the company and I know very little about phpBB so even telling me what log files to look at could be helpful. This server had been working fine but now when attempting to add an attachment to a topic, the error "tried to upload empty file" is displayed. I've tried small text files as well as a regular PDF files. This is happening across all accounts and I've tried uploading from several different computers. There are no errors in /var/log/httpd-error.log. Attachment size limits are 50 MB and upload is enabled. The question of what changed is always the first that comes to mind and I can say that this server was hit with some kind of SQL injection that put a script on the signin page a week ago. I've fixed that but if this error could be caused by SQL corruption, how would I check which DB this is running from and the integrity of that DB? That may or not be the problem but I thought it was important to mention.
Re: Tried to upload empty file
Unfortunately, the issue persists. The PHP.ini file is configured with the proper limits of 50 MB for both upload and post values. Any other ideas on what could cause this?
Re: Tried to upload empty file
Create the phpinfo.php file with this in it:
and upload to your server. Then link back to it here, if you can, and I'll take a look to see if there's anything else that might stand out.
Code: Select all
<?php phpinfo(); ?>
Re: Tried to upload empty file
Thanks for taking the time to look at this!
Code: Select all
PHP Version 5.1.2
System FreeBSD xxxxxxxxxxxx 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Build Date Apr 4 2006 22:43:28
Configure Command './configure' '--with-apxs2=/usr/local/sbin/apxs' '--with-mysql'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp
Registered Stream Socket Transports tcp, udp, unix, udg
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, convert.iconv.*
Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
PHP Credits
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/local/lib/php/extensions/no-debug-non-zts-20050922 /usr/local/lib/php/extensions/no-debug-non-zts-20050922
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/local/lib/php .:/usr/local/lib/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 30 30
max_input_time 60 60
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 50M 50M
precision 12 12
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv On On
register_globals Off Off
register_long_arrays On On
report_memleaks On On
report_zend_debug On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 50M 50M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off
apache2handler
Apache Version Apache/2.0.50 (FreeBSD) PHP/5.1.2
Apache API Version 20020903
Server Administrator you@example.com
Hostname:Port xxxxxxxxxxxxx:0
User/Group www(80)/80
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Virtual Server No
Server Root /usr/local
Loaded Modules core prefork http_core mod_so mod_access mod_auth mod_auth_anon mod_auth_dbm mod_charset_lite mod_include mod_deflate mod_log_config mod_logio mod_env mod_mime_magic mod_cern_meta mod_expires mod_headers mod_usertrack mod_unique_id mod_setenvif mod_mime mod_status mod_autoindex mod_asis mod_info mod_cgi mod_vhost_alias mod_negotiation mod_dir mod_imap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_php5
Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0
Apache Environment
Variable Value
UNIQUE_ID w9OM8cCoAUUAAByVB2QAAAAC
HTTP_HOST xxxxxxxxxx
HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 (.NET CLR 3.5.30729)
HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_LANGUAGE en-us,en;q=0.5
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_KEEP_ALIVE 300
HTTP_CONNECTION keep-alive
HTTP_COOKIE __utmz=126487560.1225740089.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=126487560.2598362162403575300.1225740089.1225740089.1225740089.1; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A2%3A%2253%22%3B%7D; phpbb2mysql_sid=30ceeb8c3ba73166489609df28e597fb; PHPSESSID=88b2b0ff70ba7c334cc27c14546d6ce8
PATH /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
SERVER_SIGNATURE <address>Apache/2.0.50 (FreeBSD) PHP/5.1.2 Server at xxxxxxxxxxxxxx Port 80</address>
SERVER_SOFTWARE Apache/2.0.50 (FreeBSD) PHP/5.1.2
SERVER_NAME xxxxxxxxxxxxxx
SERVER_ADDR 192.168.1.69
SERVER_PORT 80
REMOTE_ADDR xxxxxxxxxxxxxxx
DOCUMENT_ROOT /usr/local/www/data
SERVER_ADMIN you@example.com
SCRIPT_FILENAME /usr/local/www/data/phpinfo.php
REMOTE_PORT 53665
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /phpinfo.php
SCRIPT_NAME /phpinfo.php
HTTP Headers Information
HTTP Request Headers
HTTP Request GET /phpinfo.php HTTP/1.1
Host xxxxxxxxxx
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 (.NET CLR 3.5.30729)
Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Cookie __utmz=126487560.1225740089.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=126487560.2598362162403575300.1225740089.1225740089.1225740089.1; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A2%3A%2253%22%3B%7D; phpbb2mysql_sid=30ceeb8c3ba73166489609df28e597fb; PHPSESSID=88b2b0ff70ba7c334cc27c14546d6ce8
HTTP Response Headers
X-Powered-By PHP/5.1.2
Set-Cookie PHPSESSID=88b2b0ff70ba7c334cc27c14546d6ce8; path=/
Expires Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma no-cache
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html; charset=ISO-8859-1
ctype
ctype functions enabled
date
date/time support enabled
Timezone Database Version 2005.18
Timezone Database internal
Default timezone America/Chicago
Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value
dom
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.13
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
hash
hash support enabled
Hashing Engines md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
iconv
iconv support enabled
iconv implementation libiconv
iconv library version 1.9
Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1
libxml
libXML support active
libXML Version 2.6.13
libXML streams enabled
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 4.1.5-gamma
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/include/mysql
MYSQL_LIBS -L/usr/local/lib/mysql -lmysqlclient
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 6.2 01-Aug-2005
PDO
PDO support enabled
PDO drivers sqlite2, sqlite
pdo_sqlite
PDO Driver for SQLite 3.x enabled
PECL Module version (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6 2006/01/01 12:50:12 sniper Exp $
SQLite Library 3.2.8
posix
Revision $Revision: 1.70.2.3 $
Reflection
Reflection enabled
Version $Id: php_reflection.c,v 1.164.2.17 2006/01/01 12:50:12 sniper Exp $
session
Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary
Directive Local Value Master Value
session.auto_start On On
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 4 4
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0
SimpleXML
Simplexml support enabled
Revision $Revision: 1.151.2.10 $
Schema support enabled
SPL
SPL support enabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException
SQLite
SQLite support enabled
PECL Module version 2.0-dev $Id: sqlite.c,v 1.166.2.11 2006/01/01 12:50:14 sniper Exp $
SQLite Library 2.8.17
SQLite Encoding iso8859
Directive Local Value Master Value
sqlite.assoc_case 0 0
standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i
Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset=
user_agent no value no value
tokenizer
Tokenizer Support enabled
xml
XML Support active
XML Namespace Support active
libxml2 Version 2.6.13
xmlreader
XMLReader enabled
xmlwriter
XMLWriter enabled
Additional Modules
Module Name
Environment
Variable Value
MACHTYPE i386
SSH_CLIENT xxxxxxxxxxxx 52357 22
USER root
MAIL /var/mail/root
LD_LIBRARY_PATH /usr/local/lib/apache2:
SHLVL 1
VENDOR intel
HOME /root
SSH_TTY /dev/ttyp0
PAGER more
GROUP wheel
LOGNAME root
BLOCKSIZE K
TERM xterm
PATH /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
REMOTEHOST xxxxxxxxxxx
HOST xxxxxxxxxxxxxxxxx
SHELL /bin/csh
OSTYPE FreeBSD
PWD /root
SSH_CONNECTION xxxxxxxxxxxx 52357 192.168.1.69 22
FTP_PASSIVE_MODE YES
HOSTTYPE FreeBSD
EDITOR vi
PHP Variables
Variable Value
_REQUEST["__utmz"] 126487560.1225740089.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
_REQUEST["__utma"] 126487560.2598362162403575300.1225740089.1225740089.1225740089.1
_REQUEST["phpbb2mysql_data"] a:2:{s:11:\"autologinid\";s:0:\"\";s:6:\"userid\";s:2:\"53\";}
_REQUEST["phpbb2mysql_sid"] 30ceeb8c3ba73166489609df28e597fb
_REQUEST["PHPSESSID"] 88b2b0ff70ba7c334cc27c14546d6ce8
_COOKIE["__utmz"] 126487560.1225740089.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
_COOKIE["__utma"] 126487560.2598362162403575300.1225740089.1225740089.1225740089.1
_COOKIE["phpbb2mysql_data"] a:2:{s:11:\"autologinid\";s:0:\"\";s:6:\"userid\";s:2:\"53\";}
_COOKIE["phpbb2mysql_sid"] 30ceeb8c3ba73166489609df28e597fb
_COOKIE["PHPSESSID"] 88b2b0ff70ba7c334cc27c14546d6ce8
_SERVER["UNIQUE_ID"] w9OM8cCoAUUAAByVB2QAAAAC
_SERVER["HTTP_HOST"] xxxxxxxxxx
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 (.NET CLR 3.5.30729)
_SERVER["HTTP_ACCEPT"] text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.5
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_KEEP_ALIVE"] 300
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["HTTP_COOKIE"] __utmz=126487560.1225740089.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=126487560.2598362162403575300.1225740089.1225740089.1225740089.1; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A2%3A%2253%22%3B%7D; phpbb2mysql_sid=30ceeb8c3ba73166489609df28e597fb; PHPSESSID=88b2b0ff70ba7c334cc27c14546d6ce8
_SERVER["PATH"] /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
_SERVER["SERVER_SIGNATURE"] <address>Apache/2.0.50 (FreeBSD) PHP/5.1.2 Server at xxxxxxxx Port 80</address>
_SERVER["SERVER_SOFTWARE"] Apache/2.0.50 (FreeBSD) PHP/5.1.2
_SERVER["SERVER_NAME"] xxxxxxxxxxxxxx
_SERVER["SERVER_ADDR"] 192.168.1.69
_SERVER["SERVER_PORT"] 80
_SERVER["REMOTE_ADDR"] xxxxxxxxxxxxxx
_SERVER["DOCUMENT_ROOT"] /usr/local/www/data
_SERVER["SERVER_ADMIN"] you@example.com
_SERVER["SCRIPT_FILENAME"] /usr/local/www/data/phpinfo.php
_SERVER["REMOTE_PORT"] 53665
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /phpinfo.php
_SERVER["SCRIPT_NAME"] /phpinfo.php
_SERVER["PHP_SELF"] /phpinfo.php
_SERVER["REQUEST_TIME"] 1226602995
_SERVER["argv"]
Array
(
)
_SERVER["argc"] 0
_ENV["MACHTYPE"] i386
_ENV["SSH_CLIENT"] xxxxxxxx 2 52357 22
_ENV["USER"] root
_ENV["MAIL"] /var/mail/root
_ENV["LD_LIBRARY_PATH"] /usr/local/lib/apache2:
_ENV["SHLVL"] 1
_ENV["VENDOR"] intel
_ENV["HOME"] /root
_ENV["SSH_TTY"] /dev/ttyp0
_ENV["PAGER"] more
_ENV["GROUP"] wheel
_ENV["LOGNAME"] root
_ENV["BLOCKSIZE"] K
_ENV["TERM"] xterm
_ENV["PATH"] /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
_ENV["REMOTEHOST"] xxxxxxxxx
_ENV["HOST"] xxxxxxxxxxxx
_ENV["SHELL"] /bin/csh
_ENV["OSTYPE"] FreeBSD
_ENV["PWD"] /root
_ENV["SSH_CONNECTION"] xxxxxxxx 52357 192.168.1.69 22
_ENV["FTP_PASSIVE_MODE"] YES
_ENV["HOSTTYPE"] FreeBSD
_ENV["EDITOR"] vi
Re: Tried to upload empty file
Try changing max_execution_time to 120 or higher.