1 (2016-01-10 15:39:02 отредактировано neket89)

Доброго времени суток! Всех с прошедшими праздниками:) У меня следующая проблема. Возникла необходимость подключить к сайту на 1С-Битрикс платёжную систему Яндекс.Касса. Она требует подключения к сайту через SSL. Для сайта установил сертификат. При попытке тестирования системы, выдаётся ошибка. Обратился в тех.поддержку, там ответили что сервер на запрос

ini_set("display_errors", true);
error_reporting(6135);
$a = fsockopen ("ssl://имя_домена.ru", 443, $b, $c, 5);
echo $a, $b, $c; 

отвечает:

Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /home/apache/site_name/public_html/bitrix/modules/main/admin/php_command_line.php(88) : eval()'d code on line 3

Warning: fsockopen(): Failed to enable crypto in /home/apache/site_name/public_html/bitrix/modules/main/admin/php_command_line.php(88) : eval()'d code on line 3

Warning: fsockopen(): unable to connect to ssl://sigamarket.bazaobuvi.ru:443 (Unknown error) in /home/apache/site_name/public_html/bitrix/modules/main/admin/php_command_line.php(88) : eval()'d code on line 3
0

и сказали что "начиная с версии 5.6 в php нужно явно прописывать ssl сертификат сайта. " и отослали меня по адресу https://akrabat.com/ssl-certificate-ver … n-php-5-6/.

Прочитав статью, я в первую очередь убедился что каталоги и сам сертификат существуют. Вот ответ команды

print_r(openssl_get_cert_locations());

Array
(
    [default_cert_file] => /etc/pki/tls/cert.pem
    [default_cert_file_env] => SSL_CERT_FILE
    [default_cert_dir] => /etc/pki/tls/certs
    [default_cert_dir_env] => SSL_CERT_DIR
    [default_private_dir] => /etc/pki/tls/private
    [default_default_cert_area] => /etc/pki/tls
    [ini_cafile] =>
    [ini_capath] =>
)

То есть все пути и сертификаты что указаны выше существуют. На всякий случай попробовал взять сертификат от сюда http://curl.haxx.se/ca/cacert.pem и заменил им файл /etc/pki/tls/cert.pem, на это не помогло(

В какую сторону дальше двигаться?

2

Может тогда хотя бы мне кто-нибудь скинет свои результаты выполнения команд, которые я привёл выше и phpinfo? Возможно мне бы это помогло...

3

neket89, А сайт нормально по https ходит?

MXLinux 19.3 - xfce
Чем больше я работаю админом, тем больше понимаю,
насколько волшебна фраза - "Нет технической возможности!"

==============================================

4

Да, всё отлично.

5

Есть у кого-нибудь php 5.6 на Mageia? Выложите, пожалуйста, результат команды print_r(openssl_get_cert_locations());

6 (2016-01-19 21:54:28 отредактировано chapaev)

neket89,

Spoiler

Консоль

[chapaev@localhost ~]$ cat test.php
<?php
    print_r(openssl_get_cert_locations());
?>
[chapaev@localhost ~]$ php --version
PHP 5.6.17 (cli) (built: Jan 14 2016 18:15:50)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
[chapaev@localhost ~]$ php test.php
Array
(
    [default_cert_file] => /etc/pki/tls/cert.pem
    [default_cert_file_env] => SSL_CERT_FILE
    [default_cert_dir] => /etc/pki/tls/certs
    [default_cert_dir_env] => SSL_CERT_DIR
    [default_private_dir] => /etc/pki/tls/private
    [default_default_cert_area] => /etc/pki/tls
    [ini_cafile] =>
    [ini_capath] =>
)
[chapaev@localhost ~]$

Мечемся, как меченые, ищем, где ветер дует
И смеёмся до тех пор, пока никто не умер (с)

Asus P8H61 | Intel Pentium G840 2.80 GHz s1155 | DDR III 8 Gb x 2шт 1866 Mhz PC-14900 G.Skill Ripjaws X series | SSD Kingston HyperX 3K 120GB 2.5" SATAIII | Asus PCI-Ex GeForce GT 440 1024MB GDDR5 (128bit) | Fedora 28 x64 | xfce4 | Java | OracleDB
Спасибо сказали: neket891

