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
1 answer

Laravel session ID changes after every HTTP web request in a feature test

I'm writing a feature test and noticed that the session ID value changes after every request. For instance, each dumped value will be different: dump(session()->getId()); $response = $this->get('/?param=foo'); dump(session()->getId()); $response…
eComEvo
  • 11,669
  • 26
  • 89
  • 145
0
votes
0 answers

Using PHP 8.1 Enumerations (Enums) in Drupal 10 Modules?

I'm trying to use PHP 8.1's new Enums in a Drupal 10 Custom Module. Has anyone done this before? How can I use Enums in my Drupal module? Are there any problems or things I should watch out for with Enums in Drupal? Any help or examples would be…
Xab Ion
  • 1,105
  • 1
  • 11
  • 20
0
votes
0 answers

Symfony 6 - How to prevent login success when 2fa is activated?

When I sign in the 2fa form is shown and login is successful befor enter the authenticate code sent by mail. I'm using php8.1 and Symfony6.3 #** scheb_2fa.yaml** scheb_two_factor: security_tokens: -…
0
votes
1 answer

How to set a deep value in an object property or array column with link in PHP?

I need a function that can set its deepest value on an instance, whether it is an object or an array. For example, I have a function like this that I wrote and played with, but the setValue function does not work, my silly placing of links here and…
UKRman
  • 404
  • 3
  • 16
0
votes
1 answer

Fail to decrypt data with openssl_pkcs7_decrypt() on PHP 8.1(openssl 3.0) previously encrypted with PHP 8.0 (openssl 1.1) with openssl_pkcs7_encrypt()

I have been running Alpine Linux image version 3.15 with PHP 8.0 with openssl 1.1.x version on my server. Using this version I have encrypted some data using openssl_pkcs7_encrypt() function, stored the encrypted data in DB and I was able to then…
mbuster
  • 170
  • 14
0
votes
0 answers

cURL is not working in PHP (NGINX, PHP 8.1, Ubuntu)

I have a cURL-based script for sending push notifications to iOS. While it works perfectly on my local machine, I'm encountering issues when running it on an AWS EC2 instance. The instance is running Ubuntu (22.04.3) and aaPanel (6.8.30) with NGINX…
Esmatullah Arifi
  • 812
  • 3
  • 12
  • 24
0
votes
0 answers

facing issue in new symfony version 5.4

I have updated existing project to pimcore 10.6.7 and symfony 5.4, php v 8.1 after updating facing error. when i open existing templates from the admin interface, getting error of default doest not exist as service or class please find the below…
Thejaswini
  • 11
  • 2
0
votes
1 answer

Call to undefined function apache_getenv() CentOS Stream 9 and PHP 8.1

I get this error: Call to undefined function apache_getenv() I see suggestions to just switch to getenv(), but I don't see why I should have to since the manual implies it should be available for PHP 8. I have followed these instructions to find…
raw-bin hood
  • 5,839
  • 6
  • 31
  • 45
0
votes
0 answers

my Admin Route is not Working in laravel10

In my case, I have installed Laravel 10 in UBUNTU, after installation, I created front and admin routes, but there is a problem with routes, the front route is working, but the admin route is not working, when I call the admin route it says, Not…
0
votes
0 answers

Error after organizing the current bundles in pimcore 10.6

Im getting admin interface error after i migrated successfully pimcore 10.6, but admin interface not working. when i printing echo its printing till render line but getting this error An exception has been thrown during the rendering of a template…
Thejaswini
  • 11
  • 2
0
votes
0 answers

it is possible to upgrade only php version php 7.4 to php 8.1 without upgrade Laravel version?

I want to upgrade only the PHP version for my Laravel project, My Laravel Framework version is 6.20.19 and PHP version is 7.4, now I want to upgrade only php version php 7.4 to PHP 8.1 for my current Laravel project, how can I do without upgrading…
0
votes
0 answers

Laradock always fails to compile php8.1

After I set PHP_VERSION=8.1 in laradock .env And I commanded in the terminal: docker-compose build php-fpm, I always get the error as shown in : + apt-get update -yqq W: GPG error: http://deb.debian.org/debian bookworm InRelease: The following…
Jack
  • 11
  • 4
0
votes
0 answers

Return type of Requests_Cookie_Jar::offsetExists($key) error in WP 6 and PHP 8.1

We are upgrading a WordPress app with ACF Pro to PHP 8.1 and we encounter an error in Requests_Cookie_Jar::offsetExists($key) Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of…
gilbertdim
  • 357
  • 2
  • 11
0
votes
0 answers

Migrating pimcore v 6.9.6 to pimcore 10.6.3 v, facing key, value issue

Im updating pimcore v 6.9.6 to 10.6.3v. Initially did all the changes to the folder structures manually and executed this command COMPOSER_MEMORY_LIMIT=-1 composer update While migrating I'm getting below error [error] Migration…
Thejaswini
  • 11
  • 2
0
votes
0 answers

Is it possible to install php8.1 whithout installing ondrej/php PPA?

The thing is that I have to run php7.4 and php8.1 in the same apache server (running in Ubuntu 20.04.6 LTS focal). I achieve this in a VirtualBox machine with the same specifications following this guide When I tried the same thing in the production…
Fabri
  • 1
  • 4