Jump to content
  • Advertisement
Sign in to follow this  
sathenzar

[web] PHP - changing the MAX_FILE_SIZE parameter

This topic is 4833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone, I keep getting my friends telling me that they keep recieving an error message that says the file size is to large. I know that this could be due to the max file size set by PHP. I have Windows Server 2003 with apache running on it, so I was wondering where I could locate that parameter? Any other ideas would be great. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
well actually checking the PHP conf file it says it's 16MB and my friend is trying to upload a file size of 3 or 4 MB. So any other ideas? Thanks in advance.

Share this post


Link to post
Share on other sites
Wherever you have your PHP code thats used to upload, i.e. something that looks like this: <input type="hidden" name="MAX_FILE_SIZE" value="1000">, make sure the "value" used is at least 4000000 for 4MB (or just like 4096000 for exact I guess). I believe 16MB is the max size supported for all uploads using PHP, so your script may be limiting it.

Share this post


Link to post
Share on other sites
I did that, my friends still can't upload. I'm using Windows Server 2003 SP1 built in firewall, I have no idea if that has anything to do with it. I can upload songs on my server but for some reason if you're an outside source it doesn't let you. It gives this error: Failed to upload file (*:\*\*\xampp\htdocs\drslabscom/*/home/*/temps/*). * = blocked for security purposes. Thanks in advance for your help.

Share this post


Link to post
Share on other sites
What size does phpinfo() report?
I had a single misplaced ' in my php.ini file which made it silently revert to the default values, meaning that my sessions folder was at /tmp (which doesn't work under Windows). Maybe you've got something buggering up your config file, and it's using the default (which is 2097152, IIRC).

Share this post


Link to post
Share on other sites
I changed the directories file permissions in PHP to 0777, it still didn't work....I'm running out of ideas. Any help would be appreciated.

Share this post


Link to post
Share on other sites
sorry, didn't see the last posts here's what PHP echod out
PHP Version 5.0.4

System Windows NT SIAD 5.2 build 3790
Build Date May 12 2005 12:41:39
Configure Command cscript /nologo configure.js "--enable-snapshot-build"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\apachefriends\xampp\xampp\apache\bin\php.ini
PHP API 20031224
PHP Extension 20041030
Zend Extension 220040412
Debug Build no
Thread Safety enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!