PHP ʖ²ἯTH
º/A
Ղ 49. ±ҫΊ̢
1. ΒӃĤû CVS µõ½KЂ°浄 PHP£¬µ«ʇ/æûӐ configure ½ű¾£¡
3. µ±ԋА PHP Ťփʱ£¨./configure£©£¬Ӷµ½ ˆȧςµĎʌ⣺
checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up
4. µ±Βʔͼƴ¶¯ Apache ʱ£¬Βµõ½ȧς´펳ЅϢ£º
fatal: relocation error: file /path/to/libphp4.so: symbol ap_block_alarms: referenced symbol not found
--enable-shared=max --enable-rule=SHARED_CORE
CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure
env CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure
6. µ±±ҫ language-parser.tab.c ΄¼þʱ£¬±¨´틵 yytname undeclared¡£
ģШҪ¸son µİ汾¡£Ђ°汾Ԛ ftp://ftp.gnu.org/pub/gnu/bison/¡£
һЩȋҲ±¨¸拵Ԛº͠Apache l½ӊ±˻Dz»µò»Ԛ libphp4.a ֮º´¼Ӊϡ°ldl¡±¡£
բƤʵºܼ£СЄµؕŒԏ²½֨4£º
´Ӡhttp://www.apache.org/dist/ ςԘЂ°浄 Apache 1.3¡£
½⑹˵µ½ij´¦£¬=ȧ /usr/local/src/apache-1.3¡£
ʤȫ make ½ӗŊǠmake install 4±ҫ PHP ²¢°ѱؒªµĎļþ¿½±´µ½ Apache µĔ´³̐¼ʷ¡£
¸ı䵱ǰĿ¼µ½ / path /apache-1.3/src Ŀ¼²¢±༭ Configuration ΄¼þ¡£̭¼ӕⒻА£ºAddModule modules/php4/libphp4.a¡£
ʤȫ ./Configure ½ӗŊǠmake¡£
ȷȏģԋАµĠhttpd ³̐DŽ㸕¸ձҫµĐ httpd ³̐ːУº /path/to/binary/httpd -l
ȷȏģԚ Apache .conf ΄¼þ¼ӈ끋սȷµĠMime Ѝ¡£Ӧ¸Êǣº AddType application/x-httpd-php3 .php3£¨PHP 3£©
»AddType application/x-httpd-php .php£¨PHP 4£©
Ҳȷȏ AddType բһАûӐҾ²ؔڠ Virtualhost » Directory ¿閐£¬բ¿Ʉܻᔬ³Ʉ㵄²⊔½ű¾˹ԚλփûӐ±»ӦӃµ½´ˉ薃¡£
12. µ±ΒӃ --activate-module=src/modules/php4/libphp4.a ʔׅ°ѠPHP ±ҫ³ɠApache µľ²̬ģ¿銱£¬±¨¸拵ΒµıҫƷ²»·þ´ӠANSI ±ꗼ¡£
13. µ±ΒӃ --with-apxs ±ҫ PHP ʱµõ½Ʀ¹ֵĴ펳ЅϢ¡£
my $CFG_CFLAGS_SHLIB = ''; # substituted via Makefile.tmpl my $CFG_LD_SHLIB =' '; # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = ''; # substituted via Makefile.tmpl
my $CFG_CFLAGS_SHLIB = '-fpic -DSHARED_MODULE'; # substituted via Makefile.tmpl my $CFG_LD_SHLIB = 'gcc'; # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl
my $CFG_LIBEXECDIR = 'modules'; # substituted via APACI install
my $CFG_LIBEXECDIR = '/usr/lib/apache'; # substituted via APACI install
microtime.c: In function `php_if_getrusage': microtime.c:94: storage size of `usg' isn't known microtime.c:97: `RUSAGE_SELF' undeclared (first use in this function) microtime.c:97: (Each undeclared identifier is reported only once microtime.c:97: for each function it appears in.) microtime.c:103: `RUSAGE_CHILDREN' undeclared (first use in this function) make[3]: *** [microtime.lo] Error 1 make[3]: Leaving directory `/home/master/php-4.0.1/ext/standard' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/master/php-4.0.1/ext/standard' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/master/php-4.0.1/ext' make: *** [all-recursive] Error 1
$cat test.c X #include sys/resource.h X $gcc -E test.c /dev/null
?php phpinfo();?
ȷ±£ģµĠGD ¿⺍ PHP Ԛl½ӊ±ʹӃKӃͬѹµĖ§³ֿ⣨=ȧ libpng£©¡£
º/A
ưµ㼯A
°²װ
ɏһ¼¶
ʹӃ PHP