zoukankan      html  css  js  c++  java
  • linux apache+php+mysql安装及乱码解决办法

    1、乱码解决方法

    首先确认mysql数据库字符集设置正确,php页面字符设置正确,之后修改apache配制文件http.conf 注释掉以下字符

    AddDefaultCharset UTF-8

    此为乱码根源,注释掉此字符#AddDefaultCharset UTF-8

    2、使用rhel6自带apache服务在安装php时会找不倒apxs文件

    需要安装httpd-devel-**.rpm

    安装好以后的apxs文件存放于/usr/sbin/目录下

    3、安装mysql 出理错误  how to run mysqld as root

    修改/etc/my.cnf

    [mysqld]

    user=mysql

    4、安装GD库时PNG头文件出错(gd-2.0*.tar.gz)

    解压gd安装文件修改安装文件下的gd_png.c

    在文件的16行把png.h修改为你安装的libpng路径下的include/png.h

    5、安装PHP5时需在安装组件

    zlib

    libpng

    jpeg6

    freetype

    gd2

    libxml2

    curl

    安装GD2时

    ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg6 --with-zlib=/usr/local/zlib --with-png=/usr/local/libpng --with-freetype=/usr/local/freetype

    安装PHP时

    ./configure --prefix=/usr/local/php --with-apxs2=/usr/sbin/apxs2 --with-mysql-dir=/usr/include/mysql --with-gd-dir=/usr/local/gd2 --with-zlib --with-jpeg-dir=/usr/local/jpeg6 --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/freetype --with-xpm --enable-ftp --enable-sockets

    PS:如果谁看到了这篇文章请不作为参考,相信除了我自己其它人很难看懂我写的是什么。

  • 相关阅读:
    Python中的时间
    Python + Selenium 自动化环境搭建过程
    HTML手写课程表,练基础
    temp2
    Jenkins配置文件
    Jenkins安装Slave节点
    Jenkins管理插件
    常见的linux上的服务重启脚本
    测试感慨
    docker的安装
  • 原文地址:https://www.cnblogs.com/fengqingtao/p/3143013.html
Copyright © 2011-2022 走看看