PHP 5.6.x 使用 Apache 进行源码安装,但出现 openssl 错误,解引用指向不完整类型的指针
PHP 5.6.x source install with Apache, but openssl error occurs, dereferencing pointer to incomplete type
我用 Apache 安装 PHP 5.6.39。
我的配置选项如下所示。
./configure --with-apxs2=/home1/apache/bin/apxs
--with-config-file-path=/home1/apache/conf/
--prefix=/home1/php
--enable-sysvsem
--enable-sysvshm
--enable-ftp
--enable-pdo
--with-zlib
--with-mcrypt=/home1/apache
--with-openssl=/home1/openssl
我像这样使用 with-openssl 选项。 --with-openssl=/home1/openssl
因为OS openssl 版本是1.0.1e,我想像下面那样使用1.1.0
[root@localhost bin]# ./openssl //This openssl is located /home1/openssl/bin
OpenSSL> version
OpenSSL 1.1.0f 25 May 2017
实际上配置命令是通过的,但是当我输入 make 时,我看到了这个屏幕。
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘zif_openssl_x509_parse’:
/home1/php-5.6.39/ext/openssl/openssl.c:1982: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:1983: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:2011: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_generate_private_key’:
/home1/php-5.6.39/ext/openssl/openssl.c:3420: warning: ‘RSA_generate_key’ is deprecated (declared at /home1/openssl/include/openssl/rsa.h:193)
/home1/php-5.6.39/ext/openssl/openssl.c:3428: warning: ‘DSA_generate_parameters’ is deprecated (declared at /home1/openssl/include/openssl/dsa.h:122)
/home1/php-5.6.39/ext/openssl/openssl.c:3446: warning: ‘DH_generate_parameters’ is deprecated (declared at /home1/openssl/include/openssl/dh.h:135)
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_is_private_key’:
/home1/php-5.6.39/ext/openssl/openssl.c:3485: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3512: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3512: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3521: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dsa’:
/home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3560: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3560: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3569: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3569: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dh’:
/home1/php-5.6.39/ext/openssl/openssl.c:3580: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3580: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3583: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_new’:
我已经搜索并找到了这个 post。但不帮我。
https://github.com/fpoirotte/phpfarm/issues/23
如果我没有使用 --with-openssl=/home1/openssl 选项,那么配置和生成命令是成功的。但我需要这个选项。我错过了什么?
我用 link 解决了这个问题,PHP 5.6.x 的补丁与 Openssl 1.1.0
https://github.com/oerdnj/deb.sury.org/issues/566
我用 Apache 安装 PHP 5.6.39。 我的配置选项如下所示。
./configure --with-apxs2=/home1/apache/bin/apxs
--with-config-file-path=/home1/apache/conf/
--prefix=/home1/php
--enable-sysvsem
--enable-sysvshm
--enable-ftp
--enable-pdo
--with-zlib
--with-mcrypt=/home1/apache
--with-openssl=/home1/openssl
我像这样使用 with-openssl 选项。 --with-openssl=/home1/openssl 因为OS openssl 版本是1.0.1e,我想像下面那样使用1.1.0
[root@localhost bin]# ./openssl //This openssl is located /home1/openssl/bin
OpenSSL> version
OpenSSL 1.1.0f 25 May 2017
实际上配置命令是通过的,但是当我输入 make 时,我看到了这个屏幕。
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘zif_openssl_x509_parse’:
/home1/php-5.6.39/ext/openssl/openssl.c:1982: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:1983: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:2011: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_generate_private_key’:
/home1/php-5.6.39/ext/openssl/openssl.c:3420: warning: ‘RSA_generate_key’ is deprecated (declared at /home1/openssl/include/openssl/rsa.h:193)
/home1/php-5.6.39/ext/openssl/openssl.c:3428: warning: ‘DSA_generate_parameters’ is deprecated (declared at /home1/openssl/include/openssl/dsa.h:122)
/home1/php-5.6.39/ext/openssl/openssl.c:3446: warning: ‘DH_generate_parameters’ is deprecated (declared at /home1/openssl/include/openssl/dh.h:135)
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_is_private_key’:
/home1/php-5.6.39/ext/openssl/openssl.c:3485: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3512: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3512: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3521: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dsa’:
/home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3560: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3560: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3569: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3569: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dh’:
/home1/php-5.6.39/ext/openssl/openssl.c:3580: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3580: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c:3583: error: dereferencing pointer to incomplete type
/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_new’:
我已经搜索并找到了这个 post。但不帮我。 https://github.com/fpoirotte/phpfarm/issues/23
如果我没有使用 --with-openssl=/home1/openssl 选项,那么配置和生成命令是成功的。但我需要这个选项。我错过了什么?
我用 link 解决了这个问题,PHP 5.6.x 的补丁与 Openssl 1.1.0 https://github.com/oerdnj/deb.sury.org/issues/566