国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

PHP安裝BCMath擴展的方法

2024-04-25 20:16:33
字體:
來源:轉載
供稿:網友

今天小編就為大家分享一篇關于PHP安裝BCMath擴展的方法,小編覺得內容挺不錯的,現在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧。

編譯安裝 (PHP-5.6.23)

1.進入PHP源碼包目錄下的ext/bcmath目錄。

[root@192 bcmath]# ls

bcmath.c config.m4 config.w32 CREDITS libbcmath package.xml php_bcmath.h tests

2.執行phpize命令,phpize命令在PHP安裝目錄的bin目錄下,如/usr/local/php/bin/phpize。

  1. [root@192 bcmath]# /usr/local/php/bin/phpize 
  2. Configuring for: 
  3. PHP Api Version:     20131106 
  4. Zend Module Api No:   20131226 
  5. Zend Extension Api No:  220131226 

3.執行./configure --with-php-config=/usr/local/php/bin/php-config。要依據php-config的實際路徑。

  1. [root@192 bcmath]# ./configure --with-php-config=/usr/local/php/bin/php-config 
  2. checking for grep that handles long lines and -e... /usr/bin/grep 
  3. checking for egrep... /usr/bin/grep -E 
  4. checking for a sed that does not truncate output... /usr/bin/sed 
  5. checking for cc... cc 
  6. checking whether the C compiler works... yes 
  7. checking for C compiler default output file name... a.out 
  8. checking for suffix of executables...  
  9. checking whether we are cross compiling... no 
  10. checking for suffix of object files... o 
  11. checking whether we are using the GNU C compiler... yes 
  12. checking whether cc accepts -g... yes 
  13. checking for cc option to accept ISO C89... none needed 
  14. checking how to run the C preprocessor... cc -E 
  15. checking for icc... no 
  16. checking for suncc... no 
  17. checking whether cc understands -c and -o together... yes 
  18. checking for system library directory... lib 
  19. checking if compiler supports -R... no 
  20. checking if compiler supports -Wl,-rpath,... yes 
  21. checking build system type... x86_64-unknown-linux-gnu 
  22. checking host system type... x86_64-unknown-linux-gnu 
  23. checking target system type... x86_64-unknown-linux-gnu 
  24. checking for PHP prefix... /usr/local/php 
  25. checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib 
  26. checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226 
  27. checking for PHP installed headers prefix... /usr/local/php/include/php 
  28. checking if debug is enabled... no 
  29. checking if zts is enabled... no 
  30. checking for re2c... no 
  31. configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. 
  32. checking for gawk... gawk 
  33. checking whether to enable bc style precision math functions... yes, shared 
  34. checking for ld used by cc... /usr/bin/ld 
  35. checking if the linker (/usr/bin/ld) is GNU ld... yes 
  36. checking for /usr/bin/ld option to reload object files... -r 
  37. checking for BSD-compatible nm... /usr/bin/nm -B 
  38. checking whether ln -s works... yes 
  39. checking how to recognize dependent libraries... pass_all 
  40. checking for ANSI C header files... yes 
  41. checking for sys/types.h... yes 
  42. checking for sys/stat.h... yes 
  43. checking for stdlib.h... yes 
  44. checking for string.h... yes 
  45. checking for memory.h... yes 
  46. checking for strings.h... yes 
  47. checking for inttypes.h... yes 
  48. checking for stdint.h... yes 
  49. checking for unistd.h... yes 
  50. checking dlfcn.h usability... yes 
  51. checking dlfcn.h presence... yes 
  52. checking for dlfcn.h... yes 
  53. checking the maximum length of command line arguments... 1572864 
  54. checking command to parse /usr/bin/nm -B output from cc object... ok 
  55. checking for objdir... .libs 
  56. checking for ar... ar 
  57. checking for ranlib... ranlib 
  58. checking for strip... strip 
  59. checking if cc supports -fno-rtti -fno-exceptions... no 
  60. checking for cc option to produce PIC... -fPIC 
  61. checking if cc PIC flag -fPIC works... yes 
  62. checking if cc static flag -static works... no 
  63. checking if cc supports -c -o file.o... yes 
  64. checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes 
  65. checking whether -lc should be explicitly linked in... no 
  66. checking dynamic linker characteristics... GNU/Linux ld.so 
  67. checking how to hardcode library paths into programs... immediate 
  68. checking whether stripping libraries is possible... yes 
  69. checking if libtool supports shared libraries... yes 
  70. checking whether to build shared libraries... yes 
  71. checking whether to build static libraries... no 
  72. creating libtool 
  73. appending configuration tag "CXX" to libtool 
  74. configure: creating ./config.status 
  75. config.status: creating config.h 