7

neket89, наслаждайтесь.

Spoiler

Консоль

[chapaev@localhost ~]$
[chapaev@localhost ~]$ cat test2
<?php
    phpinfo();
?>

[chapaev@localhost ~]$ php test2
PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/chapaev/test2 on line 2
phpinfo()
PHP Version => 5.6.17

System => Linux localhost.localdomain 4.1.15-desktop-1.mga5 #1 SMP Thu Dec 24 22:04:24 UTC 2015 x86_64
Build Date => Jan 14 2016 18:14:58
Configure Command =>  './configure'  '--with-apxs2=/usr/bin/apxs' '--build=x86_64-mageia-linux-gnu' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var/lib' '--mandir=/usr/share/man' '--enable-shared=yes' '--enable-static=no' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--enable-inline-optimization' '--with-regex=system' '--with-pcre-regex=/usr' '--with-zlib=/usr' '--with-pdo-odbc=unixODBC' '--with-zlib=shared,/usr' '--with-openssl=shared,/usr' '--enable-libxml=/usr' '--enable-mod_charset' '--without-pear' '--enable-bcmath=shared' '--with-bz2=shared,/usr' '--enable-calendar=shared' '--enable-ctype=shared' '--with-curl=shared,/usr' '--without-curlwrappers' '--enable-dba=shared' '--with-gdbm' '--with-db4' '--with-cdb' '--enable-dom=shared,/usr' '--with-enchant=shared,/usr' '--enable-exif=shared' '--enable-fileinfo=shared' '--enable-filter=shared' '--with-pcre-dir=/usr' '--enable-intl=shared' '--with-icu-dir=/usr' '--enable-json=shared' '--with-libjson' '--with-openssl-dir=/usr' '--enable-ftp=shared' '--with-gd=shared,/usr' '--with-jpeg-dir=/usr' '--with-vpx-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--with-gettext=shared,/usr' '--with-gmp=shared,/usr' '--enable-hash=shared,/usr' '--with-iconv=shared' '--with-imap=shared,/usr' '--with-imap-ssl=/usr' '--with-ldap=shared,/usr' '--with-ldap-sasl=/usr' '--enable-mbstring=shared,/usr' '--enable-mbregex' '--with-libmbfl=/usr' '--with-onig=/usr' '--with-mcrypt=shared,/usr' '--with-mssql=shared,/usr' '--with-mysql=shared,mysqlnd' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-zlib-dir=/usr' '--with-mysqli=shared,mysqlnd' '--enable-mysqlnd=shared,/usr/bin/mysql_config' '--with-unixODBC=shared,/usr' '--enable-opcache=shared' '--enable-pcntl=shared' '--enable-pdo=shared,/usr' '--with-pdo-dblib=shared,/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-pgsql=shared,/usr' '--enable-phar=shared' '--enable-posix=shared' '--with-readline=shared,/usr' '--with-recode=shared,/usr' '--enable-session=shared,/usr' '--enable-shmop=shared,/usr' '--enable-simplexml' '--with-snmp=shared,/usr' '--enable-soap=shared,/usr' '--enable-sockets=shared,/usr' '--with-sqlite3=shared,/usr' '--with-sybase-ct=shared,/usr' '--enable-sysvmsg=shared,/usr' '--enable-sysvsem=shared,/usr' '--enable-sysvshm=shared,/usr' '--with-tidy=shared,/usr' '--enable-tokenizer=shared,/usr' '--enable-xml=shared,/usr' '--enable-xmlreader=shared,/usr' '--with-xmlrpc=shared,/usr' '--enable-xmlwriter=shared,/usr' '--with-xsl=shared,/usr' '--enable-wddx=shared' '--with-libxml-dir=/usr' '--enable-zip=shared' '--with-libzip=/usr' '--with-interbase=shared,/usr/lib64/firebird' '--with-pdo-firebird=shared,/usr/lib64/firebird' '--enable-phpdbg' 'build_alias=x86_64-mageia-linux-gnu' 'CFLAGS=-O2 '-g' '-pipe' '-Wformat' '-Werror=format-security' '-Wp,-D_FORTIFY_SOURCE=2' '-fstack-protector' '--param=ssp-buffer-size=4' '-fstack-protector-all' '-fPIC' '-fno-strict-aliasing'' 'LDFLAGS= '-Wl,--as-needed' '-Wl,-z,relro' '-Wl,-O1' '-Wl,--build-id' '-Wl,--enable-new-dtags'' 'CXXFLAGS=-O2 '-g' '-pipe' '-Wformat' '-Werror=format-security' '-Wp,-D_FORTIFY_SOURCE=2' '-fstack-protector' '--param=ssp-buffer-size=4' '-fstack-protector-all' '-fPIC''
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/12_ctype.ini,
/etc/php.d/18_dom.ini,
/etc/php.d/21_openssl.ini,
/etc/php.d/21_zlib.ini,
/etc/php.d/22_ftp.ini,
/etc/php.d/24_gettext.ini,
/etc/php.d/43_posix.ini,
/etc/php.d/47_session.ini,
/etc/php.d/54_hash.ini,
/etc/php.d/57_sysvsem.ini,
/etc/php.d/58_sysvshm.ini,
/etc/php.d/60_tokenizer.ini,
/etc/php.d/62_xml.ini,
/etc/php.d/63_xmlreader.ini,
/etc/php.d/64_xmlwriter.ini,
/etc/php.d/81_filter.ini,
/etc/php.d/82_json.ini,
/etc/php.d/A60_timezonedb.ini,
/etc/php.d/Z98_suhosin.ini

