Questions in category: PHP (PHP)
软件 >> PHP
<[1] [2] >

1. MATH system 中的BUG

Posted by haifeng on 2020-12-31 11:11:15 last update 2020-12-31 11:11:51 | Answers (0) | 收藏


search_question.php 在处理 get 所获字符时, 如果时 ax+b

则url中+应当改为 %2B, 否则会视+为空格.

 

http://www.atzjg.net/admin/do/search_question.php?keyword=ax+b&page=2

 

2. Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;

Posted by haifeng on 2020-09-29 18:18:15 last update 2020-09-29 18:21:57 | Answers (0) | 收藏


Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;

 

解决办法:

比如在类 page 中, 将同名函数 function page(){} 改为 public function __construct(){} 即可.

class page 
{

public function __construct($array)
 //function page($array)
{}

}

 

请参考

https://stackoverflow.com/questions/37100373/php-deprecated-methods-with-the-same-name

 

3. 安装WampServer 3.1.4 版本, 在浏览器访问http://localhost/phpmyadmin/ 出现错误

Posted by haifeng on 2020-09-29 16:14:55 last update 2020-09-29 16:19:53 | Answers (0) | 收藏


phpMyAdmin - 错误

缺少 mysqli 扩展。请检查 PHP 配置。 详情请查看我们的文档

 

1. 首先确定 PHP 的版本, http://localhost/?phpinfo=-1  可以看到PHP Version 7.2.10

到安装WampServer的目录, 于 C:\wamp64\bin\php\php7.2.10\ 目录下找到 php.ini 文件, 使用编辑器打开. (更改前确保备份.)

 

2.

 

此时需要检查 PHP 配置.

 

4. php7 启动问题

Posted by haifeng on 2019-06-08 16:56:54 last update 2019-06-08 16:56:54 | Answers (0) | 收藏


/usr/local/php7/sbin/php-fpm -c /usr/local/php7/etc/php.ini -y /usr/local/php7/etc/php-fpm.conf

