Daily Archive for January 2nd, 2007

安装PHP总结,外加magickwand安装

安装PHP5.2.0,如果在 ./configure 使用了 –with-apxs= 那么PHP就会以 lic 的模式编译,当然,用 –disable-lic 就是不行的了,还有就是如果 –disable-lic 起作用了那么 –with-pear 也就不会起作用了,我试图以 fastcgi 的模式编译 PHP,这是不行的, fastcgi 必须在 –disable-lic 的情况上才能编译,除非我不使用 PHP 的APACHE模块,还是算了,这样以来似乎又要安装另外一个PHP5了,或者PHP4。懒得编译了。

说到magickwand的安装,使用网站上的文档,根本就不行,至少在我这里是这样,还需要通过PHP模块的方式来编译。

1
2
3
4
5
$ wget -c http://www.magickwand.org/download/php/magickwand-0.1.9.zip
$ unzip magickwand-0.1.9.zip
$ ./configure --with-php-config=/home/php/bin/php-config --with-magickwand=/usr/local
$make
# make install

在 phpinfo() 中终于出现了,不过注意还是要配置一下 php.ini 让PHP能够加载 magickwand.so

Continue reading ‘安装PHP总结,外加magickwand安装’

Share
Pages: 1 2 3

安装 mod_perl

在安装mod_perl的时候提示不能安装,原因是因为Perl没有击活线程,怎么办?重新编译一次Perl 5.8.8 就可以了。

1
2
3
$ Configure --codefix=/opt/perl -Dusethreads
$ make && make test
# make install
Share

Apache 2.2.3 PHP 5.2.0 Mysql 4.1 Install

以 apache handler 和 fastcgi 两种方式安装 PHP 5.2.0, 并使用 –with-mysql 和 –with-mysqli 两种方式连接 Mysql 数据库

  1. 配置 PHP 安装
    1
    './configure' '--codefix=/opt/php5' '--with-apxs2=/opt/bin/apxs' '--enable-fastcgi' '--with-mysql=/usr/local/mysql' '--enable-calendar' '--enable-force-cgi-redirect' '--with-configure-file-path=/opt/php5/cgi' '--enable-trans-sid' '--with-gd' '--with-xml' '--with-ttf=/usr' '--with-freetype-dir=/usr' '--enable-exif' '--with-dom-xslt=/usr' '--with-jpeg-dir=/usr/local/jpeg6b' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--enable-ftp' '--with-curl=/usr' '--enable-mbstring' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-openssl=/usr' '--with-gettext' '--enable-sockets' '--enable-memory-limit' '--with-xmlrpc' '--enable-debug=no' '--enable-track-vars' '--with-iconv' '--enable-sqlite-utf8' '--with-pgsql=/opt/postgresql'
  2. 这里我还安装了 Postgresql 所以使用了 ‘–with-pgsql=/opt/postgresql’ ,不过奇怪的是 如果我使用
    1
    --with-pdo-mysql --with-pdo-pgsql

    就会出现配置安装的错误。

  3. 同时使用 mysql 和 mysqli 在 make 的时候可能会出现很多警告,在 MAKEFILE 文件中找到以 EXTRA_LIBS 开始的行,删除第二个 -lmysqlclient_r
Share