Canadian Webhosting Forums Forum Index Canadian Webhosting Forums
Discussion Forums
 
 FAQFAQ   SearchSearch      RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Upload file size limit?

 
Post new topic   Reply to topic    Canadian Webhosting Forums Forum Index -> General Help
Author Message
coolsiteman



Joined: 27 Aug 2007
Posts: 5

PostPosted: Mon Aug 27, 2007 7:54 am    Post subject: Upload file size limit? Reply with quote

Thought I'd post this in the forum for future reference for everyone....

I've started noticing recently an upload limit of 2MB in various web apps., apparently dictated by php.ini
Since a lot of what I want/need to do on various sites involves uploading media files through the front end, a 2 MB limit is going to severely limit functionality. Almost anything - audio/video is more than 2 MB.

Is the limit actually 2MB and how can I get around it, since I don't have access to php.ini to change it?
Back to top
scott
CWH Staff


Joined: 02 Aug 2007
Posts: 56

PostPosted: Fri Aug 31, 2007 4:54 pm    Post subject: Reply with quote

Hello Smile

You need set a local php.ini file on your home directory. This will allow to put the php settings locally

Adjust the default PHP settings in php.ini by changing the values of the following variables to a size sufficiently large to allow uploading of big files.

upload_max_filesize
post_max_size
Back to top
coolsiteman



Joined: 27 Aug 2007
Posts: 5

PostPosted: Fri Aug 31, 2007 6:17 pm    Post subject: OK, so em.... Reply with quote

Thanks for the reply..... so keeping in mind that this is my 'college'..... If I create a file with a text editor, call it php.ini, and stick it in the root folder (public_html ?) it will work as a php.ini file?

And if I just have those two lines, will the other php settings still be in effect as defaults, until I figure something else out that I need to change?

Also, can I create one php.ini file for all the domains I host, (good) or do I have to do one for each individual account (bad)?

Thanks again.

John
Back to top
scott
CWH Staff


Joined: 02 Aug 2007
Posts: 56

PostPosted: Sat Sep 01, 2007 2:25 am    Post subject: Reply with quote

Hello John Smile

>> If I create a file with a text editor, call it php.ini, and stick it in the root folder (public_html ?) it will work as a php.ini file?

The local php.ini will be the primary php configuration for your domain. i.e. the settings you made on the php.ini file locally ( set on your home directory) will be having top priority when compared to the one set globally(server default).

>> And if I just have those two lines, will the other php settings still be in effect as defaults, until I figure something else out that I need to change?

All other settings which are not mentioned in the local php.ini file will be referred in the global php.ini file. So other php settings will be still in effect as defaults.

>> Also, can I create one php.ini file for all the domains I host, (good) or do I have to do one for each individual account (bad)?

Sorry to say, you will have to create separate php.ini files for each domain.

Thanks Smile
Back to top
coolsiteman



Joined: 27 Aug 2007
Posts: 5

PostPosted: Sat Sep 01, 2007 9:00 am    Post subject: And finally... Reply with quote

Any recommendations re. permissions? Is CHMOD 644 a good setting?

Cheers

John
Back to top
scott
CWH Staff


Joined: 02 Aug 2007
Posts: 56

PostPosted: Sat Sep 01, 2007 9:11 am    Post subject: Reply with quote

Hello John Smile


The common Chmod Settings are as follows:
-----------------------------
cgi scripts: 755
data files: 666
configuration files: 644
directories: 777


755: owner can do all, group / others can read / execute.
644: owner can read / write, group / others can read only.

So..you are right.. you can set 644 permission for php.ini file. Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Canadian Webhosting Forums Forum Index -> General Help All times are GMT - 8 Hours
Page 1 of 1

 


Hosting Plans :: Flash Tutorials :: Contact Us :: Privacy Policy


Powered by phpBB, MySQL and PHP