28
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

php opensslを追加でインストール

Posted at

#php opensslを追加でインストール

HTTP_request2でhttps://にアクセスするとエラーになった。

Need OpenSSL support for https:// requests

opensslが入っていない

$ php -m
[PHP Modules]
Core
ctype
curl
date
dom
ereg
fileinfo
filter
gd
hash
iconv
imagick
json
libxml
mbstring
mcrypt
mysql
mysqli
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
SQLite
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

再インストールではなく、すでにあるphpに追加でインストールしようと思う。

$cd [php-source-dir]
$cd ext/openssl
$phpize
$ phpize
Cannot find config.m4.
Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module

怒られた

$ ls config.m4
ls: config.m4: そのようなファイルやディレクトリはありません
$ ls config*
config.w32  config0.m4

http://ratememo.blog17.fc2.com/blog-entry-794.html
リネームで対応する

$cp config0.m4 config.m4
$ phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

インストール

$./configure
$make 
$make test
$sudo make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-zts-20090626/
$ls /usr/local/lib/php/extensions/no-debug-zts-20090626/openssl.so
/usr/local/lib/php/extensions/no-debug-zts-20090626/openssl.so

soファイルが出来た。

php,iniに追加

extension=/usr/local/lib/php/extensions/no-debug-zts-20090626/openssl.so

phpinfo();
で、確認するとopensslが出てる

OK

28
32
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
28
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?