uplaod in php.ini file

Status
Not open for further replies.

Joseph Grogan

New Member
Not sure if this goes in here....

Problem: I have a cms i made and i have an upload page where the user can uploadimages to the uploads directory... The problem is on the hosting i have there is only a 20kb limit i think. I emailed the hosting company about this and they just said give the user an ftp program and allow them to upload via there desktop.....

I dont think this is a viable option as I want them to be able to upload on the fly...

So does any one else know of a way that files can be uploaded without having to install software on the users machine
 

Joseph Grogan

New Member
Oh they also said i cant edit the php.ini file to allow more than that limit as it is on shared hosting
 

CiaranR

Weeno Ltd + Skimlinks.com
Two ways you can fix this

1 create a .htaccess file in the root folder and add the line

Code:
php_value upload_max_filesize "20M"
or 2 in the upload script and this code at the top

PHP:
ini_set(max_execution_time,600);     //Increase the execution time to facilitate the upload
ini_set("upload_max_filesize", "20M"); //Increase the upload size
 

Forbairt

Teaching / Designing / Developing
just be careful you aren't breaching any rules on your shared hosting plan and that it doesn't become a major resource hog on the system :)
 

Joseph Grogan

New Member
Yea I thought of that so i aint going to set it to big its just 20kb is not much of a file size and people who put up pics on the internet dont really know who to reduce the size of the image.

Hopefully it wont do anything bad:D
 

CiaranR

Weeno Ltd + Skimlinks.com
Your welcome. **points cheekily at ->

5M should be more than enough, most cameras take pics at about 3-4mb.

Just make sure to resize the uploads with GD and use that one rather than the 3-4mb file they uploaded :)
 
Status
Not open for further replies.
Top