[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'bz2' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/bz2 (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/bz2: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/bz2.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/bz2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/curl (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/curl: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/curl.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/fileinfo (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/fileinfo: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/fileinfo.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/fileinfo.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gd2' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gd2 (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gd2: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gd2.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gd2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gettext' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gettext (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gettext: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gettext.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gettext.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gmp' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gmp (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gmp: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gmp.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/gmp.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/intl (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/intl: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/intl.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/intl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'imap' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/imap (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/imap: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/imap.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/imap.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'ldap' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/ldap (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/ldap: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/ldap.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/ldap.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/mbstring (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/mbstring: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/mbstring.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/mbstring.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'exif' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/exif (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/exif: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/exif.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/exif.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/mysqli (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/mysqli: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/mysqli.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/mysqli.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/openssl (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/openssl: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/openssl.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/pdo_mysql (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/pdo_mysql: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/pdo_mysql.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/pdo_mysql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-Jun-2019 16:53:52] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/pdo_sqlite (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/pdo_sqlite: cannot open shared object file: No such file or directory), /usr/local/php7/lib/php/extensions/no-debug-zts-20180731/pdo_sqlite.so (/usr/local/php7/lib/php/extensions/no-debug-zts-20180731/pdo_sqlite.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

 

5. 编译 gnttls-3.6.7 可能出现的问题

Posted by haifeng on 2019-05-06 09:09:52 last update 2019-05-06 12:12:38 | Answers (0) | 收藏


/usr/local/src/gnutls-3.6.7/build-aux/missing: line 81: makeinfo: command not found

此时需要安装 texinfo

# apt-get install texinfo

 

# export NETTLE_CFLAGS="-I/usr/local/include/nettle" NETTLE_LIBS="-L/usr/lib64 -lnettle" HOGWEED_CFLAGS="-I/usr/local/include/nettle" HOGWEED_LIBS="-L/usr/lib64 -lhogweed" P11_KIT_CFLAGS="-I/usr/local/include/p11-kit-1/p11-kit" P11_KIT_LIBS="-L/usr/local/lib -lp11-kit" LIBTASN1_CFLAGS="-I/usr/local/include" LIBTASN1_LIBS="-L/usr/local/lib -ltasn1"

# ./configure --prefix=/usr/local --disable-guile --with-default-trust-store-pkcs11="pkcs11:" --with-included-unistring

 

# make

出现下面的错误

In file included from verify.c:40:0:
supported_exts.gperf:26:1: warning: no previous prototype for 'is_ext_oid_supported' [-Wmissing-prototypes]
  CC       x509.lo
In file included from x509.c:38:0:
./../pkcs11_int.h:27:28: fatal error: p11-kit/pkcs11.h: No such file or directory
compilation terminated.
make[5]: *** [x509.lo] Error 1

直接将 p11-kit 文件夹拷贝到 gnutls-3.6.7源码所在的 lib/ 文件夹下.

# cp -R /usr/local/include/p11-kit-1/p11-kit/ /usr/local/src/gnutls-3.6.7/lib/p11-kit

重新 make

回到 php-7.3.5 的目录

make

/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_get_name'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_get_flags'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_uri_get_pin_value'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_finalize'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_release'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_load'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_config_option'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_modules_load_and_initialize'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_initialize'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

 

# sudo apt-get remove libp11-kit-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgpg-error-dev libgnutls-openssl27 libgnutlsxx27 libidn11-dev libgcrypt11-dev libldap2-dev
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libcurl4-openssl-dev libgnutls-dev libp11-kit-dev librtmp-dev
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 5,458 kB disk space will be freed.
Do you want to continue [Y/n]? y

make

/usr/bin/ld: cannot find -lcurl

源码安装 curl, 并删除系统中不再使用的软件包

The following packages were automatically installed and are no longer required:
  libgpg-error-dev libgnutls-openssl27 libgnutlsxx27 libidn11-dev libgcrypt11-dev libldap2-dev
Use 'apt-get autoremove' to remove them.

/usr/bin/ld: cannot find -lldap

 

 

 

 


References:

  1. http://linuxfromscratch.org/blfs/view/svn/postlfs/gnutls.html
  2. https://amon.org/gnutls
  3. https://www.gnutls.org/manual/html_node/gnutls_002dcli-Invocation.html

 

6. 编译 PHP7 时出现的问题

Posted by haifeng on 2019-05-06 08:52:51 last update 2019-05-06 22:48:46 | Answers (0) | 收藏


编译 PHP7 源代码时, 可能会出现很多错误, 比如

/usr/local/src/php-7.3.5/ext/gd/libgd/gdkanji.c:379: undefined reference to `libiconv_open'

更多可见 https://bugs.php.net/bug.php?id=52611

此时, 在 ./configure 命令后加上选项 CFLAGS=-liconv

网上的评论是:

Whenever you see "undefined reference to `libiconv_open'", try make CFLAGS=-liconv

 

例如:

./configure CFLAGS=-liconv --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/conf --with-config-file-scan-dir=/usr/local/php7/conf.d --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data  --disable-debug  --enable-bcmath --enable-ftp --enable-sockets --enable-mbstring --enable-mbregex --enable-soap --enable-opcache --enable-calendar --enable-intl  --enable-pcntl --enable-exif --enable-gd-jis-conv --enable-zend-signals --enable-maintainer-zts --enable-shmop  --enable-sysvmsg --enable-sysvshm --enable-mysqlnd --enable-zip --disable-fileinfo --with-enchant  --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr  --with-freetype-dir=/usr  --with-curl --with-iconv --with-pcre-regex --with-openssl --with-xsl --with-kerberos --with-zlib  --with-gettext --with-gmp --with-mhash  --with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-pspell --with-libedit --with-readline --with-snmp  --with-pear  --with-mysqli --with-mysql-sock --with-ldap --with-ldap-sasl LDFLAGS="-L/usr/local/lib -lz"

 

 --with-gd=/usr/local/gd  --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/png --with-freetype-dir=/usr/local/freetype --with-libzip=/usr/local/lib64  --with-iconv-dir=/usr/local/lib  LDFLAGS="-L/usr/lib -lz"
make ZEND_EXTRA_LIBS='-liconv'
make install

 

 

# apt-get install libldap2-dev

 

/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_get_name'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_get_flags'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_uri_get_pin_value'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_finalize'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_release'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_load'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_config_option'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_modules_load_and_initialize'
/usr/local/lib/libgnutls.so.30: undefined reference to `p11_kit_module_initialize'
collect2: ld returned 1 exit status

 

如果解决不了上面这个问题, 那么也可以在编译 gnutls 前执行configure 如下,

./configure --without-p11-kit
make
make install

 

关于 gnutls 的编译, 参见问题2278

7. PHP7 的编译

Posted by haifeng on 2019-05-05 18:13:38 last update 2019-05-06 10:41:46 | Answers (0) | 收藏


1. 首先到官方网站下载 PHP7

https://www.php.net/downloads.php#v7.3.5

这里下载文件 php-7.3.5.tar.xz (11701KB)

SHA256: e1011838a46fd4a195c8453b333916622d7ff5bce4aca2d9d99afac142db2472

2. 将php-7.3.5.tar.xz 上传到服务器

解压缩:

# xz -d php-7.3.5.tar.xz
# tar -xvf php-7.3.5.tar
# cd /usr/local
# mkdir php7
# cd php-7.3.5
# ./configure CFLAGS=-liconv --prefix=/usr/local/php7 --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-config-file-path=/usr/local/php7/conf --with-config-file-scan-dir=/usr/local/php7/conf.d --enable-debug --with-openssl --with-kerberos --with-zlib --enable-calendar --with-curl --with-enchant --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr  --with-freetype-dir=/usr  --enable-exif --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-intl --enable-mbstring --enable-pcntl --with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-pspell --with-libedit --with-readline --enable-shmop --with-snmp --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvshm --with-xsl --enable-zip --with-pear --enable-zend-signals --enable-maintainer-zts --with-mysqli --with-mysql-sock

 

checking for libzip... not found
configure: error: Please reinstall the libzip distribution

# sudo apt-get update
# sudo apt-get install libzip2 libzip-dev

checking for libzip... configure: error: system libzip must be upgraded to version >= 0.11

卸载 libzip2 和 libzip-dev

到 libzip 的官方网站下载最新版的libzip-1.5.2

https://libzip.org/download/

下载后上传到服务器, 执行下面的代码

mkdir build
cd build
cmake ..
make
make test
make install

如果 cmake 版本过低, 会出现下面的问题:

CMake Error at CMakeLists.txt:4 (CMAKE_MINIMUM_REQUIRED):
  CMake 3.0.2 or higher is required.  You are running version 2.8.7

因此, 需要重新安装 cmake.

安装 CMake 3.9.5

# tar -xzvf cmake-3.9.5.tar.gz
# cd cmake-3.9.5
# ./bootstrap && make && make install

执行 /usr/local/bin/cmake ..

的时候

-- Check if the system is big endian - little endian
-- Found ZLIB: /usr/local/lib/libz.a (found version "1.2.3")
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
CMake Warning at CMakeLists.txt:218 (MESSAGE):
  -- bzip2 library not found; bzip2 support disabled

安装 libbz2-dev

# sudo apt-get install libbz2-dev

重新执行 /usr/local/bin/cmake ..

root@atzjg:/usr/local/src/libzip-1.5.2/build# /usr/local/bin/cmake ..
-- Could NOT find NETTLE (missing: NETTLE_LIBRARY NETTLE_INCLUDE_DIR)
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/libzip-1.5.2/build

# sudo apt-get install nettle-dev

 

重新运行 cmake ..

root@atzjg:/usr/local/src/libzip-1.5.2/build# /usr/local/bin/cmake ..
-- Found NETTLE: /usr/lib/x86_64-linux-gnu/libnettle.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/libzip-1.5.2/build

然后运行 make

在 make 这一步会出现错误:

zip_crypto_openssl.c 的76行25列的 INT_MAX 第一次出现, 未定义.

只需在这个文件中加上

#include

即可.

make test 结束之后, 执行 make install


Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/pkgconfig/libzip.pc
-- Installing: /usr/local/include/zipconf.h
-- Installing: /usr/local/include/zip.h
-- Installing: /usr/local/lib/libzip.so.5.0
-- Installing: /usr/local/lib/libzip.so.5
-- Installing: /usr/local/lib/libzip.so
-- Installing: /usr/local/share/man/man3/ZIP_SOURCE_GET_ARGS.3
-- Installing: /usr/local/share/man/man3/libzip.3
-- Installing: /usr/local/share/man/man3/zip_add.3
-- Installing: /usr/local/share/man/man3/zip_add_dir.3
-- Installing: /usr/local/share/man/man3/zip_close.3
-- Installing: /usr/local/share/man/man3/zip_delete.3
-- Installing: /usr/local/share/man/man3/zip_dir_add.3
-- Installing: /usr/local/share/man/man3/zip_discard.3
-- Installing: /usr/local/share/man/man3/zip_error_clear.3
-- Installing: /usr/local/share/man/man3/zip_error_code_system.3
-- Installing: /usr/local/share/man/man3/zip_error_code_zip.3
-- Installing: /usr/local/share/man/man3/zip_error_fini.3
-- Installing: /usr/local/share/man/man3/zip_error_get.3
-- Installing: /usr/local/share/man/man3/zip_error_get_sys_type.3
-- Installing: /usr/local/share/man/man3/zip_error_init.3
-- Installing: /usr/local/share/man/man3/zip_error_set.3
-- Installing: /usr/local/share/man/man3/zip_error_strerror.3
-- Installing: /usr/local/share/man/man3/zip_error_system_type.3
-- Installing: /usr/local/share/man/man3/zip_error_to_data.3
-- Installing: /usr/local/share/man/man3/zip_error_to_str.3
-- Installing: /usr/local/share/man/man3/zip_errors.3
-- Installing: /usr/local/share/man/man3/zip_fclose.3
-- Installing: /usr/local/share/man/man3/zip_fdopen.3
-- Installing: /usr/local/share/man/man3/zip_file_add.3
-- Installing: /usr/local/share/man/man3/zip_file_extra_field_delete.3
-- Installing: /usr/local/share/man/man3/zip_file_extra_field_get.3
-- Installing: /usr/local/share/man/man3/zip_file_extra_field_set.3
-- Installing: /usr/local/share/man/man3/zip_file_extra_fields_count.3
-- Installing: /usr/local/share/man/man3/zip_file_get_comment.3
-- Installing: /usr/local/share/man/man3/zip_file_get_error.3
-- Installing: /usr/local/share/man/man3/zip_file_get_external_attributes.3
-- Installing: /usr/local/share/man/man3/zip_file_rename.3
-- Installing: /usr/local/share/man/man3/zip_file_set_comment.3
-- Installing: /usr/local/share/man/man3/zip_file_set_encryption.3
-- Installing: /usr/local/share/man/man3/zip_file_set_external_attributes.3
-- Installing: /usr/local/share/man/man3/zip_file_set_mtime.3
-- Installing: /usr/local/share/man/man3/zip_file_strerror.3
-- Installing: /usr/local/share/man/man3/zip_fopen.3
-- Installing: /usr/local/share/man/man3/zip_fopen_encrypted.3
-- Installing: /usr/local/share/man/man3/zip_fread.3
-- Installing: /usr/local/share/man/man3/zip_fseek.3
-- Installing: /usr/local/share/man/man3/zip_ftell.3
-- Installing: /usr/local/share/man/man3/zip_get_archive_comment.3
-- Installing: /usr/local/share/man/man3/zip_get_archive_flag.3
-- Installing: /usr/local/share/man/man3/zip_get_error.3
-- Installing: /usr/local/share/man/man3/zip_get_file_comment.3
-- Installing: /usr/local/share/man/man3/zip_get_name.3
-- Installing: /usr/local/share/man/man3/zip_get_num_entries.3
-- Installing: /usr/local/share/man/man3/zip_get_num_files.3
-- Installing: /usr/local/share/man/man3/zip_libzip_version.3
-- Installing: /usr/local/share/man/man3/zip_name_locate.3
-- Installing: /usr/local/share/man/man3/zip_open.3
-- Installing: /usr/local/share/man/man3/zip_register_progress_callback.3
-- Installing: /usr/local/share/man/man3/zip_register_progress_callback_with_state.3
-- Installing: /usr/local/share/man/man3/zip_rename.3
-- Installing: /usr/local/share/man/man3/zip_set_archive_comment.3
-- Installing: /usr/local/share/man/man3/zip_set_archive_flag.3
-- Installing: /usr/local/share/man/man3/zip_set_default_password.3
-- Installing: /usr/local/share/man/man3/zip_set_file_comment.3
-- Installing: /usr/local/share/man/man3/zip_set_file_compression.3
-- Installing: /usr/local/share/man/man3/zip_source.3
-- Installing: /usr/local/share/man/man3/zip_source_begin_write.3
-- Installing: /usr/local/share/man/man3/zip_source_buffer.3
-- Installing: /usr/local/share/man/man3/zip_source_buffer_fragment.3
-- Installing: /usr/local/share/man/man3/zip_source_close.3
-- Installing: /usr/local/share/man/man3/zip_source_commit_write.3
-- Installing: /usr/local/share/man/man3/zip_source_error.3
-- Installing: /usr/local/share/man/man3/zip_source_file.3
-- Installing: /usr/local/share/man/man3/zip_source_filep.3
-- Installing: /usr/local/share/man/man3/zip_source_free.3
-- Installing: /usr/local/share/man/man3/zip_source_function.3
-- Installing: /usr/local/share/man/man3/zip_source_is_deleted.3
-- Installing: /usr/local/share/man/man3/zip_source_keep.3
-- Installing: /usr/local/share/man/man3/zip_source_make_command_bitmap.3
-- Installing: /usr/local/share/man/man3/zip_source_open.3
-- Installing: /usr/local/share/man/man3/zip_source_read.3
-- Installing: /usr/local/share/man/man3/zip_source_rollback_write.3
-- Installing: /usr/local/share/man/man3/zip_source_seek.3
-- Installing: /usr/local/share/man/man3/zip_source_seek_compute_offset.3
-- Installing: /usr/local/share/man/man3/zip_source_seek_write.3
-- Installing: /usr/local/share/man/man3/zip_source_stat.3
-- Installing: /usr/local/share/man/man3/zip_source_tell.3
-- Installing: /usr/local/share/man/man3/zip_source_tell_write.3
-- Installing: /usr/local/share/man/man3/zip_source_win32a.3
-- Installing: /usr/local/share/man/man3/zip_source_win32handle.3
-- Installing: /usr/local/share/man/man3/zip_source_win32w.3
-- Installing: /usr/local/share/man/man3/zip_source_write.3
-- Installing: /usr/local/share/man/man3/zip_source_zip.3
-- Installing: /usr/local/share/man/man3/zip_stat.3
-- Installing: /usr/local/share/man/man3/zip_stat_init.3
-- Installing: /usr/local/share/man/man3/zip_unchange.3
-- Installing: /usr/local/share/man/man3/zip_unchange_all.3
-- Installing: /usr/local/share/man/man3/zip_unchange_archive.3
-- Installing: /usr/local/share/man/man1/zipcmp.1
-- Installing: /usr/local/share/man/man1/zipmerge.1
-- Installing: /usr/local/share/man/man1/ziptool.1
-- Installing: /usr/local/share/man/man3/zip_replace.3
-- Installing: /usr/local/share/man/man3/zip_file_error_clear.3
-- Installing: /usr/local/share/man/man3/zip_file_error_get.3
-- Installing: /usr/local/share/man/man3/zip_error_init_with_code.3
-- Installing: /usr/local/share/man/man3/zip_file_replace.3
-- Installing: /usr/local/share/man/man3/zip_file_extra_field_delete_by_id.3
-- Installing: /usr/local/share/man/man3/zip_file_extra_field_get_by_id.3
-- Installing: /usr/local/share/man/man3/zip_file_extra_fields_count_by_id.3
-- Installing: /usr/local/share/man/man3/zip_strerror.3
-- Installing: /usr/local/share/man/man3/zip_fopen_index.3
-- Installing: /usr/local/share/man/man3/zip_fopen_index_encrypted.3
-- Installing: /usr/local/share/man/man3/zip_open_from_source.3
-- Installing: /usr/local/share/man/man3/zip_source_begin_write_cloning.3
-- Installing: /usr/local/share/man/man3/zip_source_buffer_create.3
-- Installing: /usr/local/share/man/man3/zip_source_buffer_fragment_create.3
-- Installing: /usr/local/share/man/man3/zip_source_file_create.3
-- Installing: /usr/local/share/man/man3/zip_source_filep_create.3
-- Installing: /usr/local/share/man/man3/zip_source_function_create.3
-- Installing: /usr/local/share/man/man3/zip_source_win32a_create.3
-- Installing: /usr/local/share/man/man3/zip_source_win32handle_create.3
-- Installing: /usr/local/share/man/man3/zip_source_win32w_create.3
-- Installing: /usr/local/share/man/man3/zip_stat_index.3
-- Installing: /usr/local/bin/zipcmp
-- Set runtime path of "/usr/local/bin/zipcmp" to ""
-- Installing: /usr/local/bin/zipmerge
-- Set runtime path of "/usr/local/bin/zipmerge" to ""
-- Installing: /usr/local/bin/ziptool
-- Set runtime path of "/usr/local/bin/ziptool" to ""

 

 


 

回到刚才 php-7.3.5 的目录, 执行 configure

 

configure: WARNING: unrecognized options: --with-curlwrappers, --with-vpx-dir, --with-t1lib, --enable-gd-native-ttf, --with-mcrypt, --with-mysql

 

安装 mysql

# sudo apt-get install mysql-server

注意如果使用 Xshell 的话, 将之最大化, 因为中间需要输入 root 用户的密码.


# sudo apt-get install mysql-client
# sudo apt-get install libmysqlclient-dev

 

重新执行 configure, 然后 make

/usr/local/src/php/php7/php-7.3.5/ext/fileinfo/libmagic/apprentice.c:2932:1: warning: ‘apprentice_buf’ defined but not used [-Wunused-function]
 apprentice_buf(struct magic_set *ms, struct magic *buf, size_t len)
 ^
virtual memory exhausted: 无法分配内存
make: *** [ext/fileinfo/libmagic/apprentice.lo] 错误 1

解决办法参考:

https://blog.csdn.net/taiyang1987912/article/details/41695895


root@xxx:~# rm -rf /opt/images/swap
root@xxx:~# dd if=/dev/zero of=/opt/images/swap bs=1024 count=2048000
记录了2048000+0 的读入
记录了2048000+0 的写出
2097152000字节(2.1 GB)已复制,18.4717 秒,114 MB/秒

root@xxx:~# mkswap /opt/images/swap
正在设置交换空间版本 1,大小 = 2047996 KiB
无标签, UUID=7d57d5cd-d52d-418c-ab94-9783f23da64f

root@xxx:~# swapon /opt/images/swap
root@xxx:~# free -m
             total       used       free     shared    buffers     cached
Mem:           995        928         67          0          6        660
-/+ buffers/cache:        261        733
Swap:         1999          0       1999


然后回到 /usr/local/src/php/php7/php-7.3.5, 运行 make

当make完成, 关闭 swap

# cd /opt/images/
# swapoff swap

删除 swap
# rm -f /opt/images/swap


make install 的过程

root@xxx:/usr/local/src/php/php7/php-7.3.5# make install
Installing shared extensions:     /usr/local/php7/lib/php/extensions/debug-zts-20180731/
Installing PHP CLI binary:        /usr/local/php7/bin/
Installing PHP CLI man page:      /usr/local/php7/php/man/man1/
Installing PHP FPM binary:        /usr/local/php7/sbin/
Installing PHP FPM defconfig:     skipping
Installing PHP FPM man page:      /usr/local/php7/php/man/man8/
Installing PHP FPM status page:   /usr/local/php7/php/php/fpm/
Installing phpdbg binary:         /usr/local/php7/bin/
Installing phpdbg man page:       /usr/local/php7/php/man/man1/
Installing PHP CGI binary:        /usr/local/php7/bin/
Installing PHP CGI man page:      /usr/local/php7/php/man/man1/
Installing build environment:     /usr/local/php7/lib/php/build/
Installing header files:          /usr/local/php7/include/php/
Installing helper programs:       /usr/local/php7/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php7/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php7/lib/php/
[PEAR] Archive_Tar    - already installed: 1.4.7
[PEAR] Console_Getopt - already installed: 1.4.2
[PEAR] Structures_Graph- already installed: 1.1.1
[PEAR] XML_Util       - already installed: 1.4.3
[PEAR] PEAR           - already installed: 1.10.9
Wrote PEAR system config file at: /usr/local/php7/etc/pear.conf
You may want to add: /usr/local/php7/lib/php to your php.ini include_path
/usr/local/src/php/php7/php-7.3.5/build/shtool install -c ext/phar/phar.phar /usr/local/php7/bin
ln -s -f phar.phar /usr/local/php7/bin/phar
Installing PDO headers:           /usr/local/php7/include/php/ext/pdo/


 

先关闭之前的 PHP

# ps aux|grep php-fpm
# kill -QUIT ????

然后切换到 php7 的安装目录

# cd /usr/local/php7

root@xxx:/usr/local/php7/sbin# ./php-fpm
[05-May-2019 20:04:41] ERROR: failed to open configuration file '/usr/local/php7/etc/php-fpm.conf': No such file or directory (2)
[05-May-2019 20:04:41] ERROR: failed to load configuration file '/usr/local/php7/etc/php-fpm.conf'
[05-May-2019 20:04:41] ERROR: FPM initialization failed

 

到 php7/etc/ 目录下复制 php-fpm.conf.default 到 php-fpm.conf

/usr/local/php7/etc# cp php-fpm.conf.default php-fpm.conf

# vim php-fpm.conf

找到php-fpm.pid, 将前面的注释符; 去掉. 这样就会生成 php-fpm.pid 文件

[global]
; Pid file
; Note: the default prefix is /usr/local/php7/var
; Default Value: none
pid = run/php-fpm.pid


root@xxx:/usr/local/php7/sbin# ./php-fpm
[05-May-2019 20:10:21] WARNING: Nothing matches the include pattern '/usr/local/php7/etc/php-fpm.d/*.conf' from /usr/local/php7/etc/php-fpm.conf at line 143.
[05-May-2019 20:10:21] ERROR: No pool defined. at least one pool section must be specified in config file
[05-May-2019 20:10:21] ERROR: failed to post process the configuration
[05-May-2019 20:10:21] ERROR: FPM initialization failed


/usr/local/php7/etc/php-fpm.d# cp www.conf.default www.conf

然后再次执行 /usr/local/php7/sbin# ./php-fpm

8. 重启 PHP

Posted by haifeng on 2019-05-05 15:36:41 last update 2019-05-06 22:58:21 | Answers (0) | 收藏


$ sudo service php5-fpm start       # 启动
$ sudo service php5-fpm stop        # 停止
$ sudo service php5-fpm restart     # 重启
$ sudo service php5-fpm reload      # 重载

 

参考

https://www.awaimai.com/2391.html

 

#cd /usr/local/php/sbin
# ./php-fpm -h
Usage: php-fpm [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p ] [-g ] [-c ] [-d foo[=bar]] [-y ] [-D] [-F [-O]]
  -c | Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -h               This help
  -i               PHP information
  -m               Show compiled in modules
  -v               Version number
  -p, --prefix


                   Specify alternative prefix path to FastCGI process manager (default: /usr/local/php).
  -g, --pid
                   Specify the PID file location.
  -y, --fpm-config
                   Specify alternative path to FastCGI process manager config file.
  -t, --test       Test FPM configuration and exit
  -D, --daemonize  force to run in background, and ignore daemonize option from config file
  -F, --nodaemonize
                   force to stay in foreground, and ignore daemonize option from config file
  -O, --force-stderr
                   force output to stderr in nodaemonize even if stderr is not a TTY
  -R, --allow-to-run-as-root
                   Allow pool to run as root (disabled by default)

 

root@xxx:/usr/local/php/sbin# ps aux|grep php-fpm
root      1372  0.0  0.5 219216  6088 ?        Ss    2017  30:37 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
www-data  6598  0.0  1.0 221248 10392 ?        S    Apr24   0:06 php-fpm: pool www
www-data 14345  0.0  1.0 220920 10356 ?        S    Apr29   0:04 php-fpm: pool www
www-data 16001  0.0  1.0 221176 10404 ?        S    Apr15   0:11 php-fpm: pool www

 

# kill -QUIT 1372
# cd /usr/local/php/sbin
# ./php-fpm


关闭 PHP5, 启动 PHP7

root@xxx:/usr/local/php7/sbin# ps aux | grep php-fpm
www-data  3201  0.0  0.6  75088  6500 ?        S    01:24   0:14 php-fpm: pool www                                                               
root      9085  0.0  0.0  73848   164 ?        Ss    2018  19:48 php-fpm: master process (/usr/local/etc/php-fpm.conf)                           
www-data 24272  0.0  0.6  75312  6180 ?        S    09:23   0:10 php-fpm: pool www                                                               
root     24881  0.0  0.0   9788   944 pts/6    S+   22:55   0:00 grep --color=auto php-fpm
www-data 26361  0.0  0.7  75308  7400 ?        S    20:23   0:01 php-fpm: pool www

 

# kill -QUIT 9085

 

如果 PHP7 编译并安装好了, 首先做以下工作
/usr/local/php7/etc# cp php-fpm.conf.default php-fpm.conf

vim php-fpm.conf

去掉 pid = run/php-fpm.pid 前的注释符

/usr/local/php7/etc/php-fpm.d# cp www.conf.default www.conf

cd /usr/local/php7/sbin

./php-fpm

 

9. 编译 PHP

Posted by haifeng on 2019-05-05 14:54:30 last update 2019-05-05 16:49:57 | Answers (0) | 收藏


编译 PHP 5.6.33(atzjg.net)

./configure
make
make test
make install

如果之前有过 make, 则在 ./configure 之后, 不妨执行一下

make clean

然后再执行 make.

注意 make test 可能需要较长时间.

如果服务器正在运行之前编译的 php, 请先停止 php, 然后 make install. 最后启动 php.

关于 PHP 的启动、停止、重启参见问题2275

 


首先执行下面的 configure 命令(完整的 configure 设置见最后的总结, 这里记录了一些问题)

# ./configure --prefix=/usr/local/php --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-config-file-path=/usr/local/php/conf --with-config-file-scan-dir=/usr/local/php/conf.d --enable-debug --with-openssl --with-kerberos --with-zlib --enable-calendar --with-curl --with-curlwrappers --with-enchant --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-vpx-dir=/usr --with-freetype-dir=/usr --with-t1lib --enable-exif --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-intl --enable-mbstring --with-mcrypt --with-mysql --with-mysqli --enable-pcntl --with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-pspell --with-libedit --with-readline --enable-shmop --with-snmp --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvshm --with-xsl --enable-zip --with-pear --enable-zend-signals --enable-maintainer-zts

 


如果出现
configure: error: Cannot find enchant

 

则执行

# sudo apt-get install libenchant-dev

 

然后继续执行上面的 configure, 出现下面的错误

configure: error: vpx_codec.h not found.

 

# sudo apt-get install libvpx-dev

继续 configure

configure: error: Unable to locate gmp.h

 

# sudo apt-get install libgmp-dev

继续 configure

checking for iconv support... yes
checking for iconv... yes
checking if iconv is glibc's... yes
checking if iconv supports errno... no
checking if iconv supports //IGNORE... no
checking if your cpp allows macro usage in include lines... yes
checking for IMAP support... no
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... no
checking for InterBase support... no
checking whether to enable internationalization support... yes
checking for icu-config... no
checking for location of ICU headers and libraries... not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.

 

# sudo apt-get install libicu-dev

在 configure 中加入 --with-iconv

 

'./configure' '--prefix=/usr/local/php' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--with-config-file-path=/usr/local/php/conf' '--with-config-file-scan-dir=/usr/local/php/conf.d' '--enable-debug' '--with-openssl' '--with-kerberos' '--with-zlib' '--enable-calendar' '--with-curl' '--with-curlwrappers' '--with-enchant' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-vpx-dir=/usr' '--with-freetype-dir=/usr' '--with-t1lib' '--enable-exif' '--enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-gettext' '--with-gmp' '--with-mhash' '--enable-intl' '--enable-mbstring' '--with-mcrypt' '--with-mysql' '--with-mysqli' '--enable-pcntl' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pgsql' '--with-pspell' '--with-libedit' '--with-readline' '--enable-shmop' '--with-snmp' '--with-iconv-dir=/usr/local/lib' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvshm' '--with-xsl' '--enable-zip' '--with-pear' '--enable-zend-signals' '--enable-maintainer-zts'

 

checking for pg_config... not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

 

# sudo apt-get install postgresql

# sudo apt-get install libpq-dev

 

checking for PSPELL support... yes
configure: error: Cannot find pspell

#sudo apt-get install libpspell-dev php5-pspell aspell-en

 

checking for SNMP support... yes
checking OpenSSL dir for SNMP... no
checking for net-snmp-config... /usr/bin/net-snmp-config
checking for init_snmp in -lnetsnmp... no
configure: error: SNMP sanity check failed. Please check config.log for more information.

 

# sudo apt-get install libsnmp-dev

 

checking for XSL support... yes
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

# sudo apt-get install libxslt-dev

 

 

checking if /usr/local/src/php-5.6.33/meta_ccld supports -fno-rtti -fno-exceptions... no
checking for /usr/local/src/php-5.6.33/meta_ccld option to produce PIC... -fPIC
checking if /usr/local/src/php-5.6.33/meta_ccld PIC flag -fPIC works... yes
checking if /usr/local/src/php-5.6.33/meta_ccld static flag -static works... yes
checking if /usr/local/src/php-5.6.33/meta_ccld supports -c -o file.o... yes
checking whether the /usr/local/src/php-5.6.33/meta_ccld linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes

creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate

Generating files
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
configure: WARNING: unrecognized options: --with-curlwrappers

将 --with-curlwrappers 选项去掉.

The configure flag --with-curlwrappers is not available anymore in PHP core >= 5.5. The feature has been moved to PECL.

 

To fix this error:
undefined reference to `libiconv_open'

Run configure like this:
[root@hotstname project-version]# ./configure CFLAGS=-liconv

 

 

 


 

【总结】建议使用下面的 configure 编译设置

'./configure' 'CFLAGS=-liconv' '--prefix=/usr/local/php' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--with-config-file-path=/usr/local/php/conf' '--with-config-file-scan-dir=/usr/local/php/conf.d' '--enable-debug' '--with-openssl' '--with-kerberos' '--with-zlib' '--enable-calendar' '--with-curl' '--with-enchant' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-vpx-dir=/usr' '--with-freetype-dir=/usr' '--with-t1lib' '--enable-exif' '--enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-gettext' '--with-gmp' '--with-mhash' '--enable-intl' '--enable-mbstring' '--with-mcrypt' '--with-mysql' '--with-mysqli' '--enable-pcntl' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pgsql' '--with-pspell' '--with-libedit' '--with-readline' '--enable-shmop' '--with-snmp' '--with-iconv-dir=/usr/local/lib' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvshm' '--with-xsl' '--enable-zip' '--with-pear' '--enable-zend-signals' '--enable-maintainer-zts'

 


Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
directorytreeiterator.inc
invertedregexiterator.inc
clicommand.inc
pharcommand.inc
directorygraphiterator.inc
phar.inc

Build complete.
Don't forget to run 'make test'.

 

 

10. 查看 PHP 模块

Posted by haifeng on 2019-05-05 13:15:22 last update 2019-05-05 13:15:22 | Answers (0) | 收藏


root@...:/usr/local# php -m
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_sockets.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_sockets.dll: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
Core
ctype
date
dom
ereg
fileinfo
filter
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

 

<[1] [2] >