php-5.6

php 5.x 7.x, ssl pdo error: Peer certificate CN=`someName' did not match expected CN='someIP'

偶尔善良 提交于 2019-12-07 02:46:25
We have a server with mysql on port 3306. We have sertifications and key and we try to connect to this server. But we see such problem: Peer certificate CN='SomeName' did not match expected CN='someIP' I've read a lot of articles and can't find answer for PDO PHP. The most interesting is that the SQLYog could connect with all settings. I've read that I verify_peer_names can be disabled (I hope I understand what is peer_names...), but only if we use openssl_{functions} or mysqli, not PDO. Both options are not appropriate for me. I need PDO. What I tried to do: switch between versions of php. It

What does `session.entropy_length` in `PHP.ini` do?

陌路散爱 提交于 2019-12-07 00:43:24
问题 In the session section of PHP.ini there is a directive called session.entropy_length . I'm aware that it's used to make the generation of the session id more random. How does it do that? What is the maximum length? What if it's exceeding the bits of the hash in use? 回答1: session.entropy_length specifies the number of bytes which will be read from the file specified above. Defaults to 0 (disabled). PHP Manual The "file mentioned above" is session.entropy_file 'entropy' for sessions is related

How to get __debugInfo to work with XDebug?

人走茶凉 提交于 2019-12-05 13:17:14
It seems __debugInfo does not work when xdebug overwrites var_dump . Is there anyway to make this work? I am using PHP 5.6.0 and XDebug 2.2.5 This is now fixed in Xdebug - soon to be released: https://github.com/xdebug/xdebug/commit/14159486d8d77732b5ae193ca9431bae80c94074 来源: https://stackoverflow.com/questions/26835450/how-to-get-debuginfo-to-work-with-xdebug

mcrypt_encrypt not working properly on PHP 5.6.9

一世执手 提交于 2019-12-05 08:24:04
I have the following code which worked fine on PHP 5.5.9. function index() { echo $this->encryptText_3des('TEST','JHHKJH9879'); } function encryptText_3des($plainText, $key) { $key = hash("md5", $key, TRUE); for ($x=0;$x<8;$x++) { $key = $key.substr($key, $x, 1); } $padded = $this->pkcs5_pad($plainText, mcrypt_get_block_size(MCRYPT_3DES, MCRYPT_MODE_CBC)); $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_3DES, $key, $padded, MCRYPT_MODE_CBC)); return $encrypted; } function pkcs5_pad ($text, $blocksize) { $pad = $blocksize - (strlen($text) % $blocksize); return $text . str_repeat(chr($pad),

What does `session.entropy_length` in `PHP.ini` do?

倾然丶 夕夏残阳落幕 提交于 2019-12-05 04:35:27
In the session section of PHP.ini there is a directive called session.entropy_length . I'm aware that it's used to make the generation of the session id more random. How does it do that? What is the maximum length? What if it's exceeding the bits of the hash in use? session.entropy_length specifies the number of bytes which will be read from the file specified above. Defaults to 0 (disabled). PHP Manual The "file mentioned above" is session.entropy_file 'entropy' for sessions is related to the randomness of session id values 来源: https://stackoverflow.com/questions/34966472/what-does-session

Send email on testing docker container with php and sendmail

笑着哭i 提交于 2019-12-03 13:59:10
问题 I'm on ubuntu 16.04. I have a (testing) docker (docker-compose) container running php 5.6 and apache 2.4. With production plateform (without docker) the mail is send with sendmail. How to send test email on docker container (with sendmail) ? Thanks in advance for responses. 回答1: It works. In Dockerfile : # sendmail config ############################################ RUN apt-get install -q -y ssmtp mailutils # root is the person who gets all mail for userids < 1000 RUN echo "root=yourAdmin

Send email on testing docker container with php and sendmail

你说的曾经没有我的故事 提交于 2019-12-03 09:48:48
I'm on ubuntu 16.04. I have a (testing) docker (docker-compose) container running php 5.6 and apache 2.4. With production plateform (without docker) the mail is send with sendmail. How to send test email on docker container (with sendmail) ? Thanks in advance for responses. It works. In Dockerfile : # sendmail config ############################################ RUN apt-get install -q -y ssmtp mailutils # root is the person who gets all mail for userids < 1000 RUN echo "root=yourAdmin@email.com" >> /etc/ssmtp/ssmtp.conf # Here is the gmail configuration (or change it to your private smtp server

Use of undefined constant SIGTERM - > assumed 'SIGTERM'

烈酒焚心 提交于 2019-12-01 22:13:16
Currently running PHPUnit with Codeception on my Windows machine gives me an error: [PHPUnit_Framework_Exception] Use of undefined constant SIGTERM - assumed 'SIGTERM' As far as I know is that SIGTERM is a constant provided by PCNTL , which is not supported in Windows. In that way this CONSTANT shouldnt be used for a test running on Windows env. at all. My PHP setup: PHP 5.6.17 (cli) (built: Jan 6 2016 13:28:38) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies PHPUnit PHPUnit 5.7.15 Codeception Codeception PHP Testing Framework v2.2.9

** is new power operator instead of power() in php

前提是你 提交于 2019-12-01 14:54:13
问题 How to use new version of Power operator instead of pow() in new version of php (5.6)? Like: echo pow(2,3); 回答1: There is a sample ** operator in php 5.6 + $i = 6; $i **=2; //output 36 $out = $i ** 3 //output 216 echo 2 ** 3 ** 2; // 512 (not 64) echo -3 ** 2; // -9 (not 9) echo 1 - 3 ** 2; // -8 echo ~3 ** 2; // -10 (not 16) ** is better than pow(,) . When you try to write a math algorithm. ** is a Powerful Operator. there's no functional difference between it and pow. power operator

Library not loaded error after brew install php56

北城余情 提交于 2019-12-01 03:44:31
I'm upgrading from php5.5 to php5.6 on OSX Mavericks using homebrew. I run brew install php56 Everything runs and completes fine but when I run php -v the following error comes up dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.53.dylib Referenced from: /usr/local/bin/php Reason: image not found Trace/BPT trap: 5 How do I fix this? Try this brew uninstall --ignore-dependencies node icu4c brew install node For me simply upgrading php helped. brew upgrade php The corresponding file dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.<version>.dylib did not exist but a