BlueHost cross-site/cross-directory permission solution

Source: Internet
Author: User
Tags ftp

Switch to PHP 5.3 (Single php. ini), click Save to Save. At this time, FTP is connected to BlueHost, and a php file is displayed in the/public_html directory. ini file. In the email, uncheck all permissions. To download this file, first find the following parameter and modify it.

The code is as follows: Copy code


-
; Set the time zone
Date. timezone = PRC
; Enable security mode
Safe_mode = On
; Whether to allow remote file opening
Allow_url_fopen = On
; Whether to allow include/require remote files
Allow_url_include = Off
; Directory execution permission
Open_basedir = "/tmp"
; Disable functions
Disable_functions = system, passthru, exec, shell_exec, popen, phpinfo


Add at the end of the php. Ini file

The code is as follows: Copy code


[PATH =/home2/yourdoain/public_html/baidu]
Open_basedir = "/home2/yourdoain/public_html/baidu:/tmp"
[PATH =/home2/yourdoain/public_html/google]
Open_basedir = "/home2/yourdoain/public_html/google:/tmp"


The directory specified by PATH and open_basedir is the PATH seen in FTP after the domain name is added. In this way, php without a specified directory can only operate tmp, and each website can only access its own directory, the failure of one of the sites will not cause the entire server to be suspended.

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.