Questions tagged [php-7.2]

Use this tag for version-specific issues relating specifically to PHP 7.2.Use with the [php] tag

Deprecations: https://wiki.php.net/rfc/deprecations_php_7_2

GA release is scheduled for 2017-11-30: https://wiki.php.net/todo/php72#timetable

724 questions
5
votes
1 answer

connect() to unix:/var/run/php/php7.2-fpm.sock failed (11: Resource temporarily unavailable)

I have a question about nginx. I have some webservers on my environment using nginx and they are behind Load balancer. Suddenly, all web services are down and I found this error log on nginx: [error] 7097#7097: *44471950 connect() to…
stupidoes
  • 51
  • 1
  • 2
5
votes
1 answer

PHP 7.2: no additional .ini files parsed

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…
DaFunkyAlex
  • 1,859
  • 2
  • 24
  • 36
5
votes
1 answer

OpenSSL Encryption / Decryption php

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 =…
Milind
  • 1,855
  • 5
  • 30
  • 71
5
votes
2 answers

PHP MYSQLI_ASYNC Insert Query and continue

Is there a way to continue in a PHP7.2 script after using $sql = "INSERT INTO `table` SET `a` = 'aaa'; $result = mysqli_query($link,$sql,MYSQLI_ASYNC); // $result is always 'true' as a means of a delayed insert? It now gives Commands out of sync;…
Sergeant
  • 131
  • 1
  • 11
5
votes
2 answers

Yield from closure

I would like to yield some data. Problem is that chunk method require closure which do the job. Is there way to yield data like from foreach loop in this situation? public function yieldRowData(): \Iterator { $this->transactionQuery …
imclickingmaniac
  • 1,467
  • 1
  • 16
  • 28
5
votes
3 answers

502 Bad Gateway when installing PHP7.2 on nginx

So i installed LEMP (nginx, mysql, php..) by following the digital ocean guide. But ubuntu 16.04 only comes with php7 by default and i need greater then 7.1 to run Laravel. I am confused on why every time i replace php 7 with php 7.2-fpm from…
user7995285
5
votes
4 answers

Cannot load C:/php/php7apache2_4.dll into server: %1 is not a valid Win32 application

So almost all the time, this problem is down to a mismatch of Windows x32/x64 versions of Apache and PHP or the respective Binary versions. But I've triple checked and quadruple checked that they are the correct versions. So now I'm thoroughly…
FerrisDale
  • 51
  • 1
  • 1
  • 5
5
votes
1 answer

Misunderstanding of array_values

I've a problem to unerstand correctly array_values, when I do: $array[] = 'data1'; // I want [0 => 'data1'] unset($array[0]); // I want [] $array = array_values($array); // I want [] but keys resetted $array[] = 'data2'; // I want [0 =>…
mpiot
  • 1,482
  • 2
  • 15
  • 36
4
votes
2 answers

How to UNinstall php7.2-fpm WITHOUT installing Apache 2 (on a LEMP machine)

This may sound stupid, but my weird configuration seems to force an Apache2 installation when attempting to uninstall php7.2-fpm! (I use nginx and the last thing I want to see on my server is an Apache installation...) Here is the scenario: I'm…
Gwyneth Llewelyn
  • 796
  • 1
  • 11
  • 27
4
votes
2 answers

PHP 7.2 error Function create_function() is deprecated

After upgrade my VPS to PHP 7.2, my website have this error: PHP Deprecated: Function create_function() is deprecated in /home/nickname/public_html/framework/web/CHttpRequest.php on line 968 and the code at this file…
user2406612
  • 51
  • 1
  • 5
4
votes
0 answers

can't download file laravel use nginx (Failed - Network error)

The problem has been solved ! i check error.log in nginx 2019/04/16 17:29:39 [crit] 12060#12060: *261 open() "/var/lib/nginx/fastcgi/6/05/0000000056" failed (13: Permission denied) while reading upstream, client: 118.70.67.64, server: govangtam.org,…
4
votes
1 answer

How to set or circumvent CURLOPT_CONNECTTIMEOUT in PHP globally?

Is there a way to set the CURLOPT_CONNECTTIMEOUT somehow globally for all cURL requests? I have an issue where after an upgrade to PHP 7.2 some software’s cURLs now fail at a 10s connect timeout when before they did not. I can't exactly say what…
kontur
  • 4,934
  • 2
  • 36
  • 62
4
votes
1 answer

php Fatal error: Cannot use lexical variable $eventName as a parameter name in

I have the error as said in title in the following code (guzzle http lib) please tell me how to fix it manually. I have no idea about function() use () construct to be honest so dont know how to fix it. public function once($eventName, callable…
luky
  • 2,263
  • 3
  • 22
  • 40
4
votes
1 answer

PDO::PARAM_INT behaviour in PHP 7.1 & PHP 7.2

When passing a string with PDO::PARAM_INT there seems to be a change of behaviour in PHP 7.2. In Version 7.1 the updated value and the passed string were identical, in PHP 7.2 the updated value is "3" (see example below). Of course I'm aware that…
KHansen
  • 784
  • 5
  • 21
4
votes
2 answers

Laravel Parameter in every url

I have read almost everything in web and documentation but i can't find solution for my Problem. I have a variable stored in Session , then I want to put this variable in every url generated by route('some-route') . In Session I have sub =…
Malkhazi Dartsmelidze
  • 4,783
  • 4
  • 16
  • 40