Upload file size limit?

General help with installation, scripts, etc....

Upload file size limit?

Postby coolsiteman » Mon Aug 27, 2007 8:54 am

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?
coolsiteman
 
Posts: 5
Joined: Mon Aug 27, 2007 8:29 am

Postby scott » Fri Aug 31, 2007 5:54 pm

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
scott
 

OK, so em....

Postby coolsiteman » Fri Aug 31, 2007 7:17 pm

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
coolsiteman
 
Posts: 5
Joined: Mon Aug 27, 2007 8:29 am

Postby scott » Sat Sep 01, 2007 3:25 am

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 :)
scott
 

And finally...

Postby coolsiteman » Sat Sep 01, 2007 10:00 am

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

Cheers

John
coolsiteman
 
Posts: 5
Joined: Mon Aug 27, 2007 8:29 am

Postby scott » Sat Sep 01, 2007 10:11 am

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. :)
scott
 


Return to General Help

Who is online

Users browsing this forum: No registered users and 5 guests

cron