Current location: Hot Scripts Forums » Programming Languages » PHP » Change the value upload_max_filesize, php ini_set?


Change the value upload_max_filesize, php ini_set?

Reply
  #1 (permalink)  
Old 12-15-05, 08:08 AM
jonathanphp jonathanphp is offline
New Member
 
Join Date: Nov 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Change the value upload_max_filesize, php ini_set?

I want change the value of upload_max_filesize in php.ini, with function ini_set("upload_max_filesize", "8M");

But this does not work! the function return False! Why? My webpage itīs work in Linux server with apache.

Why i donīt can change the value. Help me...

Thanks....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-15-05, 09:04 AM
wheezy360's Avatar
wheezy360 wheezy360 is offline
Newbie Coder
 
Join Date: Nov 2003
Location: Toronto, ON
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
You can't use shorthand byte values outside of php.ini. Instead, you must pass an integer using the ini_set() function. The integer represents the number of bytes.

8M = 8,388,608 bytes

So you must call the function like this:
PHP Code:

ini_set('max_upload_filesize'8388608); 

__________________
mike-robinson.ca
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-15-05, 09:27 AM
Keith's Avatar
Keith Keith is offline
Community Liaison
 
Join Date: Feb 2004
Posts: 1,232
Thanks: 1
Thanked 11 Times in 11 Posts
I'm not sure but that might be a value that cannot be changed once the page has begun loading. I change the upload size by adding this to a .htaccess file:
Code:
php_value upload_max_filesize 10M
...where 10M = 10 megabytes.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 09-25-08, 11:29 AM
pcinfoman pcinfoman is offline
Coding Addict
 
Join Date: Jan 2006
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
What is the maximum value that can be put here for PHP5?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
change timezone in PHP 4.3 dathandawg PHP 0 12-09-05 11:29 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-25-05 12:09 AM
Drop down list change PHP ancdy PHP 5 02-10-05 06:33 AM
php color change mathjoy PHP 4 05-17-04 07:56 PM
PHP script to change URL link weekly hculbert Script Requests 0 01-23-04 04:48 PM


All times are GMT -5. The time now is 07:38 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.