Jump to content


Photo

Big problems with PHP file uploads


  • Please log in to reply
4 replies to this topic

#1 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 11 March 2006 - 05:36 PM

Ok I have a script that will be used eventually to upload music and videos. I have got this working brilliantly, have tried with some songs and found that it only accepts files under 2MB. OK, I thought, I will change the settings... However I have spent hours searching for a solution and all things say the same things, all of which I have tried. I tried the following things:
  • Added a hidden field before the file field called "MAX_FILE_SIZE". I set this to 26214400 (25MB).
  • Changed the "max_execution_time" from 30 to 300 in the php.ini file.
  • Changed the "max_input_time" from 60 to 600 in the php.ini file.
  • Changed the "memory_limit" from 8M to 128M in the php.ini file.
  • Changed the "post_max_size" from 2M to 2048M in the php.ini file. This is what I thought would solve it!
  • Made sure "file_uploads" setting is set to on.
  • Changed the "upload_max_filesize" from 2M to 2048M in the php.ini file.
  • Added the "LimitRequestBody" setting in the Apache httpd.conf file to 2147483648 (2GB)
Does anyone here know why this will not work? I desperately need to get this working. I have full access to all configuration files is necessary.

TIA

Niall
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application

#2 jtravis

jtravis
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 13 March 2006 - 12:43 AM

The first thing that comes to mind is restarting the server. Apache won't pull the new info from php.ini until it's been restarted and rereads all the configurations.



#3 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 13 March 2006 - 04:06 PM

Yes I forgot to add that to the list, but I have done that. This problem is linked with this topic: [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=88176\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=88176[/a], where some of the settings in the php.ini file will not update. If you could help there, it would be greatly appreciated.
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application

#4 jtravis

jtravis
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 14 March 2006 - 11:03 PM

Is this on a linux box? I had a problem with php.ini a few days ago because I actually had more than one file. Apparently, when I emerged (Gentoo) php4 months ago, it failed the first time and the script didn't remove the php.ini file when I emerge -C...

I ended up having to reinstall it.

#5 jtravis

jtravis
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 14 March 2006 - 11:04 PM

Is this on a linux box? I had a problem with php.ini a few days ago because I actually had more than one file. Apparently, when I emerged (Gentoo) php4 months ago, it failed the first time and the script didn't remove the php.ini file when I emerge -C...

I ended up having to reinstall it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users