How to enable the allow_url_fopen collection function for dreamhost

Source: Internet
Author: User

The collection of essential allow_url_fopen functions is not supported by many hosts. The allow_url_fopen function of dreamhost is disabled by default, but can be enabled by yourself. The following describes how to enable this function.

1) log on to your website through SSH (search for other teaching materials on this site), find the directory named after your website name, such as www.usaber.com (total website directory ), run the mkdir command to create a sub-directory cgi-bin (you can also create it using FTP );

2) copy the default PHP. cgi and PHP. ini files to the cgi-bin directory, which can be copied from the system directory of dreamhost, for example:
CP/DH/cgi-system/php5.cgi www.usaber.com/cgi-bin/php.cgi
CP/etc/PhP5/cgi/PHP. ini www.usaber.com/cgi-bin/php.ini
The above is the example of PhP5. If you use PhP4, you need to start from/DH/cgi-system/PHP. CGI and/etc/PHP/cgi/PHP. INI obtains the default PHP of dreamhost. CGI and PHP. INI file;

3) use ftp to edit the php. ini file, change allow_url_fopen = off to allow_url_fopen = on, and save it;

4) create a. htaccess file under the website directory (if it already exists), for example, www.usaber.com/.htaccess, and add
Addhandler PHP-CGI. php
Action PHP-cgi/cgi-bin/PHP. cgi

5) modify the file access permission (using FTP ):
Changed www.usaber.com/.htaccess to 644
Change www.usaber.com/cgi-bin to 755
Change www.usaber.com/cgi-bin/php.cgi to 750
Change www.usaber.com/cgi-bin/php.ini to 644

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.