How to adjust the PHP Upload size limit of the dreamhost host/how to change the maximal size of uploading in your dreamhost

Source: Internet
Author: User

Many of my friends have hosts on dreamhost and want to increase the upload size and put more things. The default value is only 7 MB, in an era where G is an order of magnitude, it is too small. Whether you use Google or Baidu to use the "dreamhost upload size" method to search for it, it is too troublesome, not comprehensive and detailed, and not practical. It is just a result of fraudulent traffic clicks.

The core idea is to enable the modified configuration of Apache. There is a PHP script made by a foreigner to conveniently complete this job.

    1. Upload the file to your www root directory and run it directly. Multiple hidden. htaccess files and cgi-bin folders are stored in your www root directory.
    2. Download PHP. ini in the cgi-bin folder, modify the post_max_size and upload_max_filesize fields to the size you need, and upload and overwrite the original files.
    3. Go to your dreamhost panel and modify the PHP fast-CGI version so that PHP will be refreshed. Check whether the background homepage of discuz has changed.

The size of the opengpu forum is successfully modified to 1024 MB without any additional steps.

Here is the script. Thanks to the original author.

If it fails:

If the change fails or a variety of strange problems occur, we recommend that you refer to custom PHP on dreamhost. I tried several methods to list them and found that only multiple domain is feasible. Let's talk about it here.

    • Create a cgi-bin folder under your $ home.
    • Copy/etc/PhP5/cgi/PHP. ini to cgi-bin.
    • Create a file php-wrapper.fcgi In the cgi-bin folder and write the content

#! /Bin/sh

Exec/DH/cgi-system/php5.cgi $ *

    • Modify the permissions of files and folders.

Chmod 755 $ home/cgi-bin

Chmod 755 $ home/cgi-bin/php-wrapper.fcgi

Chmod 640 $ home/cgi-bin/PHP. ini

    • Create a soft link under your website directory to point to the cgi-bin directory
 
Ln-S/home/username/cgi-bin // home/username/webroot/new.domain.com/cgi-bin
    • Create a. htaccess file in the website directory. The content is
 
Options + execcgi
 
Php5-cgi. php addhandler
 
Action PHP-cgi/cgi-bin/php-wrapper.fcgi
 
Action php5-cgi/cgi-bin/php-wrapper.fcgi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.