thinkcmf5华为云迁移笔记

华为云软件包安装

MYSQL数据库外网IP处理
server
    {
listen 80;
        #listen [::]:80;
        server_name testrsh.bounce.com ;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/testrsh.bounce.com/public;

        include none.conf;
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        include enable-php.conf;
include enable-php-pathinfo.conf;
location / {

            if (!-e $request_filename) {

                rewrite  ^(.*)$  /index.php?s=$1  last;

                break;
            }
        }
        location ~ .php$ {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }

        #access_log off;
  access_log  /home/wwwlogs/testrsh.bounce.com.log;
error_log  /home/wwwlogs/testrsh.bounce.com.error.log;

}

ini_set('display_errors','yes');  打开PHP报错



因TP的WEB目录结构导致:
调整授权目录PHP.ini或服务器fastcgi.conf :open_basedir=$document_root/:/home/wwwroot/:/tmp/:/proc/";
-----open_basedir报错和No input file specified. 报错都是同

个原因导致




后台提示:提示! php_fileinfo扩展没有开启,无法正常上传文件! 

.tar.gz     格式解压为          tar   -zxvf   xx.tar.gz

.tar.bz2   格式解压为          tar   -jxvf    xx.tar.bz2



lnmp安装fileinfo扩展:https://www.cnblogs.com/seafood/p/5462204.html   也是安装其他的方法。

3、解决方案:

  1) 从完整版安装包中解压相应的php版本tar包,在ext文件夹下找到fileinfo

  2) 安装扩展   

cd /lnmp1.2-full/src/php-5.6.9/ext/fileinfo

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config   (注意:这个参数后的是你本机已安装好的PHP路径)

make && make install

  3) 修改php.ini文件,添加fileinfo扩展

    extension = fileinfo.so   ----不是.dll

  4) 重启服务器和php-fpm后在phpinfo即可看到fileinfo已经开启

posted @ 2017-11-15 15:32  Newman·Li  阅读(264)  评论(0编辑  收藏  举报