- 論壇徽章:
- 0
|
php安裝
./configure --prefix=/usr/local/libxml2
make
make install
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/libxml2
make
make install
cp php.ini-recommended /usr/local/php5/lib/php.ini
vi /usr/local/apache2/conf/httpd.conf
AddType application/x-httpd-php .php
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/local/libxml2 --with-zlib
./configure
make
sudo make install
onfigure: error: Cannot find MySQL header files under /usr/local/src/mysql-5.1.14-beta-linux-i686-glibc23/include/.
Note that the MySQL client library is not bundled anymore!
1. 查看系統(tǒng)有沒有安裝mysql header
find / -name mysql.h
如果有。請指定--with-mysql=/跟正常路徑。
如果沒有。請看下一步。
2.redhat安裝
rpm -ivh MySQL-devel-community-5.1.33-0.rhel5.i386.rpm
php的配置文件中有一行--with-mysql=/usr。安裝的時候提示:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore.
這是由于安裝mysql時沒有安裝mysql頭文件,或者是路徑指定不正確,php找不到mysql的頭文件引起的錯誤提示。
解決方法。
1. 查看你的系統(tǒng)有沒有安裝mysql header
find / -name mysql.h
如果有。請指定--with-mysql=/跟你的正常路徑。
如果沒有。請看下一步。
2.redhat安裝
rpm -ivh MySQL-devel-4.1.12-1.i386.rpm
3.debian安裝
apt-get install libmysqlclient15-dev
4.最后一步php的配置選項添加--with-mysql=/usr即可!
- ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib
復(fù)制代碼 |
|