PHP API => 20131106
PHP Extension => 20131226
Zend Extension => 220131226
Zend Extension Build => API220131226,NTS
PHP Extension Build => API20131226,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies


_______________________________________________________________________


Configuration

Core

PHP Version => 5.6.17

Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => 0 => 0
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => On => On
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/lib64/php/extensions => /usr/lib64/php/extensions
file_uploads => On => On
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/lib64/php/:/usr/share/pear/:/usr/share/php/ => .:/usr/lib64/php/:/usr/share/pear/:/usr/share/php/
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => On => On
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i  => /usr/sbin/sendmail -t -i
serialize_precision => 17 => 17
short_open_tag => On => On
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
sys_temp_dir => no value => no value
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 16M => 16M
upload_tmp_dir => /var/tmp => /var/tmp
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => no value => no value
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value

ctype

ctype functions => enabled

date

date/time support => enabled
"Olson" Timezone Database Version => 2015.7
Timezone Database => internal
Default timezone => UTC

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value

dom

DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.3
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled

ereg

Regex Library => Bundled library enabled

filter

Input Validation and Filtering => enabled
Revision => $Id: 86120bba568c551914a35636ec408f1e7e66af32 $

Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value

ftp

FTP support => enabled

gettext

GetText Support => enabled

hash

hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

json

json support => enabled
json version => 1.3.7
JSON-C headers version => 0.12
JSON-C library version => 0.12

libxml

libXML support => active
libXML Compiled Version => 2.9.3
libXML Loaded Version => 20903
libXML streams => enabled

openssl

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.2e 3 Dec 2015
OpenSSL Header Version => OpenSSL 1.0.2e 3 Dec 2015
Openssl default config => /etc/pki/tls/openssl.cnf

Directive => Local Value => Master Value
openssl.cafile => no value => no value
openssl.capath => no value => no value

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.38-RC1 2015-05-03

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000

posix

Revision => $Id: 5d20de77687b7d961b15450873fa23b9e64a136a $

Reflection

Reflection => enabled
Version => $Id: e1a2c576686e394757985fc88c2e6243ab2bb511 $

session

