php-7.2

OpenSSL Encryption / Decryption php

杀马特。学长 韩版系。学妹 提交于 2020-05-17 05:42:08
问题 I am doing encryption which is working good but with same method I am doing decryption I am getting blank string not getting decryption string. I am using method AES-256-ECB and key is hexadecimal so I pass as $key = pack('H*','xxxxxxxxxxxx'); Encryption is going correct but decryption is not working. Please help me what I am doing wrong. function encrypt(string $data, string $key, string $method): string { $ivSize = openssl_cipher_iv_length($method); $iv = openssl_random_pseudo_bytes($ivSize

Warning: sizeof(): Parameter must be an array or an object that implements Countable php7.2

五迷三道 提交于 2020-01-25 06:44:27
问题 I updated to PHP 7.2 and it created an array (no pun intended) of issues. I've been knocking them out (mostly these sizeof and count() warnings. The one error we have : Warning: sizeof(): Parameter must be an array or an object that implements Countable in /usr/www/domain/phpmyd/includes/class_registry.php on line 236 I tried fixing it like this : if (sizeof($this->config) < 1) { To this: if (!empty($this->config) &&(sizeof($this->config) < 1)) { But it creates lots more errors shown below,

Warning: sizeof(): Parameter must be an array or an object that implements Countable php7.2

帅比萌擦擦* 提交于 2020-01-25 06:44:07
问题 I updated to PHP 7.2 and it created an array (no pun intended) of issues. I've been knocking them out (mostly these sizeof and count() warnings. The one error we have : Warning: sizeof(): Parameter must be an array or an object that implements Countable in /usr/www/domain/phpmyd/includes/class_registry.php on line 236 I tried fixing it like this : if (sizeof($this->config) < 1) { To this: if (!empty($this->config) &&(sizeof($this->config) < 1)) { But it creates lots more errors shown below,

Upgrade symfony 2.8 or php 5.4 first?

可紊 提交于 2020-01-24 15:05:07
问题 I'll be working soon on a project and I just wanted to ask this before. The project is on symfony 2.8 with php 5.4. The goal is to upgrade symfony to 3.4 (maybe 4.x later) and php to 7.x (probably 7.2). So here is my question : is there a better order to do this? Php 5.4 to 7.2 first or symfony 2.8 to 3.4 (or it doesn't matter)? Thanks for your advices. 回答1: First of all – you won't be able to run Symfony 3.4 project on PHP5.4. As of 2018-11-26 The latest Symfony ^3.4 version is v3.4.19 which

Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an instance of ProxyManager\void, none returned

我只是一个虾纸丫 提交于 2020-01-15 09:40:48
问题 I am using Symfony framework 3.4 at the moment. My vagrant box is running PHP 7.2.2. I everything was working properly before i installed 3 bundles below: almasaeed2010/adminlte doctrine/data-fixtures doctrine/doctrine-migrations-bundle I am getting below error when i am trying to access any page: (1/1) FatalThrowableError Type error: Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an instance of ProxyManager\void, none returned in Configuration.php (line 108) at

PHP 7.2: no additional .ini files parsed

﹥>﹥吖頭↗ 提交于 2020-01-14 11:53:33
问题 I have an ubuntu server (16.04.4 LTS) with apache2 running php7.0 (Apache 2.0 Handler) and php7.2 (FPM/FastCGI). PHP7.2 works fine, except that there are no extensions loaded - like json or anything else. See my phpinfo(): System Linux srvindkdif 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 Build Date Jun 22 2018 08:44:50 Server API FPM/FastCGI Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php/7.2/fpm Loaded Configuration File /etc/php/7.2

PHP 7.2 Warning: “Cannot change session name when session is active”

孤街醉人 提交于 2020-01-10 17:30:12
问题 Since PHP on our server was upgraded to 7.2 from 7.0. I am getting the following warning (which leads to error) if a new deployment is done. The reason is probably, that old sessions get invalid after deployment. Warning: session_name(): Cannot change session name when session is active in /var/www/html/model/login/lib/Session.class.php on line 137 Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in /var/www/html/model/login/lib/Session

Error with PHP 5.6 to PHP 7.2.4. Include_once don´t work

こ雲淡風輕ζ 提交于 2020-01-05 13:53:55
问题 The video illustrating the problem in real time is available here: link: https://www.youtube.com/watch?v=IaTJNS31w6A&feature=youtu.be I have been learning web-development. Newbie in PHP. I created a site in a local server WAMP. By default WAMP uses PHP 5.6. When the version is changed to 7.2.4, the site doesn't work. The warnings are: Warning: include_once(/app/config.inc.php): failed to open stream: No such file or directory in E:\wamp64\www\ziurfreelance2\index.php on line 3 and Warning:

Why php adds null bytes to private and protected property names?

▼魔方 西西 提交于 2020-01-04 06:18:21
问题 I am new to PHP world and learning it from php.net. I know that when casting object to an array then the null byte is added around the private and protected property names when ClassName or asterisk key (*) is prepended to the private and protected property names in the array keys. But my question is that WHY php add null bytes WHAT is the reason ? Can anyone tell in simple and easy words. Examples will help a lot. Thanks 回答1: The point of private / protected properties is that you're not

Cannot use 'Object as class name as it is reserved Cake 2.2.x

一曲冷凌霜 提交于 2019-12-30 14:08:43
问题 I'm having an issue trying to set up a testing copy of a site we have running, I have the files and applications installed under a Mint VM and when I point apache at the directory I get a 500 error and the following- [Thu Oct 25 15:09:39.714201 2018] [php7:error] [pid 8945] [client 192.168.0.14:52237] PHP Fatal error: Cannot use 'Object' as class name as it is reserved in /home/jamesmcgrath/Documents/dashboard/lib/Cake/Core/Object.php on line 30 [Thu Oct 25 15:09:39.714547 2018] [php7:error]