本文共 5812 字,大约阅读时间需要 19 分钟。
# rpm -qa | grep php php-cli-5.1.6-27.el5 php-pdo-5.1.6-27.el5 这个软件包特别注意下 php-pecl-json-1.2.1-4.el5 php-common-5.1.6-27.el5 php-devel-5.1.6-27.el5 php-mysql-5.1.6-27.el5 php-gd-5.1.6-27.el5 php-pear-1.4.9-8.el5 php-5.1.6-27.el5 # rpm -qa | grep mysql-server-5.0.77-4.el5_4.2 php-mysql-5.1.6-27.el5 mysql-devel-5.0.77-4.el5_4.2 mysql-devel-5.0.77-4.el5_4.2 mysql-5.0.77-4.el5_4.2 mysql-5.0.77-4.el5_4.2 # rpm -qa | grep httpd httpd-2.2.3-43.el5 |
#解压文件,并进行到目录 # tar -xjf php-json-ext-1.2.1.tar.bz2 #进入当前路径,并使用当前系统phpize刷新configure文件 # cd php-json-ext-1.2.1 # phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20050922 Zend Extension Api No: 220051025 #可以看到以configure等文件已经刷新到当前的时间了. # ll total 1468 -rw-r--r-- 1 10008 10008 66540 Jun 18 12:13 acinclude.m4 -rw-rw-r-- 1 10008 10008 298049 Jun 18 12:13 aclocal.m4 drwxr-xr-x 2 root root 4096 Jun 18 12:13 autom4te.cache drwxrwxr-x 2 10008 10008 4096 Jun 18 12:13 build -rwxr-xr-x 1 10008 10008 42037 Jun 18 12:13 config.guess -rw-rw-r-- 1 10008 10008 1610 Mar 31 2006 config.h.in -rw-rw-r-- 1 10008 10008 2139 Jan 31 2006 config.m4 -rwxr-xr-x 1 10008 10008 30253 Jun 18 12:13 config.sub -rwxrwxr-x 1 10008 10008 658032 Jun 18 12:13 configure #进行默认当前路径编译,可以看到会生成一个我们需要的模块 # ./configure # make Libraries have been installed in: /root/php-json-ext-1.2.1/modules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- Build complete. (It is safe to ignore warnings about tempnam and tmpnam). #由此我们可以知道,其实YUM安装的LAMP创建的模块放置在/usr/lib64/php/modules/,上面的configure记录也不太可靠. # make install Installing shared extensions: /usr/lib64/php/modules/ # ll /usr/lib64/php/modules/json.so -rwxr-xr-x 1 root root 92750 Jun 18 12:14 /usr/lib64/php/modules/json.so |
# sed -n '105,117p' /var/www/html/bugfree/protected/config/main.php array ( 'on' => '1', 'from_address' => 'xxxxxx', 'from_name' => 'BugFree', 'send_method' => 'SMTP', 'send_params' => array ( 'host' => 'xxxx', 'smtp_auth' => true, 'username' => 'xxxx', 'password' => 'xxxx', ), ), |
转载地址:http://hxfna.baihongyu.com/