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.
- 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.
- 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.
- 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