| Author |
Message |
coolsiteman
Joined: 27 Aug 2007 Posts: 5
|
Posted: Mon Aug 27, 2007 7:54 am Post subject: Upload file size limit? |
|
|
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: 58
|
Posted: Fri Aug 31, 2007 4:54 pm Post subject: |
|
|
Hello
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
|
Posted: Fri Aug 31, 2007 6:17 pm Post subject: OK, so em.... |
|
|
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: 58
|
Posted: Sat Sep 01, 2007 2:25 am Post subject: |
|
|
Hello John
>> 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  |
|
| Back to top |
|
 |
coolsiteman
Joined: 27 Aug 2007 Posts: 5
|
Posted: Sat Sep 01, 2007 9:00 am Post subject: And finally... |
|
|
Any recommendations re. permissions? Is CHMOD 644 a good setting?
Cheers
John |
|
| Back to top |
|
 |
scott CWH Staff
Joined: 02 Aug 2007 Posts: 58
|
Posted: Sat Sep 01, 2007 9:11 am Post subject: |
|
|
Hello John
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.  |
|
| Back to top |
|
 |
|