4.執行make && make install。

  1. [root@192 bcmath]# make && make install 
  2. /bin/sh /home/tools/phptools/php-5.6.23/ext/bcmath/libtool --mode=compile cc -I/home/tools/phptools/php-5.6.23/ext/bcmath/libbcmath/src -I. -I/home/tools/phptools/php-5.6.23/ext/bcmath -DPHP_ATOM_INC -I/home/tools/phptools/php-5.6.23/ext/bcmath/include -I/home/tools/phptools/php-5.6.23/ext/bcmath/main -I/home/tools/phptools/php-5.6.23/ext/bcmath -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2  -c /home/tools/phptools/php-5.6.23/ext/bcmath/bcmath.c -o bcmath.lo  
  3. mkdir .libs 
  4.  cc -I/home/tools/phptools/php-5.6.23/ext/bcmath/libbcmath/src -I. -I/home/tools/phptools/php-5.6.23/ext/bcmath -DPHP_ATOM_INC -I/home/tools/phptools/php-5.6.23/ext/bcmath/include -I/home/tools/phptools/php-5.6.23/ext/bcmath/main -I/home/tools/phptools/php-5.6.23/ext/bcmath -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/tools/phptools/php-5.6.23/ext/bcmath/bcmath.c -fPIC -DPIC -o .libs/bcmath.o 
  5. ... ... 
  6. ---------------------------------------------------------------------- 
  7. Libraries have been installed in: 
  8.   /home/tools/phptools/php-5.6.23/ext/bcmath/modules 
  9. If you ever happen to want to link against installed libraries 
  10. in a given directory, LIBDIR, you must either use libtool, and 
  11. specify the full pathname of the library, or use the `-LLIBDIR' 
  12. flag during linking and do at least one of the following: 
  13.   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable 
  14.    during execution 
  15.   - add LIBDIR to the `LD_RUN_PATH' environment variable 
  16.    during linking 
  17.   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag 
  18.   - have your system administrator add LIBDIR to `/etc/ld.so.conf' 
  19. See any operating system documentation about shared libraries for 
  20. more information, such as the ld(1) and ld.so(8) manual pages. 
  21. ---------------------------------------------------------------------- 
  22. Build complete. 
  23. Don't forget to run 'make test'. 
  24. Installing shared extensions:   /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ 

5.查詢,php.ini中extension_dir配置的目錄中已經有bcmath.so文件了。

[root@192 sbin]# ll /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

總用量 3984

-rwxr-xr-x. 1 root root 382568 10月 22 17:57 bcmath.so

6.在Dynamic Extensions配置塊下添加一行extension=bcmath.so。

7.重啟php服務即可。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 禹城市| 武威市| 福鼎市| 德保县| 灵寿县| 姚安县| 合水县| 平遥县| 九龙城区| 朔州市| 墨玉县| 九台市| 兴安县| 和硕县| 新河县| 广平县| 惠水县| 屏东市| 镇远县| 梓潼县| 嘉荫县| 隆子县| 寿光市| 海晏县| 桐柏县| 达日县| 横山县| 固原市| 邢台县| 成安县| 宜君县| 连州市| 怀集县| 津市市| 新安县| 鸡东县| 仁化县| 吐鲁番市| 康乐县| 页游| 称多县|