• 转 通过phpize为php在不重新编译php情况下安装模块openssl


    假定:
    php编译安装路径:/usr/local/php/
    apache编译安装路径:/usr/local/apache/
    php配置文件路径:/etc/php.ini
    php安装源路径:/usr/source/php-5.3.9/


    [root@localhost ~]# cd /usr/source/php-5.3.9/ext/openssl/

    [root@localhost openssl]# /usr/local/php/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module

    [root@localhost openssl]# cp ./config0.m4 ./config.m4

    [root@localhost openssl]# /usr/local/php/bin/phpize
    Configuring for:
    PHP Api Version:         20090626
    Zend Module Api No:      20090626
    Zend Extension Api No:   220090626

    [root@localhost openssl]# ./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config
    注:如果不想使用php自带的ext里的openssl的话 可使用参数“--with-openssl=DIR” Include OpenSSL support (requires OpenSSL >= 0.9.6)

    [root@localhost openssl]# make

    [root@localhost openssl]# make install

    在php.ini中加载openssl.so
    [root@localhost openssl]# vi /etc/php.ini
    加入:
    extension = "openssl.so"

    重启apache:
    [root@localhost ~]# /usr/local/apache/bin/apachectl -k restart

    检验方法1:
    通过phpinfo检验是否加载了openssl模块

    <?php
    echo phpinfo(); 
    ?>

    检验方法2:

    [root@localhost openssl]# cd ~
    [root@localhost ~]# vi test.php
    php code:

    error_reporting(E_ALL);
    $a = file_get_contents('https://id3check.gb.co.uk/gbportalinternational/aspx/id3check_1b.asmx?WSDL');
    var_dump($a);

    [root@localhost ~]# /usr/local/php/bin/php ~/test.php
    返回wsdl xml文件,表示安装成功

  • 相关阅读:
    data:image/png;base64
    需要去了解的知识
    【转】react的高阶组件
    几个css问题
    antd中form中resetFields清空输入框
    react中map循环中key取值问题
    react中父组件调用子组件的方法
    hive 初始化 时间问题 The server time zone value 'EDT' is unrecognized
    centos7安装MySQL8 无法修改密码 无法修改密码策略
    虚拟机 Linux 不能连 xshell 不能上网
  • 原文地址:https://www.cnblogs.com/xiangxiaodong/p/3225718.html
Copyright © 2020-2023  润新知