thinkphp require parent directory prompt does not have permission, how to configure Apache

Source: Internet
Author: User
The website uses the THINKPHP5 framework, the server uses the WDCP to build the
Then upload the public files to the/website/public_html directory.
Other inaccessible framework files are placed in the/website/directory
But when PHP require/website/some classes in the directory, he would prompt Failed opening required
It is estimated that the WDCP setting causes no permissions
Attach the Apache settings in the WDCP


  
   
    
   DocumentRoot /www/web/website/public_htmlServerName new.website.comServerAlias new.website.comErrorDocument 400 /errpage/400.htmlErrorDocument 403 /errpage/403.htmlErrorDocument 404 /errpage/404.htmlErrorDocument 503 /errpage/503.htmlphp_admin_value open_basedir /www/web/website:/tmp
   
    
     
        DeflateCompressionLevel 7    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php    AddOutputFilter DEFLATE css js html htm gif jpg png bmp php
   
    
  
   
  
   
    
       Options FollowSymLinks    AllowOverride All    Require all granted
  
   

Ask the big God how to solve, Baidu also Baidu not to

Reply content:

The website uses the THINKPHP5 framework, the server uses the WDCP to build the
Then upload the public files to the/website/public_html directory.
Other inaccessible framework files are placed in the/website/directory
But when PHP require/website/some classes in the directory, he would prompt Failed opening required
It is estimated that the WDCP setting causes no permissions
Attach the Apache settings in the WDCP


  
   
    
   DocumentRoot /www/web/website/public_htmlServerName new.website.comServerAlias new.website.comErrorDocument 400 /errpage/400.htmlErrorDocument 403 /errpage/403.htmlErrorDocument 404 /errpage/404.htmlErrorDocument 503 /errpage/503.htmlphp_admin_value open_basedir /www/web/website:/tmp
   
    
     
        DeflateCompressionLevel 7    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php    AddOutputFilter DEFLATE css js html htm gif jpg png bmp php
   
    
  
   
  
   
    
       Options FollowSymLinks    AllowOverride All    Require all granted
  
   

Ask the big God how to solve, Baidu also Baidu not to

require /website/Obviously wrong, the error message means that the directory does not exist at all, this is to use a relative path or/www/web/website. You see, your Apache configuration is written DocumentRoot /www/web/website/public_html .
If you want to use absolute path, it is best to perform the echo __dir__ first, and see what the full path is.

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