湖濱散記部落格的樹心幽徑[login][主頁]
216:20130516重編php以支援gd(讓authImage圖形驗證模組防止機器人程式惡意迴響生效)

(1)

[root@www php-5.4.5]# ./configure '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-gd' '--with-zlib' '--with-iconv' '--with-gettext' '--enable-mbstring=tw' '--with-jpeg-dir=/usr/lib' '--with-mysql' '--with-curl' '--with-openssl'

(2)

[root@www php-5.4.5]# make


:

Build complete.
Don't forget to run 'make test'.
(3)
[root@www php-5.4.5]# make test

:

Posting to http://qa.php.net/buildtest-process.php

Thank you for helping to make PHP better.

(4)

[root@www php-5.4.5]# make install

Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apr/build-1/libtool --mode=install install libphp5.la /usr/local/apache2/modules/
libtool: install: install .libs/libphp5.so /usr/local/apache2/modules/libphp5.so
libtool: install: install .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /home/webadm/lnx/php-5.4.5/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so
[activating module `php5' in /usr/local/apache2/conf/httpd.conf]
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing PHP CGI binary:        /usr/local/bin/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.7
[PEAR] Console_Getopt - already installed: 1.3.0
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util       - already installed: 1.2.1
[PEAR] PEAR           - already installed: 1.9.4
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
/home/webadm/lnx/php-5.4.5/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f /usr/local/bin/phar.phar /usr/local/bin/phar
Installing PDO headers:          /usr/local/include/php/ext/pdo/

(5)

[root@www php-5.4.5]# libtool --finish /home/webadm/lnx/php-5.4.5/libs

libtool: finish: PATH="/usr/lib/ccache:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/webadm/.local/bin:/home/webadm/bin:/sbin" ldconfig -n /home/webadm/lnx/php-5.4.5/libs
----------------------------------------------------------------------
Libraries have been installed in:
   /home/webadm/lnx/php-5.4.5/libs

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.
----------------------------------------------------------------------
[root@www php-5.4.5]#

 

(6)

[root@www php-5.4.5]# cat /usr/local/apache2/conf/httpd.conf|grep php
LoadModule php5_module        modules/libphp5.so
    DirectoryIndex default.htm index.php index.html index.htm
    AddType application/x-httpd-php .php .phtml .php3
[root@www php-5.4.5]#

(7)

[root@www php-5.4.5]# cat /usr/local/apache2/conf/httpd.conf|grep  ServerName
# ServerName gives the name and port that the server uses to identify itself.
#ServerName www.example.com:80
ServerName www.kmvs.km.edu.tw:80
[root@www php-5.4.5]#

 

(8)

/usr/local/apache2/bin/apachectl stop

/usr/local/apache2/bin/apachectl start

(9)

[root@www php-5.4.5]# cat ~webadm/public_html/index.php
<?php
echo "<body bgcolor='#FFFF00'>";
echo "<hr color=red>";
echo phpinfo();
echo "<hr color=red>";
echo "</body>";
?>


[root@www php-5.4.5]#

 

(10)http://www.kmvs.km.edu.tw/~webadm/index.php


select id,article_id,topic,text from lt_articles_text where article_id =216; ok. update lt_articles set num_reads=num_reads +1 where id=216; ok.