Session Support => enabled
Registered save handlers => files user
Registered serializer handlers => php_serialize php php_binary

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => /dev/urandom => /dev/urandom
session.entropy_length => 32 => 32
session.gc_divisor => 100 => 100
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 0 => 0
session.hash_bits_per_character => 5 => 5
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => /var/lib/php => /var/lib/php
session.serialize_handler => php => php
session.upload_progress.cleanup => On => On
session.upload_progress.enabled => On => On
session.upload_progress.freq => 1% => 1%
session.upload_progress.min_freq => 1 => 1
session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix => upload_progress_ => upload_progress_
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_strict_mode => Off => Off
session.use_trans_sid => 0 => 0

SimpleXML

Simplexml support => enabled
Revision => $Id: 6b8e23a01a85046737ef7d31346da5164505c179 $
Schema support => enabled

SPL

SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value

timezonedb

Alternative Timezone Database => enabled
Timezone Database Version => 2015.7

tokenizer

Tokenizer Support => enabled

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.3

xmlreader

XMLReader => enabled

xmlwriter

XMLWriter => enabled

zlib

ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.8
Linked Version => 1.2.8

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name
sysvsem
sysvshm

Environment

Variable => Value
XDG_VTNR => 1
XDG_SESSION_ID => c2
XDG_GREETER_DATA_DIR => /var/lib/lightdm-data/chapaev
HOSTNAME => localhost.localdomain
GPG_AGENT_INFO => /run/user/1000/keyring/gpg:0:1
GLADE_PIXMAP_PATH => :/usr/share/glade3/pixmaps
TERM => xterm
XDG_MENU_PREFIX => xfce-
SHELL => /bin/bash
HISTSIZE => 1000
CANBERRA_DRIVER => pulse
LC_SOURCED => 1
QT_XFT => 0
TMPDIR => /tmp
WINDOWID => 94371844
MGA_MENU_STYLE => mageia
QTDIR => /usr/lib64/qt4
QTINC => /usr/lib/qt3/include
GTK_MODULES => canberra-gtk-module
USER => chapaev
QT4DOCDIR => /usr/share/doc/qt4
LS_COLORS => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.iso=01;31:*.jpg=01;35:*.jpeg=01;35:*.JPG=01;35:*.JPEG=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.ico=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.divx=01;35:*.xvid=01;35:*.3gp=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.gem=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:*.mp2=00;36:*.mod=00;36:*.xm=00;36:*.s3m=00;36:*.it=00;36:*.wma=00;36:*~=47;30:*.bak=47;30:*.swp=47;30:*.bck=47;30:*.bk=47;30:*.old=47;30:*.tmp=47;30:*.save=47;30:*.rpmsave=47;30:*.rpmnew=47;30:
PILOTPORT => usb:
XDG_SESSION_PATH => /org/freedesktop/DisplayManager/Session0
GLADE_MODULE_PATH => :/usr/lib64/glade3/modules
XDG_SEAT_PATH => /org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK => /run/user/1000/keyring/ssh
SESSION_MANAGER => local/localhost.localdomain:@/tmp/.ICE-unix/4468,unix/localhost.localdomain:/tmp/.ICE-unix/4468
SCREENDIR => /home/chapaev/tmp
SYSTEMD_PAGER => /usr/bin/less -FR
XDG_CONFIG_DIRS => /etc/xdg
NLSPATH => /usr/share/locale/%l/%N
DESKTOP_SESSION => 06Xfce4
MAIL => /var/spool/mail/chapaev
PATH => /usr/local/bin:/usr/bin:/usr/local/games:/usr/games:/usr/lib64/qt4/bin:/home/chapaev/bin
XDG_SESSION_TYPE => x11
INPUTRC => /etc/inputrc
PWD => /home/chapaev
XMODIFIERS => @im=none
LANG => ru_RU.utf8
PYTHONSTARTUP => /etc/pythonrc.py
PS1 => [\u@\h \W$(type __git_ps1 >/dev/null  2>&1 && __git_ps1 " (%s)")]\$
GDMSESSION => 06Xfce4
HISTCONTROL => ignoredups
LESSCHARSET => utf-8
SHLVL => 2
HOME => /home/chapaev
XDG_SEAT => seat0
LANGUAGE => ru_RU.UTF-8:ru
G_FILENAME_ENCODING => @locale
TMP => /tmp
XDG_SESSION_DESKTOP => 06Xfce4
LOGNAME => chapaev
QTLIB => /usr/lib64
DBUS_SESSION_BUS_ADDRESS => unix:abstract=/tmp/dbus-BA4FXqk9TY,guid=ed4b1ccba6e3887d806deb7b569e61c5
XDG_DATA_DIRS => /usr/local/share:/usr/share
LESSOPEN => |/usr/bin/lesspipe.sh %s
BROWSER => /usr/bin/www-browser
XDG_RUNTIME_DIR => /run/user/1000
META_CLASS => download
DISPLAY => :0.0
GLADE_CATALOG_PATH => :/usr/share/glade3/catalogs
XDG_CURRENT_DESKTOP => XFCE
XAUTHORITY => /home/chapaev/.Xauthority
COLORTERM => xfce4-terminal
_ => /usr/bin/php

