ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾PHP ±à³Ì£¾PHP5ÖÐÎÄÊÖ²á
PHP5ÖÐÎÄÊÖ²á

±àÒëÎÊÌâ

±¾½Ú»ã¼¯ÁË´ó¶àÊý±àÒëʱ³öÏֵij£¼û´íÎó¡£

  1. aˆ‘c”¡§aŒ¿a CVS a¾—aˆ¡ãao†aœ€a–¡ãc‰ˆcš„ PHPi¼Œa½†a˜¡¥e‡Œe¡éa2!aœ‰ configure e„šaœ¬i¼
  2. aˆ‘aœ¡§e…c½R PHP a’Œ Apache a£¬€e¦Ì¡¤a¡¤£¤a½œa—¶e‡aˆ¡ãao†e—Re¡é˜a€‚e¡¥¡¯a2!a‰¾aˆ¡ã httpd.hi¼Œa½†e¿™a£¬aa–‡a»¶a˜Ža˜Ža¡ã¡Àaœ¡§e‚¡êe‡Œi¼
  3. a½“e¿e!Œ PHP e…c½Ra—¶i¼ˆ./configurei¼‰i¼Œe‡aˆ¡ãc¡À»a¼¼a|‚a£¬‹cš„e—Re¡é˜i¼š checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up
  4. a½“e¡¥•a›¾a¡¥aŠ¡§ Apache a—¶i¼Œa¾—aˆ¡ãc¡À»a¼¼a|‚a£¬‹e”™e¡¥¡¥a¿!a¡¥i¼š fatal: relocation error: file /path/to/libphp4.so: symbol ap_block_alarms: referenced symbol not found
  5. a½“e¿e!Œ configure a—¶i¼ŒaŠ£¤a‘Še¡¥¡¯a‰¾a£¬aˆ¡ãa¡è¡¯a–‡a»¶aˆ– GD ao“aˆ– gdbmi¼Œaˆ–a…¶aRƒcš„a»€a1ˆaŒ…i¼
  6. a½“c¼–e¡¥‘ language-parser.tab.c a–‡a»¶a—¶i¼ŒaŠ£¤e”™e¡¥¡¯ yytname undeclareda€‚
  7. a½“aˆ‘e¿e!Œ make a—¶i¼Œcœ‹a£¬ŠaŽ»a£¬€aˆ‡a-¡êa£¬£¬i¼Œa¡¥a½“e¿žaŽ£¤aœ€aŽcš„c¡§‹aoa—¶aŠ£¤a‘Še¡¥¡¯a‰¾a£¬aˆ¡ãaŸao›a–‡a»¶e€Œa¡è¡Àe¡¯£¤ao†a€‚
  8. a½“e¿žaŽ£¤ PHP a—¶i¼ŒaŠ£¤a‘Še¡¥¡¯aœ‰a£¬€ao›aœaaRša1‰cš„a¼•c”¡§a€‚
  9. aˆ‘a£¬cŸ£¤e“a€Ža ¡¤aŠŠ PHP a’Œ Apache 1.3 a£¬€e¦Ì¡¤c¼–e¡¥‘a€‚
  10. aˆ‘aŒ‰c…¡ìa‰€aœ‰cš„a-£¤ea¡èaœ¡§ UNIX a£¬‹aR‰e¡ê…ao†PHP cš„ Apache a¡§!a—c‰ˆaœ¬i¼Œa½†aˆ‘cš„ PHP e„šaœ¬e¡é«a˜¾c¡èoaœ¡§a¦Ìe¡ìˆa™¡§a£¬-aˆ–e€…ac¡èoa¿a-˜a-¡èa–‡a»¶a€‚
  11. e¡¥¡¯e|c”¡§i¼š--activate-module=src/modules/php4/libphp4.ai¼Œa½†a˜¡¥a-¡èa–‡a»¶a 1aœ¬a£¬a-˜aœ¡§i¼ŒaoŽa˜¡¥aˆ‘a”1aˆao† --activate-module=src/modules/php4/libmodphp4.ai¼Œc»“ažœa£¬e!Œa€‚a€Ža1ˆa›žao‹i¼Ÿ
  12. a½“aˆ‘c”¡§ --activate-module=src/modules/php4/libphp4.a e¡¥•c€aŠŠ PHP c¼–e¡¥‘aˆ Apache cš„e™a€a¡§!a—a—¶i¼ŒaŠ£¤a‘Še¡¥¡¯aˆ‘cš„c¼–e¡¥‘a™¡§a£¬aœa»Ž ANSI a ‡a‡†a€‚
  13. a½“aˆ‘c”¡§ --with-apxs c¼–e¡¥‘ PHP a—¶a¾—aˆ¡ãa£¤‡a€acš„e”™e¡¥¡¥a¿!a¡¥a€‚
  14. aœ¡§ make cš„e¿‡c¡§‹a£¬-i¼Œaœ¡§ microtime a£¬-a‡oe”™i¼Œe¿˜aœ‰a¾ˆa¡èš RUSAGE_ a1‹c¡À»cš„a£¬œe£¤¿a€‚
  15. a½“a£¬| MySQL c¼–e¡¥‘ PHP a—¶i¼Œa¡¥a»£¤a-¡êc!Raœ¡ãe¿e!Œe…c½Ri¼Œa½†a˜¡¥aœ¡§ make cš„e¿‡c¡§‹a£¬-a‡ocŽ¡ãao†c¡À»a¼¼a»£¤a£¬‹cš„e”™e¡¥¡¥a¿!a¡¥i¼š ext/mysql/libmysql/my_tempnam.o(.text+0x46): In function my_tempnam': /php4/ext/mysql/libmysql/my_tempnam.c:103: the use of tempnam' is dangerous, better use mkstemp'i¼Œe¿™a˜¡¥a€Ža1ˆa›žao‹
  16. aˆ‘aƒ3a‡co¡ìaˆ‘cš„ PHPa€‚a£¬Ša“ae‡Œa‰¾aˆ¡ãaˆ‘c”¡§a£¤e…c½Rc›Ra‰cš„ PHP cš„ ./configure cš„a‚a•¡ãa‘¡éi¼Ÿ
  17. a’Œ GD ao“a£¬€e¦Ì¡¤c¼–e¡¥‘ PHP a—¶i¼Œe|a1ˆc»™a‡oa£¬€a£¬aa£¤‡a€acš„c¼–e¡¥‘e”™e¡¥¡¥i¼Œe|a1ˆaœ¡§e¿e!Œa—¶a‡ocŽ¡ã segfaultsa€‚
  18. a½“c¼–e¡¥‘ PHP a—¶aˆ‘cœ‹aˆ¡ãa£¬€ao›ešaœocš„e”™e¡¥¡¥i¼Œa£¤½aƒa-»ao†a€‚aˆ‘c”¡§cš„a˜¡¥ Solarisi¼Œa£¬cŸ£¤e“aœ‰a2!aœ‰a…3c3»a€‚
  19. ÎÒÓÃÄäÃû CVS µÃµ½ÁË×îаæµÄ PHP£¬µ«ÊÇÀïÃæûÓÐ configure ½Å±¾£¡

    Äã±ØÐë°²×°ÓÐ GNU µÄ autoconf °ü£¬ÕâÑù²Å¿ÉÒÔ´Ó configure.in Éú³É configure ½Å±¾¡£´Ó CVS µÃµ½Ô´³ÌÐòºóÖ»ÒªÔÚ×î¸ß²ãµÄĿ¼ÖÐÔËÐÐ ./buildconf ¼´¿É¡££¨Í¬Ñù£¬³ý·ÇÄãÓÃÁË --enable-maintainer-mode Ñ¡ÏîÀ´ÔËÐÐ configure£¬·ñÔò¼´Ê¹ configure.in Îļþ¸üÐÂÁË£¬configure ½Å±¾Ò²²»»á×Ô¶¯ÖØÐÂÉú³É¡£ËùÒÔµ±Äã·¢ÏÖ configure.in Îļþ¸üÐÂÁËʱҪȷ±£ÊÖ¹¤ÖØÐÂÉú³É configure ½Å±¾¡£ÓÐÒ»¸öÖ¢×´ÊÇÔÚ configure Ö®ºó»òÕßÔËÐÐ config.status ʱÔÚ Makefile ÖÐÑ°ÕÒÀàËÆ @VARIABLE@ µÄ¶«Î÷¡££©

    ÎÒÔÚÅäÖà PHP ºÍ Apache Ò»Æð¹¤×÷ʱÓöµ½ÁËÎÊÌ⡣˵ûÕÒµ½ httpd.h£¬µ«Õâ¸öÎļþÃ÷Ã÷¾ÍÔÚÄÇÀ

    ÄãÐèÒª¸æËß configure/setup ½Å±¾ÄãµÄ Apache Ô´³ÌÐò×îÉϲãµÄĿ¼λÖá£ÕâÒâζ×ÅÄãÐèÒªÕâÑùÖ¸¶¨ --with-apache=/path/to/apache ¶ø²»ÊÇÕâÑù --with-apache=/path/to/apache/src¡£

    µ±ÔËÐÐ PHP ÅäÖÃʱ£¨./configure£©£¬Óöµ½ÀàËÆÈçϵÄÎÊÌ⣺

          checking lex output file root... ./configure: lex: command not found
          configure: error: cannot find output from lex; giving up
         

    ÇëÈÏÕæÔĶÁ PHP µÄ°²×°ËµÃ÷£¬²¢×¢ÒâÒª±àÒë PHP ÐèҪͬʱ°²×° flex ºÍ bison¡£¸ù¾ÝÉèÖõIJ»Í¬£¬¿ÉÒÔ´ÓÔ´´úÂë±àÒë bison ºÍ flex£¬ÒªÃ´Í¨¹ýÒѱàÒëºÃµÄ·¢Ðаü£¬ÀýÈç RPM¡£

    µ±ÊÔͼÆô¶¯ Apache ʱ£¬µÃµ½ÀàËÆÈçÏ´íÎóÐÅÏ¢£º

          fatal: relocation error: file /path/to/libphp4.so:
          symbol ap_block_alarms: referenced symbol not found
         

    ¸Ã´íÎóͨ³£ÔÚ Apache µÄºËÐijÌÐò±»±àÒëΪ¹²ÏíÓÃ;µÄ DSO ¿âʱ·¢Éú¡£Çë³¢ÊÔÖØÐÂÅäÖà Apache£¬È·±£ÖÁÉÙʹÓÃÁËÈçϲÎÊý£º

         --enable-shared=max --enable-rule=SHARED_CORE
         

    ¸ü¶àÐÅÏ¢£¬ÇëÔĶÁ Apache ¶¥²ãĿ¼µÄ INSTALL Îļþ»òÕß Apache µÄ » DSO Êֲᡣ

    µ±ÔËÐÐ configure ʱ£¬±¨¸æ˵ÕÒ²»µ½Í·Îļþ»ò GD ¿â»ò gdbm£¬»òÆäËüµÄʲô°ü£¡

    ¿ÉÒÔͨ¹ýÖ¸¶¨¸½¼ÓµÄÑ¡ÏîÈà configure ½Å±¾ÔڷDZê×¼µÄ·¾¶ÖÐÑ°ÕÒÍ·ÎļþºÍ¿â²¢´«µÝ¸ø C Ô¤´¦ÀíÆ÷ºÍÁ¬½ÓÆ÷£¬ÀýÈ磺

        CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure
    
    Èç¹ûÓà csh µÄ±äÖÖ×÷ΪÄãµÄµÇ¼ shell£¨ÎªÊ²Ã´£¿£©£¬ÄǾÍÊÇ£º
        env CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure
    

    µ±±àÒë language-parser.tab.c Îļþʱ£¬±¨´í˵ yytname undeclared¡£

    ÐèÒª¸üРBison µÄ°æ±¾¡£×îа汾ÔÚ » http://www.gnu.org/software/bison/bison.html¡£

    µ±ÎÒÔËÐÐ make ʱ£¬¿´ÉÏÈ¥Ò»ÇÐÕý³££¬¿Éµ±Á¬½Ó×îºóµÄ³ÌÐòʱ±¨¸æ˵ÕÒ²»µ½Ä³Ð©Îļþ¶øʧ°ÜÁË¡£

    һЩ¾É°æ±¾µÄ make ûÓÐÕýÈ·½« functions Ŀ¼Ï±àÒëºóµÄÎļþ·Åµ½Í¬Ò»¸öĿ¼Ï¡£ÊÔÊÔÔËÐÐ cp *.o functions È»ºóÔÙÔËÐÐ make ¿´¿´ÓÐûÓÐʲô°ïÖú¡£Èç¹û³É¹¦ÁË£¬ÄÇÄãȷʵÐèÒª¸üе½×îаæµÄ GNU make¡£

    µ±Á¬½Ó PHP ʱ£¬±¨¸æ˵ÓÐһЩ䶨ÒåµÄÒýÓá£

    ¿´¿´Á¬½ÓµÄÕâÒ»ÐÐÃüÁȷÈÏËùÓÐÊʵ±µÄ¿â¶¼°üÀ¨ÔÚ×îºóÁË¡£Í¨³£¿ÉÄÜ©µôÁË¡°-ldl¡±ºÍÄã°üÀ¨µÄÈκÎÊý¾Ý¿âÖ§³ÖËùÐèÒªµÄ¿â¡£

    Èç¹ûºÍ Apache 1.2.x Ò»ÆðÁ¬½Ó£¬¼ÇµÃ°ÑÊʵ±µÄÐÅÏ¢Ìí¼Óµ½ÅäÖÃÎļþµÄ EXTRA_LIBS ÕâÒ»Ðв¢ÖØÐÂÔËÐÐ Apache µÄÅäÖýű¾ÁËÂ𣿸ü¶àÐÅÏ¢¼û°²×°Ò»Õ¡£

    һЩÈËÒ²±¨¸æ˵ÔÚºÍ Apache Á¬½ÓʱËûÃDz»µÃ²»½ô½Ó×Å libphp4.a Ö®ºó¼ÓÉÏ¡°-ldl¡±¡£

    ÎÒ²»ÖªµÀÔõÑù°Ñ PHP ºÍ Apache 1.3 Ò»Æð±àÒë¡£

    ÕâÆäʵºÜ¼òµ¥¡£Ð¡ÐĵØÕÕ×ÅÒÔϲ½ÖèÀ´£º

    • ´Ó » http://www.apache.org/dist/httpd/ ÏÂÔØ×îаæµÄ Apache 1.3¡£
    • ½âѹËõµ½Ä³´¦£¬ÀýÈç /usr/local/src/apache-1.3¡£
    • ±àÒë PHP£¬ÏÈÔËÐÐ ./configure --with-apache=/<path>/apache-1.3£¨ÓÃÄã apache-1.3 ËùÔÚµÄÕæʵ·¾¶Ìæ»»µô <path>¡££©
    • ÊäÈë make ½Ó×ÅÊÇ make install À´±àÒë PHP ²¢°Ñ±ØÒªµÄÎļþ¿½±´µ½ Apache µÄÔ´³ÌÐòĿ¼Ê÷ÖС£
    • ¸Ä±äµ±Ç°Ä¿Â¼µ½ /<path>/apache-1.3/src Ŀ¼²¢±à¼­ Configuration Îļþ¡£Ìí¼ÓÕâÒ»ÐУºAddModule modules/php4/libphp4.a¡£
    • ÊäÈë ./configure ½Ó×ÅÊÇ make¡£
    • ÄãÏÖÔÚÓ¦¸ÃÓÐÒ»¸ö°üÀ¨ PHP Ö§³ÖµÄ httpd ¿ÉÖ´ÐгÌÐòÁË£¡

    ×¢Ò⣺Ҳ¿ÉÒÔÓÃÐ嵀 Apache ./configure ½Å±¾¡£²Î¼û Apache ·¢ÐаüÖÐ README.configure ÎļþÖеÄ˵Ã÷¡£Ò²¿´¿´ PHP ·¢ÐаüÖÐµÄ INSTALL Îļþ¡£

    ÎÒ°´ÕÕËùÓеIJ½ÖèÔÚ UNIX Ï°²×°ÁËPHP µÄ Apache Ä£¿é°æ±¾£¬µ«ÎÒµÄ PHP ½Å±¾±»ÏÔʾÔÚä¯ÀÀÆ÷ÖлòÕßÌáʾ±£´æ´ËÎļþ¡£

    Õâ˵Ã÷ PHP Ä£¿é³öÓÚijЩԭÒòûÓб»µ÷Óá£ÔÚÑ°Çó¸ü¶à°ïÖúÇ°Ïȼì²éÈý¼þÊ£º

    • È·ÈÏÄãÔËÐÐµÄ httpd ³ÌÐò¾ÍÊÇÄã¸Õ¸Õ±àÒëµÄРhttpd ³ÌÐò¡£ÔËÐУº /path/to/binary/httpd -l Èç¹ûÄãû¿´µ½ mod_php4.c ±»ÁгöÀ´ÄÇÄã¾ÍûÓÐÔËÐжԳÌÐò¡£ÕÒµ½²¢ÕýÈ·°²×°³ÌÐò¡£
    • È·ÈÏÄãÔÚ Apache .conf ÎļþÖмÓÈëÁËÕýÈ·µÄ Mime ÀàÐÍ¡£Ó¦¸ÃÊÇ£º AddType application/x-httpd-php3 .php3£¨PHP 3£© »òÕß AddType application/x-httpd-php .php£¨PHP 4£© ҲȷÈÏ AddType ÕâÒ»ÐÐûÓÐÒþ²ØÔÚ <Virtualhost> »òÕß <Directory> ¿éÖУ¬Õâ¿ÉÄÜ»áÔì³ÉÄãµÄ²âÊԽű¾ËùÔÚλÖÃûÓб»Ó¦Óõ½´ËÉèÖá£
    • ×îºó£¬Apache 1.2 ºÍ Apache 1.3 Ö®¼äĬÈÏÅäÖÃÎļþµÄλÖøıäÁË¡£ÄãҪȷÈÏÄãÌí¼Ó AddType ÐеÄÎļþ¾ÍÊÇʵ¼ÊÉÏÓõġ£Äã¿ÉÒÔÔÚÄãµÄ httpd.conf ÖÐÌí¼ÓÒ»¸öÃ÷ÏÔµÄÓï·¨´íÎó»òÕßÆäËüÃ÷ÏÔÐ޸ģ¬Õâ¿ÉÒÔ¸æËßÄãÊÇ·ñ¶ÁÈ¡ÁËÕýÈ·µÄÎļþ¡£

    ˵ҪÓãº--activate-module=src/modules/php4/libphp4.a£¬µ«ÊÇ´ËÎļþ¸ù±¾²»´æÔÚ£¬ÓÚÊÇÎҸijÉÁË --activate-module=src/modules/php4/libmodphp4.a£¬½á¹û²»ÐС£Ôõô»ØÊ£¿

    ×¢Òâ libphp4.a Îļþ±¾À´¾Í²»¸Ã´æÔÚ£¬apache ½ø³Ì½«´´½¨Ëü£¡

    µ±ÎÒÓà --activate-module=src/modules/php4/libphp4.a ÊÔ×Å°Ñ PHP ±àÒë³É Apache µÄ¾²Ì¬Ä£¿éʱ£¬±¨¸æ˵ÎҵıàÒëÆ÷²»·þ´Ó ANSI ±ê×¼¡£

    ÕâÊÇÒ»¸ö Apache Î󱨵ĴíÎóÐÅÏ¢£¬ÔÚеİ汾ÖÐÒѾ­ÐÞÕýÁË¡£

    µ±ÎÒÓà --with-apxs ±àÒë PHP ʱµÃµ½Ææ¹ÖµÄ´íÎóÐÅÏ¢¡£

    ÕâÀïÒª¼ì²éÈý¼þÊ¡£Ê×ÏÈ£¬³öÓÚijЩԭÒòµ± Apache Éú³É apxs Perl ½Å±¾Ê±£¬ÓÐʱûÓÐÕýÈ·µÄ±àÒëºÍ±ê¼Ç±äÁ¿¾Í½áÊøÁË¡£ÕÒµ½ÄãµÄ apxs ½Å±¾£¨ÓÃÃüÁî which apxs£©£¬ÓÐʱ»áÔÚ /usr/local/apache/bin/apxs »òÕß /usr/sbin/apxs¡£´ò¿ª²¢¼ì²éÀàËÆÈçϵÄÐУº

    my $CFG_CFLAGS_SHLIB  = ' ';          # substituted via Makefile.tmpl
    my $CFG_LD_SHLIB      = ' ';          # substituted via Makefile.tmpl
    my $CFG_LDFLAGS_SHLIB = ' ';          # substituted via Makefile.tmpl
    
    Èç¹ûÄã¿´µ½Õ⼸ÐУ¬ÄÇÎÊÌâ¾ÍÔÚÕâÀï¡£ËüÃÇ¿ÉÄÜ°üº¬Á˽ö½ö¿Õ¸ñ»òÕßÆäËü²»ÕýÈ·µÄÖµ£¬ÀýÈç¡°q()¡±¡£¸Ä³ÉÕâÑù£º
    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
    
    µÚ¶þ¸ö¿ÉÄܵÄÎÊÌâ½ö¿ÉÄÜÔÚÔÚ Red Hat 6.1 ºÍ 6.2 Öз¢Éú¡£Red Hat ·¢ÐÐµÄ apxs ½Å±¾»µÁË¡£²éÕÒÕâÒ»ÐУº
    my $CFG_LIBEXECDIR    = 'modules';         # substituted via APACI install
    
    Èç¹ûÄã¿´µ½ÉÏÃæÕâÒ»ÐУ¬¸Ä³ÉÕâÑù£º
    my $CFG_LIBEXECDIR    = '/usr/lib/apache'; # substituted via APACI install
    
    ×îºó£¬Èç¹ûÄãÖØÐÂÅäÖûòÕßÖØ×°ÁË Apache£¬ÔÚ ./configure Ö®ºóºÍ make ֮ǰÔö¼ÓÒ»¸ö make clean ÃüÁî¡£

    ÔÚ make µÄ¹ý³ÌÖУ¬ÔÚ microtime Öгö´í£¬»¹Óкܶà RUSAGE_ Ö®ÀàµÄ¶«Î÷¡£

    Èç¹û make ʱÓöµ½ÀàËÆÕâÑùµÄÎÊÌ⣺

    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
    

    ÄãµÄϵͳ»µÁË¡£ÄãÐèÒª°²×°Ò»¸ö·ûºÏÄãµÄ glibc µÄ glibc-devel °üÀ´ÐÞ¸´ /usr/include ÖеÄÎļþ¡£ÕâºÍ PHP ¾ø¶ÔûÓÐÈκιØϵ¡£ÒªÖ¤ÊµÕâÒ»µã£¬ÊÔÊÔÕâ¸ö¼òµ¥µÄ²âÊÔ£º

    $ cat >test.c <<X
    #include <sys/resource.h>
    X
    $ gcc -E test.c >/dev/null
    
    Èç¹û³öÏÖ´íÎó£¬ÄÇÄã¾ÍÖªµÀÍ·Îļþ»µÁË¡£

    µ±´ø MySQL ±àÒë PHP ʱ£¬¿ÉÒÔÕýÈ·µØÔËÐÐÅäÖ㬵«ÊÇÔÚ make µÄ¹ý³ÌÖгöÏÖÁËÀàËÆÒÔϵĴíÎóÐÅÏ¢£º ext/mysql/libmysql/my_tempnam.o(.text+0x46): In function my_tempnam': /php4/ext/mysql/libmysql/my_tempnam.c:103: the use of tempnam' is dangerous, better use mkstemp'£¬ÕâÊÇÔõô»ØÊÂ

    Ê×ÏÈ£¬ÎÒÃÇÐèÒªÈÏʶµ½ÕâÖ»ÊǸö¾¯¸æ£¬¶ø·ÇÖÂÃü´íÎó¡£ÓÉÓÚÕâÌõÐÅϢͨ³£ÊÇÔÚ make µÄ×îºóÊä³öµÄ£¬ËùÒÔ¿´ÆðÀ´Ëü¿ÉÄÜÏñÊÇÒ»¸öÖÂÃü´íÎ󣬵«Êµ¼ÊÉϲ»ÊÇ¡£µ±È»£¬Èç¹û½«±àÒëÆ÷ÉèÖóÉÓö¼û¾¯¸æÐÅϢʱֹͣ£¬ÔòÕâÒ²¿ÉÒÔËãÊÇÖÂÃü´íÎó¡£ÁíÍâÖµµÃÒ»ÌáµÄÊÇ£¬MySQL µÄÖ§³ÖÊÇĬÈÏ´ò¿ªµÄ¡£

    Note: ×Ô PHP 4.3.2 Æð£¬Ä㽫ÔÚ±àÒ루make£©½áÊøºó¿´µ½ÏÂÃæµÄÎÄ×Ö£º

           Build complete.
           (It is safe to ignore warnings about tempnam and tmpnam).
          

    ÎÒÏëÉý¼¶ÎÒµÄ PHP¡£ÉÏÄÄÀïÕÒµ½ÎÒÓÃÀ´ÅäÖÃÄ¿Ç°µÄ PHP µÄ ./configure µÄ²ÎÊýÄØ£¿

    ҪôÔÚÄ㵱ǰµÄ PHP µÄ°²×°Ä¿Â¼²é¿´ config.nice Îļþ£¬Èç¹ûûÓУ¬Ö»ÒªÔËÐд˽ű¾£º

    <?php phpinfo(); ?>
    ÔÚÊä³öµÄ¶¥¶ËÏÔʾÁËÓÃÀ´ÅäÖÃ´Ë PHP µÄ ./configure ²ÎÊý¡£

    ºÍ GD ¿âÒ»Æð±àÒë PHP ʱ£¬ÒªÃ´¸ø³öÒ»¸öÆæ¹ÖµÄ±àÒë´íÎó£¬ÒªÃ´ÔÚÔËÐÐʱ³öÏÖ segfaults¡£

    È·±£ÄãµÄ GD ¿âºÍ PHP ÔÚÁ¬½ÓʱʹÓÃÁËÓÃͬÑùµÄÖ§³Ö¿â£¨ÀýÈç libpng£©¡£

    µ±±àÒë PHP ʱÎÒ¿´µ½Ò»Ð©Ëæ»úµÄ´íÎ󣬺ÃÏñËÀÁË¡£ÎÒÓõÄÊÇ Solaris£¬²»ÖªµÀÓÐûÓйØϵ¡£

    µ±±àÒë PHP ʱʹÓÃ·Ç GNU µÄ¹¤¾ß»áµ¼ÖÂÎÊÌ⡣ȷ±£Ê¹Óà GNU ¹¤¾ßÀ´È·±£Äܹ»ÕýÈ·±àÒë PHP¡£ÀýÈ磬ÔÚ Solaris ÏÂÃæ²»ÂÛʹÓà SunOS BSD ¼æÈÝ»òÕß Solaris °æ±¾µÄ sed ¶¼²»ÐУ¬µ«ÊÇʹÓà GNU »òÕß Sun POSIX (xpg4) °æ±¾µÄ sed ¾Í¿ÉÒÔ¡£Ïà¹ØÁ¬½Ó£º» GNU sed£¬» GNU flex£¬» GNU bison¡£