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

How to implement this mentioned validation in Laravel 9 Validation?

I am trying to achieve certain laravel validation criteria which I am having hard time to implement. Please help me in the same. I am using laravel 9 & PHP 8.1 Description: I have an API which has below mentioned inputs: a. company_name -…
0
votes
1 answer

RECTOR MISS - Unsupported operand types: string + float when working with gmdate and upgrading to PHP8.1

if ( $userdata['user_id'] != ANONYMOUS ) { switch ( $userdata['user_time_mode'] ) { case MANUAL_DST: $dst_sec = $userdata['user_dst_time_lag'] * 60; return ( !empty($translate) ) ? strtr(gmdate($format,…
0
votes
0 answers

How to get PHP 8.0.26 with PDO running on MS server 2019 IIS 10?

I have MS Server 2019 Standard edition, IIS 10.0.17763.1, Visual C++ 2019, PHP 8.0.26 NTS x64, and php_pdo_sqlsrv_80_nts.dll extension enabled. I'm able to connect to MS Access 2007 database and run a query. I'm able to query the database and…
knlklabacka
  • 71
  • 1
  • 6
0
votes
1 answer

assert error in symfony/translations when dumping translations

I have recently updated my project from symfony 6.1 to symfony 6.2 and I'm experiencing issue while dumping translations commend that I use: bin/console translation:extract pl --force --format=yaml results in: exception trace points…
ciekals11
  • 2,032
  • 1
  • 10
  • 24
0
votes
1 answer

how to install multiple phpmyadmin in ubuntu?

I'm using php7.4 in my ubuntu system, now I have to install php8.1 along with the php7.4 php8.1 was installed successfully, but how can I install PHPMyAdmin for php8.1? Or don't I need two PHPMyAdmin for the different PHP versions? please advise me…
0
votes
0 answers

EasyAdmin CRUD edit using Doctrine Proxy and failing

Our stack is PHP 8.1, Symfony 6.1 and EasyAdmin 4.4, the context of the error is we are trying to edit an entity record through normal EA CRUD edit, the error when I try to edit the record is: 15:41:19.128 critical Uncaught PHP Exception…
0
votes
1 answer

Unable to load MemcacheD extension in PHP 8.1.7

I am running the PECL PHP-Memcached 3.2.0 on PHP 7.x and PHP 8.1.0 Windows servers without problem. Unfortunately, it's impossible to make it work under PHP 8.1.7. Unable to load dynamic library - The specified module could not be found I obviously…
b126
  • 544
  • 4
  • 11
0
votes
1 answer

Does tailwind need upper version of php?

I want to install a tailwind package for my laravel project. I write in Terminal: composer require composer require laravel-frontend-presets/tailwindcss --dev The error is: Your requirements could not be resolved to an installable set of…
0
votes
0 answers

Auth and Session removed on refresh in laravel 9

i have a problem on laravel-9 project php 8.1 once i'll do auth login using ajax request i save in session and i redirect to other page once do the redirect the website back to login and all information on auth and session removed: public function…
mmantach
  • 148
  • 10
0
votes
2 answers

How to add to blade (Laravel, PHP) PHP-code as text with other background?

I want add PHP-code as text in laravel blade. (Something like adding code in stackoverflow) in blade file I have: {!! nl2br($article->body_ru) !!} in $article->body_ru I'm add huijlhgfyuhukik rfthkgjb ftygyjh
Klipe_LD
  • 31
  • 3
0
votes
0 answers

Compatible MySQL_connect alternative in PHP 8.1

Have a xamp server running PHP Version 8.1.10. When trying to connect, it gives the following error: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\elims\databaseConnect.php:7 Stack trace: #0…
DanielS
  • 13
  • 4
0
votes
0 answers

php 8.0+ Errors still displaying

error_reporting(0); ini_set('display_errors', 0); ini_set('display_errors', 'Off'); error_reporting('display_errors', 'Off'); these are some of the options i found on the net, but none of them working The error is: PDOException: SQLSTATE[23000]:…
Kevin_woob
  • 58
  • 6
0
votes
0 answers

PHP sum in while loop calculation

As an assignment I have to come up with a script in which the numbers are added together and I have to display this calculation by using a while. It's very old study material that I need to understand but I can't find anything on the internet that…
Exoisme
  • 9
  • 2
0
votes
0 answers

FOR-EACH control structures with an array display only the last value

For a assignment I am asked to create an array of some users. (At least 5) I need to apply the For-Each structure but I don't understand what I'm doing wrong in my code since I only get the last value. I hope someone can explain to me what I'm doing…
Exoisme
  • 9
  • 2
0
votes
1 answer

Php spreadsheet downlod is giving garbage collect error

I am using "phpoffice/phpspreadsheet": "^1.25", for downloading Excel file. Here is the code I have used. use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; use…
nas
  • 2,289
  • 5
  • 32
  • 67