PHP Variables

Variable => Value
_SERVER["XDG_VTNR"] => 1
_SERVER["XDG_SESSION_ID"] => c2
_SERVER["XDG_GREETER_DATA_DIR"] => /var/lib/lightdm-data/chapaev
_SERVER["HOSTNAME"] => localhost.localdomain
_SERVER["GPG_AGENT_INFO"] => /run/user/1000/keyring/gpg:0:1
_SERVER["GLADE_PIXMAP_PATH"] => :/usr/share/glade3/pixmaps
_SERVER["TERM"] => xterm
_SERVER["XDG_MENU_PREFIX"] => xfce-
_SERVER["SHELL"] => /bin/bash
_SERVER["HISTSIZE"] => 1000
_SERVER["CANBERRA_DRIVER"] => pulse
_SERVER["LC_SOURCED"] => 1
_SERVER["QT_XFT"] => 0
_SERVER["TMPDIR"] => /tmp
_SERVER["WINDOWID"] => 94371844
_SERVER["MGA_MENU_STYLE"] => mageia
_SERVER["QTDIR"] => /usr/lib64/qt4
_SERVER["QTINC"] => /usr/lib/qt3/include
_SERVER["GTK_MODULES"] => canberra-gtk-module
_SERVER["USER"] => chapaev
_SERVER["QT4DOCDIR"] => /usr/share/doc/qt4
_SERVER["LS_COLORS"] => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.iso=01;31:*.jpg=01;35:*.jpeg=01;35:*.JPG=01;35:*.JPEG=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.ico=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.divx=01;35:*.xvid=01;35:*.3gp=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.gem=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:*.mp2=00;36:*.mod=00;36:*.xm=00;36:*.s3m=00;36:*.it=00;36:*.wma=00;36:*~=47;30:*.bak=47;30:*.swp=47;30:*.bck=47;30:*.bk=47;30:*.old=47;30:*.tmp=47;30:*.save=47;30:*.rpmsave=47;30:*.rpmnew=47;30:
_SERVER["PILOTPORT"] => usb:
_SERVER["XDG_SESSION_PATH"] => /org/freedesktop/DisplayManager/Session0
_SERVER["GLADE_MODULE_PATH"] => :/usr/lib64/glade3/modules
_SERVER["XDG_SEAT_PATH"] => /org/freedesktop/DisplayManager/Seat0
_SERVER["SSH_AUTH_SOCK"] => /run/user/1000/keyring/ssh
_SERVER["SESSION_MANAGER"] => local/localhost.localdomain:@/tmp/.ICE-unix/4468,unix/localhost.localdomain:/tmp/.ICE-unix/4468
_SERVER["SCREENDIR"] => /home/chapaev/tmp
_SERVER["SYSTEMD_PAGER"] => /usr/bin/less -FR
_SERVER["XDG_CONFIG_DIRS"] => /etc/xdg
_SERVER["NLSPATH"] => /usr/share/locale/%l/%N
_SERVER["DESKTOP_SESSION"] => 06Xfce4
_SERVER["MAIL"] => /var/spool/mail/chapaev
_SERVER["PATH"] => /usr/local/bin:/usr/bin:/usr/local/games:/usr/games:/usr/lib64/qt4/bin:/home/chapaev/bin
_SERVER["XDG_SESSION_TYPE"] => x11
_SERVER["INPUTRC"] => /etc/inputrc
_SERVER["PWD"] => /home/chapaev
_SERVER["XMODIFIERS"] => @im=none
_SERVER["LANG"] => ru_RU.utf8
_SERVER["PYTHONSTARTUP"] => /etc/pythonrc.py
_SERVER["PS1"] => [\u@\h \W$(type __git_ps1 >/dev/null  2>&1 && __git_ps1 " (%s)")]\$
_SERVER["GDMSESSION"] => 06Xfce4
_SERVER["HISTCONTROL"] => ignoredups
_SERVER["LESSCHARSET"] => utf-8
_SERVER["SHLVL"] => 2
_SERVER["HOME"] => /home/chapaev
_SERVER["XDG_SEAT"] => seat0
_SERVER["LANGUAGE"] => ru_RU.UTF-8:ru
_SERVER["G_FILENAME_ENCODING"] => @locale
_SERVER["TMP"] => /tmp
_SERVER["XDG_SESSION_DESKTOP"] => 06Xfce4
_SERVER["LOGNAME"] => chapaev
_SERVER["QTLIB"] => /usr/lib64
_SERVER["DBUS_SESSION_BUS_ADDRESS"] => unix:abstract=/tmp/dbus-BA4FXqk9TY,guid=ed4b1ccba6e3887d806deb7b569e61c5
_SERVER["XDG_DATA_DIRS"] => /usr/local/share:/usr/share
_SERVER["LESSOPEN"] => |/usr/bin/lesspipe.sh %s
_SERVER["BROWSER"] => /usr/bin/www-browser
_SERVER["XDG_RUNTIME_DIR"] => /run/user/1000
_SERVER["META_CLASS"] => download
_SERVER["DISPLAY"] => :0.0
_SERVER["GLADE_CATALOG_PATH"] => :/usr/share/glade3/catalogs
_SERVER["XDG_CURRENT_DESKTOP"] => XFCE
_SERVER["XAUTHORITY"] => /home/chapaev/.Xauthority
_SERVER["COLORTERM"] => xfce4-terminal
_SERVER["_"] => /usr/bin/php
_SERVER["PHP_SELF"] => test2
_SERVER["SCRIPT_NAME"] => test2
_SERVER["SCRIPT_FILENAME"] => test2
_SERVER["PATH_TRANSLATED"] => test2
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["REQUEST_TIME_FLOAT"] => 1453229364.1822
_SERVER["REQUEST_TIME"] => 1453229364
_SERVER["argv"] => Array
(
    [0] => test2
)

