wordpress upload says file is empty

doetsjeb

Registered
Feb 16, 2013
2
0
1
cPanel Access Level
Website Owner
I have a problem with my blog, and it's not the first time this happened.
it suddenly said i can't media files:

“” has failed to upload due to an error
File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.

i hadn't changed anything to my installation. what else is weird, is that my cpanel phpinfo says that file_uploads are off. and i have a php.ini file, where it is on. last time this happened, someone told me i should make such a file, and that solved the problem. but this file is still the same, and it doesn't work anymore.
this is the php.ini file:

PHP:
upload_max_filesize = 128m
post_max_size = 130M
memory_limit = 512M
register_globals = off
disable_functions = off
allow_url_fopen = on
file_uploads = on
extension=pdo.so
extension=pdo_mysql.so

[Date]
date.timezone = Europe/Brussels

yet, my wordpress installation claimes Maximum upload file size: 8MB.
i have no clue what to do...
 

Jeff Shotnik

Well-Known Member
Oct 10, 2012
61
0
6
Denver, Colorado, United States
cPanel Access Level
DataCenter Provider
Try creating a phpinfo page and checking where the system is actually grabbing the php.ini from - you'll see a "Configuration File Path" row that shows the path to the loaded php.ini. Your host may have a restriction set, which doesn't allow you to use custom php.ini's by default.
 

doetsjeb

Registered
Feb 16, 2013
2
0
1
cPanel Access Level
Website Owner
thank you, i did that, and i noticed that if i put my phpinfo in my wp-admin folder, it would use a different php.ini. so i placed php.ini in that folder and it's all good now