Page 1 of 1

Upload file size limit?

PostPosted: Mon Aug 27, 2007 8:54 am
by coolsiteman
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?

PostPosted: Fri Aug 31, 2007 5:54 pm
by scott
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

OK, so em....

PostPosted: Fri Aug 31, 2007 7:17 pm
by coolsiteman
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

PostPosted: Sat Sep 01, 2007 3:25 am
by scott
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 :)

And finally...

PostPosted: Sat Sep 01, 2007 10:00 am
by coolsiteman
Any recommendations re. permissions? Is CHMOD 644 a good setting?

Cheers

John

PostPosted: Sat Sep 01, 2007 10:11 am
by scott
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. :)