_SERVER["argc"] => 1

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.

[chapaev@localhost ~]$


Мечемся, как меченые, ищем, где ветер дует
И смеёмся до тех пор, пока никто не умер (с)

Asus P8H61 | Intel Pentium G840 2.80 GHz s1155 | DDR III 8 Gb x 2шт 1866 Mhz PC-14900 G.Skill Ripjaws X series | SSD Kingston HyperX 3K 120GB 2.5" SATAIII | Asus PCI-Ex GeForce GT 440 1024MB GDDR5 (128bit) | Fedora 28 x64 | xfce4 | Java | OracleDB
Спасибо сказали: neket891

8

На всякий случай удалил все правила из iptables и разрешил все соединения - не помогло:(

9

chapaev⇓ пишет:

neket89, наслаждайтесь.

Если не сложно, скиньте результат команды (можно вместо домена localhost):

ini_set("display_errors", true);
error_reporting(6135);
$a = fsockopen ("ssl://имя_домена.ru", 443, $b, $c, 5);
echo $a, $b, $c; 

Чтобы хоть знать работает ли на вашей системе.

10 (2016-01-24 12:27:07 отредактировано chapaev)

neket89, на моей машине выполнять это нет смысла, ибо нет никаких сервисов на 443м нет. Дайте какой-то хост для примера.

Spoiler

Консоль
[chapaev@localhost ~]$ cat test.php
<?php
    ini_set("display_errors", true);
    error_reporting(6135);
    $a = fsockopen ("ssl://localhost", 443, $b, $c, 5);
    echo $a, $b, $c;
?>
[chapaev@localhost ~]$ php test.php
PHP Warning:  fsockopen(): unable to connect to ssl://localhost:443 (Connection refused) in /home/chapaev/test.php on line 4

Warning: fsockopen(): unable to connect to ssl://localhost:443 (Connection refused) in /home/chapaev/test.php on line 4

Мечемся, как меченые, ищем, где ветер дует
И смеёмся до тех пор, пока никто не умер (с)

Asus P8H61 | Intel Pentium G840 2.80 GHz s1155 | DDR III 8 Gb x 2шт 1866 Mhz PC-14900 G.Skill Ripjaws X series | SSD Kingston HyperX 3K 120GB 2.5" SATAIII | Asus PCI-Ex GeForce GT 440 1024MB GDDR5 (128bit) | Fedora 28 x64 | xfce4 | Java | OracleDB

11

chapaev⇓ пишет:

ибо нет никаких сервисов на 443м нет. Дайте какой-то хост для примера.

Ладно, спасибо) Давать какой-либо хост тоже нет смысла, поскольку в этом случае будет браться сертификат хоста и конфигурацию сервера таким образом не проверить:(

12

neket89, если Вам нужны эксперименты - можно поднять на виртуалке магею, стянуть с репов магеи последний php и там играться. Будет чистый дистрибутив "без примесей" для тестов.

Мечемся, как меченые, ищем, где ветер дует
И смеёмся до тех пор, пока никто не умер (с)

Asus P8H61 | Intel Pentium G840 2.80 GHz s1155 | DDR III 8 Gb x 2шт 1866 Mhz PC-14900 G.Skill Ripjaws X series | SSD Kingston HyperX 3K 120GB 2.5" SATAIII | Asus PCI-Ex GeForce GT 440 1024MB GDDR5 (128bit) | Fedora 28 x64 | xfce4 | Java | OracleDB

13

chapaev⇓ пишет:

neket89, если Вам нужны эксперименты - можно поднять на виртуалке магею, стянуть с репов магеи последний php и там играться. Будет чистый дистрибутив "без примесей" для тестов.

Либо заюзать Docker smile

MXLinux 19.3 - xfce
Чем больше я работаю админом, тем больше понимаю,
насколько волшебна фраза - "Нет технической возможности!"

==============================================

14

chapaev⇓ пишет:

neket89, если Вам нужны эксперименты - можно поднять на виртуалке магею, стянуть с репов магеи последний php и там играться. Будет чистый дистрибутив "без примесей" для тестов.

XliN⇓ пишет:

Либо заюзать Docker smile

Спасибо, буду пробовать.

15

Доброго времени суток! Проверил на виртуальной машине на Mageia 4 с PHP 5.5 всё работает отлично. Как можно на Mageia 5 безболезненно перейти с версии 5.6 на версию 5.5.

16

neket89⇓ пишет:

безболезненно перейти с версии 5.6 на версию 5.5.

http://php.net/downloads.php

ROSA Desktop Fresh R11.1 EE 2016.1 Desktop 64-бит

17 (2016-02-16 19:48:26 отредактировано neket89)

TopE⇓ пишет:

http://php.net/downloads.php

Я имею в виду с помощью пакетов rpm (через официальные репозитории).

18

В общем проблему решил понижением версии PHP до 5.5. Для этого я удалил источники обновления mageia 5, установил источники mageia 4. Удалил пакеты от версии 5.6 и установил такие же пакеты версии 5.5.

Хотя это не решило проблему с версией 5.6, но проблему для себя я решил. Возможно в PHP 7 такой проблемы не будет.