Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
5 votes
3 answers
163 views

PHP 8.4 rounding gives different result than 8.2

I am in the process of upgrading our code from php 8.2 to 8.4 I noticed we are getting some test failures because of round() returning different values than expected. Ultimately the problem could be ...
yeaitsme's user avatar
  • 131
2 votes
1 answer
32 views

Adding variables in PHP 8.2 heredoc not working

I'm using PHP 8.2. I have the following heredoc: $a = 4; $b = 2; $str = <<<EOT $a + $b = {$a + $b} EOT; print $str; Error: PHP Parse error: syntax error, unexpected token "+", ...
John Cowan's user avatar
  • 1,764
0 votes
0 answers
29 views

SQLSTATE[HY000] [1040] Too many connections (Connection: mysql, SQL: select * from `cache` where `key` in(job_hubwale_cache_illuminate:queue:restart)) [duplicate]

occurs this error in live project hosted in contabo sesrver i have create project in laravel12,php 8.2 & database used MySQL. this project hosted in contabo serve in this why generate this error ...
dharmendra hubwale's user avatar
0 votes
0 answers
109 views

Formtype on Symfony 7.3 that doesn't render

Before with my Symfony project with the version 6.1, I could do it. {{ form_start(form, {'attr': {'id': 'form-add-meeting'}}) }} {{ form_widget(form) }} <label for="">Date ...
Michaël Godinho Da Costa's user avatar
-1 votes
2 answers
126 views

Internal Server Error Illuminate\Contracts\Container\BindingResolutionException Target class [admin] does not exist

I'm having this error that I can't seem to resolve. I'm making a Laravel application in PHP. The routes in the web.php file are correct. There are no errors in the controller, nor in the kernel.php ...
utente1234567890's user avatar
1 vote
0 answers
53 views

Is this a new way to pass callables? [duplicate]

I've been looking into Symfony's code to understand it better and noticed that Symfony\Component\Security\Http\Authenticator contains the base authenticator classes that comes with Symfony, and in ...
537mfb's user avatar
  • 1,522
1 vote
2 answers
48 views

DateTimeImmutable yielding distinct timestamps in distinct PHP runtimes

