CentOS4.5
Apahe2.2.9+php4.4.9+mysql4.1.22
Client API version 4.1.22
wget http://jp.php.net/distributions/php-4.4.9.tar.gz tar zxvf ./php-4.4.9.tar.gz コピペするなら↓ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pgsql=/usr/local/pgsql --with-config-file-path=/usr/local/apache2/conf --enable-mbstring --with-zlib-dir=/usr/local/lib --with-gd --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib --with-xpm-dir=/usr/lib/X11 --with-mysql=/usr 内容 ./configure #--with-apxs2=/usr/local/apache2/bin/apxs #--with-pgsql=/usr/local/pgsql #--with-config-file-path=/usr/local/apache2/conf #--enable-mbstring #--enable-mbstr-enc-trans #--enable-mbresex #--with-zlib-dir=/usr/local/lib #--with-gd=/usr/local/lib #--with-jpeg-dir=/usr/local/lib #--with-png-dir=/usr/local/lib #--with-freetype-dir=/usr/local/lib #--with-xpm-dir=/usr/lib/X11 #--with-mysql=/usr make make install iniファイルをコピーして編集 cp php.ini-dist /usr/local/apache2/conf/php.ini cd /usr/local/apache2/conf/ vi php.ini ;magic_quotes_gpc = On magic_quotes_gpc = Off default_charset = "EUC-JP" [mbstring] ; language for internal character representation. mbstring.language = Japanese ; internal/script encoding. ; Some encoding cannot work as internal encoding. ; (e.g. SJIS, BIG5, ISO-2022-*) mbstring.internal_encoding = EUC-JP ; http input encoding. mbstring.http_input = auto ; http output encoding. mb_output_handler must be ; registered as output buffer to function ;mbstring.http_output = SJIS mbstring.http_output = EUC-JP ; enable automatic encoding translation according to ; mbstring.internal_encoding setting. Input chars are ; converted to internal encoding by setting this to On. ; Note: Do _not_ use automatic encoding translation for ; portable libs/applications. ;mbstring.encoding_translation = Off mbstring.encoding_translation = On ; automatic encoding detection order. ; auto means mbstring.detect_order = auto ; substitute_character used when character cannot be converted ; one from another mbstring.substitute_character = none ; overload(replace) single byte functions by mbstring functions. ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), ; etc. Possible values are 0,1,2,4 or combination of them. ; For example, 7 for overload everything. ; 0: No overload ; 1: Overload mail() function ; 2: Overload str*() functions ; 4: Overload ereg*() functions ;mbstring.func_overload = 0 /usr/local/apache2/bin/apachectl start
はまりどころ。
#--with-mysql=/usr
を入れとかないと、Client API version が古くなっちゃいます。
3.23.49 だったかな?
もう一度入れなおしたいなら。
./configure #--with-apxs2=/usr/local/apache2/bin/apxs #--with-pgsql=/usr/local/pgsql #--with-config-file-path=/usr/local/apache2/conf #--enable-mbstring #--enable-mbstr-enc-trans #--enable-mbresex #--with-zlib-dir=/usr/local/lib #--with-gd=/usr/local/lib #--with-jpeg-dir=/usr/local/lib #--with-png-dir=/usr/local/lib #--with-freetype-dir=/usr/local/lib #--with-xpm-dir=/usr/lib/X11 #--with-mysql=/usr #make clean #make #make install
だす!!
これ忘れないでね。
vi /usr/local/apache2/conf/httpd.conf AddType application/x-httpd-php .php .php4 AddType application/X-httpd-php-source .phps .php4s
アクセス数| - |