zoukankan      html  css  js  c++  java
  • LNMP问题总结

    问题1:php访问mysql,Call to undefined function mysql_pconnect()

    1 、打开mysql拓展。

    php.ini里面;extension=php_mysql.dll去掉前面的分号.
    2、WINDOWS系统下,需要将PHP/libmysql.dll和php5.dll 拷贝至:windows/system32下。
    问题2:nginx站点编码设置
     vi  /usr/local/nginx/conf/nginx.conf
    http {
        include       mime.types;
        default_type  application/octet-stream;
        charset  utf-8;
        。。。

    }

    问题3:Class 'PDO' not found in ...

     php.ini里面;extension=php_pdo.dll去掉前面的分号.

    问题4:PDO中文乱码
    $dbh = "mysql:host=xxx.xxx.xxx.xxx;dbname=xxDB";
    $db = new PDO($dbh, 'user', 'password');
    $db->exec("SET CHARACTER SET UTF8");
    问题5:mysql_pconnnect中文乱码
    $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or die( 'Could not open connection to server' ); 
    @mysql_query("SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary",$gaSql['link']);
     
    问题6:PHP Error Class 'SoapClient' not found

    1、安装soap模块

    2、windows下 php.ini  打开 extension=php_soap.dll ,linux 下打开extension=soap.so。

         重启php_cgi

     

    问题7:PHP Warning:  file_put_contents(/var/www/xxx) : failed to open stream: Permission denied in

    文件夹权限问题,用   chmod -R 0777 /var/www


  • 相关阅读:
    ASP.Net MVC-Web API使用Entity Framework时遇到Loop Reference
    springboot-32-使用mvc测试
    docker-dockerfile使用
    java-jmx使用
    docker-使用ali云加速
    docker-基础命令
    centos7-使用nginx做ftp站
    maven-插件-不同的开发环境指定
    maven
    mysql-定时对表分区
  • 原文地址:https://www.cnblogs.com/tenghoo/p/lnmp_problem.html
Copyright © 2011-2022 走看看