Running the following script: var_dump( (DateTimeImmutable::createFromFormat( format : 'Y-m-d H:i:s', datetime: '2120-10-03 07:00:00', timezone: new DateTimeZone('Europe/...
DevelJoe's user avatar
  • 1,552
0 votes
0 answers
19 views

Radar export does not shows gridlines of xaxis

I have try to export the radar chart example from the phpspreadsheet hub. The export works, but it doesn't shows the gridlines of the xaxis. What i get actually: and what i want to get : here is the ...
achillix's user avatar
  • 497
-1 votes
1 answer
161 views

Can't use readonly class because of doctrine proxies

Q A Version doctrine/orm 3.3.2 Version php 8.2 Summary I've got a blocking issue while trying to use a class which is a readonly class. I just can't use it since doctrine has auto-generated a Proxy ...
Vincent PHILIPPE's user avatar
0 votes
1 answer
111 views

How to install two different php memcached modules on the same server?

No it isn't as easy as it looks! The default php version running on this Ubuntu 22.04 server is php7.4 and most of our applications run with it. Now we want to lift some applications, which run under ...
Calamity Jane's user avatar
0 votes
1 answer
182 views

Laravel on Azure Web App (Linux, B3 Plan) - Slow Performance & Deployment Issues

I'm deploying a Laravel 10 website on Azure Web Services (Linux) using an App Service (Basic B3 Plan) and an Azure Database (MySQL). The project is fairly simple, containing only a homepage and ...
Jaian's user avatar
  • 3
0 votes
1 answer
19 views

Error Typed property Foo::$bar must not be accessed before initialization

I am using php8.2 in a Symfony 6.4 app. I have a DTO, which is defined as follows: final class Store { public function __construct( public readonly string $storeNumber, public ...
Calamity Jane's user avatar
0 votes
0 answers
49 views

Twice use php native functions after update to php 8.2 in xhprof

I have observed the use of native PHP functions twice after updating to PHP 8.2: I'm using xhproff. Columns: Name Calls Calls% I don't know what is function with '@1', but the number of function ...
grzeso's user avatar
  • 57
-1 votes
2 answers
124 views

Undefined property: Illuminate\Auth\AuthManager::$id

I am building a CRUD notes app and I have this controller, I am trying to get all the notes from a user to display in the index page also I am using laravel breeze. The IDE says "Undefined method ...
jm1004's user avatar
  • 15
0 votes
0 answers
109 views

Attempted to call function "ftp_ssl_connect" from namespace "App\FTP" [duplicate]

I wanted to execute my make sf_console c="ftp:download" command which is located in the Command folder and I got this error Attempted to call function "ftp_ssl_connect" from ...
Wassim Benkhelifa's user avatar
0 votes
0 answers
235 views

Joomla 5.2.3 "Class "Factory" not found"

I have created a custom plugin to list Mp3 files from a directory in a table but I am facing an issue Joomla gives me error: 0 Class "Factory" not found I am using Joomla 5.2.3 and PHP 8.2 ...
9944990's user avatar
  • 444
0 votes
1 answer
87 views

Code Igniter 4: There is no data to update

I've been trying for hours to figure out this error in CodeIgniter 4 (PHP 8.2), and I think someone else might notice what I'm missing. I have a Model with an update function. When I use it as is, I ...
ADF's user avatar
  • 11
2 votes
1 answer
205 views

How to configure ClockMock with Phpunit 10+?

ClockMock is a very useful tool for creating time sensitive tests e.g. if a date is in past A should happen, if it is in the future B should happen. ClockMock is a part of the phunit-bridge, which ...
Calamity Jane's user avatar
1 vote
0 answers
46 views

Database file at path `/var/www/sites/website.com/database/database.sqlite` does not exist, but running `php artisan migrate` works just fine

Suppose I have a Laravel 11 application running at www.website.com, which is hosted at a linux machine. The application has a poor response time because it has to fetch data from three databases ...
HelloWorld's user avatar
0 votes
1 answer
302 views

Creation of dynamic property DateInterval is deprecated in PHP 8.2+ but i can't refactor Datetime Class

I don't know how to solve this problem. I have the following function in my project: public static function getTimeAgo($datetime, $full = false) { $now = new DateTime; $ago = new DateTime($...
Marco Floriano's user avatar
0 votes
0 answers
56 views

How to make input using checkbox with codeigniter 4.5.5

I want to make a form using checkbox in CI 4.5.5, but I got an error "Array to string conversion" Form file <form action="" id="form_validation" method="POST"...
Raina Zah's user avatar
1 vote
1 answer
58 views

How to prevent PHP from adding default namespace prefixes when importing a sub-XML into another XML

I'm working with PHP 8.2 and need to import an XML node from one document to another without PHP automatically adding the "default" namespace prefix. This is breaking the digital signature ...
Alekei's user avatar
  • 11
0 votes
1 answer
62 views

Are there limitations on execution 'depth' or 'length' for register_shutdown_function functions?

This is a serious head-scratcher (for me at least). I have re-structured my application to trigger issuing of email and SMS notifications regarding an action after the browser request has been ...
John Rix's user avatar
  • 6,723
0 votes
1 answer
165 views

How to validate an array which can be empty

My class, which I try to validate, has a property, which can be either an empty array or an array of certain objects: use App\Api\Dto\WorkHour as WorkHourDto; use Symfony\Component\Serializer\...
Calamity Jane's user avatar
1 vote
1 answer
476 views

CKFinder file Uploader not working in PHP 8.2

I had no problem with ckfinder in php version 7, but after updating the server to php 8.2, when I upload a photo through quick upload, I get the following error. CKSource\CKFinder\Filesystem\File\...
user3754884's user avatar
1 vote
2 answers
230 views

Does usort() behave differently in php 8.2.0 vs php 7.4.33?

I have an associate array like this: $all_works = [ ["title"=>"A Children’s Story", "year"=>"2024"], ["title"=>"Occurred during ...
Coding_with_a_Tractor's user avatar
1 vote
0 answers
50 views

PHP8 PHP-FPM how to exclude function args on www-error.log

I had: /var/log/php-fpm/www-error.log and php.ini already log Fatal errors. All Fatal errors logs have function args. Example: myFunction('hello','bla blabla') And these args show on the www-error.log,...
Ken Le's user avatar
  • 1,803
0 votes
0 answers
143 views

php8 how to properly define a errorHandler in a class?

In a class I use file_put_contents, which only gives a warning and not an exception to catch. The way to do it as I saw also in the docs is a callable function. The examples I find are for non object ...
Calamity Jane's user avatar
1 vote
0 answers
162 views

symfony 6.4 how to read serializer groups dynamically?

I am changing from annotation to attributes and have trouble to get my serializer groups. I annotate properties in my data classes (not Entities) like this: use Symfony\Component\Serializer\Annotation\...
Calamity Jane's user avatar
1 vote
0 answers
121 views

Cloud SQL issue after PHP update to 8.2

I am using PDO connection for Cloud SQL from website. I have updated PHP to 8.2 recently and connection has stopped working and giving error [MY-010914] [Server] Bad handshake even though there is ...
K Kataria's user avatar
0 votes
1 answer
372 views

Cannot get path to GNU libiconv 1.17 to be accepted when compiling php 8.2.16 on Ventura 13.6.4 get: Does not support errno

I have trouble compiling php 8.2.16 on Mac OS Ventura 13.6.4. The configure script does not recognize the GNU libiconv installed with Homebrew in /usr/local/opt/libiconv. I succeeded to compile and ...
Lasse's user avatar
  • 1
1 vote
0 answers
52 views

PHP Fatal error: Uncaught Error: Call to undefined function apache_setenv() [duplicate]

Recently I upgraded Debian Version 11.8 to 12.4 ( bullseye -> bookworm ) This included also an upgrade of php 7.3 to 8.2 After the upgrade almost all web services were running but only one didn't. ...
hans's user avatar
  • 41
0 votes
1 answer
426 views

After upgrading to PHP8.2 on GAE, upload no longer work to Cloud Storage

My web app has been working fine for many years on PHP7 on Google App Engine and Cloud Storage. This week I'm updating to PHP8 and have fixed the usual issues with stricter types, etc. The only issue ...
Mark's user avatar
  • 41
0 votes
1 answer
160 views

Laravel: Controller class Global variable returns null in class function

I'm a java developer; New to Laravel and PHP both. I learned how to define a global variable in Laravel controller class and used it as such. But it returns null in all other functions. I have a class ...
Sikander Ali's user avatar
3 votes
2 answers
4k views

Php 8.2 curl extension not working windows + mamp [closed]

I don't get the curl extension working for php 8.2. Im using MAMP PRO (latest version) on windows. For php 8.1 it worked. I tried with php 8.2.1 and 8.2.2. What I tried: Uncomment php_curl.dll in ini ...
Timo's user avatar
  • 41
0 votes
1 answer
450 views

PHP8 and guzzlehttp package

I have updated my local setup with PHP 8.2.13 version, my project is working fine. I have third party API call within my project which is implemented with guzzleHttp client class. GuzzleHttp version I ...
Amruta Ranade's user avatar
2 votes
2 answers
913 views

is it possible to use a readonly class as a DTO for symfony forms?

I have a simple symfony form used to create a ThingEntity. I have a CreateThingType and a CreateThing DTO: The DTO namespace App\DataTransfer; use App\Validator\UniqueNameForParent; use Symfony\...
Angulator1st's user avatar
0 votes
1 answer
402 views

Missing Character 'ہ' in Urdu Fonts when Generating PDF using mPDF in PHP

I am facing a unique challenge with the mPDF library in PHP when generating PDFs containing Urdu text. The specific character causing issues is 'ہ' (Heh), which appears to be either missing or not ...
Muhammad Yahya Imran's user avatar
0 votes
0 answers
336 views

Symfony ignores routing and shows phpinfo

I'm new to Symfony and I'm trying to make a simple web page, afterinstalling docker, php 8.3 and composer, I downloaded a Symfony image (v5.4.20) and added doctrine to it Now, both the database and ...
Saleck's user avatar
  • 13
1 vote
1 answer
199 views

Add files to archive without rebuilding archive

I'm trying to add files to a big archive (currently using zip but any format is fine) but any time I add even a small file it will rebuild the archive. Even though this is fairly fast, I want this ...
K1ll3rM's user avatar
  • 73
2 votes
1 answer
400 views

Google App Engine 502 (Bad Gateway), but 200 (OK) in log with PHP 8.2

I'm migrating a GCP app engine from an old PHP5.5 to a PHP8.2. The app deploy passes OK. When sending requests to the GAE, I always get HTTP/1.1 502 Bad Gateway errors, but according to the logs it ...
Tibo's user avatar
  • 21
0 votes
0 answers
321 views

Laravel, Vue, Inertia, Vite using Teleport as a pop-up modal, dynamically called?

By reading the title you can understand my stack, and problem, but let's explain it in detail. I have a pop-up modal CheckOutModalPaper (which is basically a Teleport component.) that i'm using in my ...
theDonsDonsDon's user avatar
0 votes
1 answer
1k views

Uncaught ErrorException: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in even though I am checkng for nulll

I am getting following error on line 42 of my code. But strange thing is I am already checking for null and the actual error seems to be happening on line 44. How to fix this issue? Error Uncaught ...
Frank Martin's user avatar
  • 3,469
0 votes
1 answer
155 views

How to identify the passed parameter in PHP as array or associative array (any Key-Value pair)?

I am using Laravel 10 with Livewire v3. I have a method that accepts array as one of the parameter. If the parameter is just an array then the method will behave differently, if the parameter is ...
VoidOfLimbo's user avatar
0 votes
0 answers
299 views

Trying to access array offset on value of type int for one of the objects but the others are working fine, the isset is TRUE. need to understand why

Inside the loop the $qty[$key] and $action[$key] both works fine but I am facing this error with the $batch_id[$key]. The loop I used for test is just two indexes. and the dd of $data as shown below. ...
Hagar Maher's user avatar
1 vote
1 answer
490 views

Slow loading of large php files on PHP 8.2 gloogle cloud engine

We're using cache files that consist of a combination of simple PHP code and HTML. These cache files are stored with a PHP filename. Some files exceed 400 KB, and I've noticed that Google App Engine, ...
H Marinho's user avatar
1 vote
0 answers
150 views

Laravel auto-injection issue (Too few arguments) after migrating to PHP 8.2

I recently migrated my Laravel project to PHP 8.1, and I'm encountering an issue with dependency injection in my controllers. I have set up auto-injection in my AppServiceProvider using the bind ...
Lounes Hogez's user avatar
0 votes
0 answers
62 views

how to show error when send multipart/form-data in header

when add a product to my app, I check if property "is_force", user should add all required properties to request. but when sent with multipart/form-data header and if user does not send all ...
Reza Heydari's user avatar
0 votes
0 answers
254 views

IonCube encoded file causes infinite loop

I have a PHP file encoded using IonCube Encoder GUI 13.0.2. It is a PHP 8.2.4 code that runs fine unencoded, but crashes badly when encoded - causing a message similar to this (the second number ...
CSM MX's user avatar
  • 11
0 votes
1 answer
58 views

php class constuctor text before property

i trie to figure out what the use of the "text" is before te propery/variable in the contructor. What is the use of "TableGatewayInterface" in the constructor in the example below? ...
Jilco Tigchelaar's user avatar