Questions tagged [php-8.1]

For questions specific to the usage and new features of PHP 8.1. Also, include the more generic [php] tag when using this tag.

PHP 8.1 (released November 2021) includes many new features including:

A full list of changes can be found in the migration guide.

336 questions
0
votes
0 answers

Warning: Undefined array key 1

It only started giving me problems when i upgraded to php 8.1. The issue is on the line $time = $matches Although, this is a very generic question and probably has been answered quite a few time something similar. I looked through some of the other…
Singleton
  • 85
  • 2
  • 5
  • 16
0
votes
0 answers

Symfony Locale only working after page refresh

I am new to symfony. Trying to add translation to my website when user change language with a dropdown. using Synfony Render controller to add the form to all pages. But translation not working when changing dopdown.Only after refreshing…
Mattew
  • 1
  • 1
0
votes
0 answers

php version is not identified

As the title, php version is not identified. Despite googling, it didn't work out. If you suggest a solution for this problem, I appreciate it. $ php -v dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicuio.72.dylib Referenced from:…
min
  • 1
  • 1
0
votes
0 answers

"npm ERR! Invalid Version:" on resolutions in package.json in php:8.1-fpm image

NOTE: It's not a question, it's sharing of todays headache, hopefully it will save somebody some time. Our builds started to fail with the error #29 [22/27] RUN npm install #29 1.031 npm ERR! Invalid Version: ^4.2.4 #29 1.033 #29 1.033 npm ERR! A…
kestux
  • 31
  • 6
0
votes
0 answers

How to make session not expire in symfony security system?

I am working on user authentication, which returns following if success. It stores the information in session/cookie which gets expired when inactive. Is there a way to make the session not expire or increase the time ? try { return new…
nas
  • 2,289
  • 5
  • 32
  • 67
0
votes
1 answer

mb_convert_encoding work incorrecly with japanese character

On Php8, mb_detect_encoding working incorrect. For example, i have code as bellow $str = "苫小牧"; // assume that $str's encode is SJIS // detect encoding of $str $encode = mb_detect_encoding($str); // convert 苫小牧 to EUC-JP $euc_str =…
TrungLuu
  • 27
  • 5
0
votes
1 answer

Drupal 7 modules appear to be php8 compatible but crashes when server changes from php7.3 to php8.1

Somewhere it said that Drupal 7.8 updated core and modules are php compatible with php8.1. However, when I change the cpanel multiphpmanager for the Drupal 7 domain to php8.1, the site crashes. The site returns to normal once I return the php to…
0
votes
0 answers

Laravel validate unique depend on another field

I have the ordinary unique validation 'bank_program_id' => [ 'required', 'integer', 'exists:bank_programs,id', Rule::unique('bank_program_country', 'bank_program_id') …
vdkt
  • 11
  • 2
0
votes
1 answer

hello, i deployed a symfony web app on azure microsoft and i found error on routing

the first page with the root "/" is working but any other root give error 404 (the project is working perfectly on local) [enter image description here](https://i.stack.imgur[enter image description…
0
votes
0 answers

Error intall php 8.1 on Debia 11 Bullseye

I cant install php8.1 on Debia 11 Bullseye My linux: Always appear this error: root@flexsrv47:~# apt install php8.1 Lendo listas de pacotes... Pronto Construindo árvore de dependências... Pronto Lendo informação de estado... Pronto Alguns…
0
votes
0 answers

PHP 8.1 upgrade causing 'Undefined array key 0' error. How to resolve?

please help me. i got error log after upgrade php from 7.4 to 8.1 : PHP Warning: Undefined array key 0 this is the script code, please help me, how to fix this function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); …
0
votes
1 answer

PHP 8.1 upstream timed out (110: Unknown error)

I had already a an issue when someone reached the basket on last 2023/03/29, it was a different PHP error which crashed the server. I had to manually restart the php service. Not enough memory: PHP Fatal error: Allowed memory size of 134217728…
London Smith
  • 1,622
  • 2
  • 18
  • 39
0
votes
2 answers

how to install php8.1 imagick on awa app runner?

I am installing project on aws app runner. Project uses php imagick so I tried to install it. I imported project form github source code (Laravel 10 + php 8.1) and running it automatically through configuration file (apprunner.yaml). I tried to add…
Michael
  • 3
  • 1
  • 4
0
votes
0 answers

How can I connect Laravel 10 to a remote SQL Server 2000 using ODBC and PHP 8.1?

I'm working on a web project using Laravel 10, which requires me to get data from a remote SQL Server 2000. To simulate this, I installed WinXP and SQL Server 2000 on VirtualBox. I'm using Windows 10 latest build. I'm not in a position to upgrade…
Jose
  • 1
  • 2
0
votes
1 answer

Why is the class not found after PHP upgrade from 7.0 to 8.1?

I am migrating an older application from PHP 7.0 to 8.1 on an ubuntu system. The app is using a library called MobileDetect. The readme of the latest verion of the library which I migrated to, states compatability only for PHP >=7.3,<8.0 As it is a…
merlin
  • 2,717
  • 3
  • 29
  • 59