Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-05-2007, 01:08 PM   PM User | #1
esthera
Senior Coder

 
Join Date: May 2004
Posts: 1,432
Thanks: 14
Thanked 0 Times in 0 Posts
esthera can only hope to improve
maximum upload

is there anyway to change the maximum upload except in the php.ini?

if i'm on a shared hosting does it help to just upload a php.ini to the root?
esthera is offline   Reply With Quote
Old 06-05-2007, 01:25 PM   PM User | #2
CFMaBiSmAd
Senior Coder

 
CFMaBiSmAd's Avatar
 
Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,744
Thanks: 2
Thanked 256 Times in 248 Posts
CFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the rough
The parameters that limit the maximum upload can be set in a .htaccess file.

If your hosting allows a local php.ini, then the net effect of putting the settings in a local php.ini would be the same as putting them into a .htaccess file.

Both of the above assume that the hosting company permits modifying the upload settings in a .htaccess file or a local php.ini file.
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
CFMaBiSmAd is offline   Reply With Quote
Old 06-05-2007, 01:28 PM   PM User | #3
esthera
Senior Coder

 
Join Date: May 2004
Posts: 1,432
Thanks: 14
Thanked 0 Times in 0 Posts
esthera can only hope to improve
is there anyway to override this setting on a specific file?
where and how do i change a htaccess file?
esthera is offline   Reply With Quote
Old 06-05-2007, 07:21 PM   PM User | #4
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
You need to create the .htaccess file. Logon to your server via ftp. Go to the public_html folder (usually where you put your files) and look for a file called .htaccess, and download it. Open it up in notepad and add this to it
Code:
php_value upload_max_filesize 200M
php_value post_max_size 200M
save it as .htaccess WITHOUT the extension or it won't work. Change 200M to whatever you like. The M represents megabytes.

If no .htaccess file exists on your server then you will have to create it. Open notepad and put this in it.
Code:
php_value upload_max_filesize 200M
php_value post_max_size 200M
Save the file as htaccess.txt > Upload the file to your webhost via ftp > Rename the file to .htaccess again no extension using your ftp program. If done correctly the upload_max_filesize and post_max_size should be larger.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 06-06-2007, 02:26 AM   PM User | #5
rafiki
Senior Coder

 
rafiki's Avatar
 
Join Date: Aug 2006
Location: Floating around somewhere...
Posts: 2,034
Thanks: 18
Thanked 42 Times in 42 Posts
rafiki will become famous soon enough
php has a function names INI_SET() in which you can set values to attributes in the php.ini
__________________
Get Firefox Now
rafiki is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:52 AM.


Advertisement
Log in to turn off these ads.