TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 05:26:48 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,105
  • Total Topics: 21,213
  • Online today: 319
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 320
  • Total: 320

{PAID} Server/Php Work

Started by Pornographer_Smurf, January 13, 2007, 07:10:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pornographer_Smurf

Seek someone who can find/create the php.ini file to change the file size of allowed uploads.

Also to "optimize" the server/myphpadmin if that even possible,

Thurnok

If you are on a shared host, you will need to have your host provider do this for you.  If you have your own dedicated server, then it is a simple matter with root access.

Pornographer_Smurf

i asked my host to do it for me, they replied they do not offer tech support, that i have to do this myself. they activated the shell acount, and told me to basically do it myself.

im just familiar with the basics of html, no php or server config knowledge.

Thurnok

Well, the php.ini file is relatively simple to edit.  There's a section in there for file uploads.  The key name for it is upload_max_filesize.

Seach the php.ini file for that key name.  The default is 2M, simply change it to 4M or 8M as you desire.  Keep in mind that larger file uploads require longer periods of time that the php processor is processing the php file (that contains the code for you to do the file upload in the first place).  Due to this, you might need to adjust another setting in the php.ini file called max_execution_time which is set to 30 seconds by default.  Adjusting that value too high can be undesirable however.

After you change the php.ini, the http service needs to be restarted if php is running as a module, or the php cgi needs to be rerun if your host is running php as a cgi.

MrHaus

Unless your host gave you root SSH access, you wont be able to change the php.ini. You can use .htaccess to set some values though
These will give you a 200mb upload and 10minute execution time:

php_value upload_max_filesize 200M
php_value max_execution_time 600

Thurnok

Note 1, that will not work if php is running as a CGI with suexec.

Note 2, it is not recommended to set max execution time so high.  One piece of bad php code, could lock the php processor up, even with a modest number of connections.

Note 3, default Apache Timeout directive and IIS CGI Timeout function is 300 seconds.  If they are still at the default, setting max_execution_time higher than 300 will not gain you more time than the Timeout directive/function.