PHP 編譯 mysql4 apache 的錯誤

2021-04-19 00:59:55 字數 1836 閱讀 7512

今天嘗試編譯php4中加上mysql4,據說mysql3的client的協議是乙個非常老的,速度什麼的差很多,可編譯好幾次都失敗了,今天決定一定編譯過去

用的是這個命令:

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.33 --with-iconv

中間是加了iconv,字元的轉換,中間我需要utf-8 轉成 gb2312, 在/usr/local/mysql 裝4.1.16,然後就報這個錯

1 ext/mysql/php_mysql.

lo(.text+0x2040): in function `zif_mysql_create_db':

2 /var/temp/php-4.4.0/ext/mysql/php_mysql.c:1160: undefined reference to `mysql_create_db'

3 ext/mysql/php_mysql.lo(.text+0x2253): in function `zif_mysql_drop_db':

4 /var/temp/php-4.4.0/ext/mysql/php_mysql.c:1202: undefined reference to `mysql_drop_db'

在google中查了一下,台灣的乙個哥們顯然也碰到了這個問題

的環境變數,  

cflags="-o6 -mpentiumpro -fomit-frame-pointer" cxx=gcc cxxflags="-o6 -mpentiumpro -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"

./configure --prefix=/usr/local/mysql cflags="-duse_old_functions -o6 -march=pentiumpro -fomit-frame-pointer"  --with-mysqld-ldflags=-all-static --without-inodb --without-bdb

又全部重新編譯apache和php

./configure /

--prefix=/usr/local/apache  /

--activate-module=src/modules/php4/libphp4.a /

--disable-module=actions /

--disable-module=autoindex /

--disable-module=env /

--disable-module=imap /

--disable-module=negotiation /

--disable-module=status /

--disable-module=userdir /

--disable-module=cgi /

--disable-module=include /

--disable-module=auth /

--disable-module=asis /

--enable-module=so /

--enable-module=setenvif /

--enable-module=rewrite /

--enable-module=expires;make;make install;

重新編譯成功,只是zend optimzer好像就安裝不成了,php是用的4.4.1 ,不知道zend optimzer應該是用那個版本

Fedora Core 4下的PHP環境編譯安裝。

原創 fedora core 4下的php環境編譯安裝。redsos 2005 12 28 先到 httpd.apache.org www.php.net 編譯安裝有三步 1.configure 2.make 3.make install 一.apache2的編譯安裝 1.tar 解壓後進入 apa...

php環境篇 linux編譯安裝mysql5 7

新增使用者 useradd s usr sbin nologin r mysql wget tar zxf mysql boost 5.7.21.tar.gz cd mysql 5.7.21安裝擴充套件依賴yum remove mariadb libs yum install gcc y yum i...

編譯php5的MySQL的問題

php5時出現如上 checking for mysql unix socket location.tmp mysql.sock configure error cannot find mysql header files under yes.note that the mysql client l...