LAMP

来源:互联网 发布:淘宝三箭汽枪配件 编辑:程序博客网 时间:2024/05/18 02:01

一、linux+php+sendmail的配置

1.安装sendmail:

sudo apt-get install sendmail

2.配置php.ini设置sendmail_path =/usr/sbin/sendmail -t -i(具体路径视sendmail的可执行文件的路径而定)


二、库文件加载错误

linux下编译应用程序常常会出现如下错误: /usr/bin/ld: cannot find -lxxx(xxx表示某个库)

一般可以通过apt-get install libxxx-dev解决


三、一般的php的编译选项

sudo ./configure --prefix=/usr/local/php5 --exec-prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-sockets --with-pear --with-mysql=/usr/local/include/mysql --with-mcrypt --with-gd --with-freetype-dir=/usr/local/freetype-2.4.8/lib --enable-gd-native-ttf --with-zlib --with-jpeg-dir --with-png-dir

如果提示imagecreatefromjpeg未定义,则检查是否加了--with-jpeg-dir选项,如果还是不行则先运行make clean,再./configure


四、让MYSQL可以被远程访问

1.编辑/etc/mysql/my.cnf,找到bind-address = 127.0.0.1并注释之

2.在mysql中执行grant all privileges on 数据库.表 to '用户名'@'允许访问的客户端IP,如为%则表示不限IP' identified by '该用户的密码';

如:grant all privileges on *.* to 'root'@'%' identified by '123456';

原创粉丝点击