318 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
60
views
Insert and update database using save() in laravel causing duplicates
I have a function that saves two related models inside a transaction. But after running it, I see duplicate entries in the database — same data but different IDs.
Here’s a simplified version of the ...
0
votes
1
answer
61
views
socialiteproviders/laravelpassport : getAccessTokenResponse returns null as response
We are using socialiteproviders/laravelpassport for OAUTH2.0 integration and try to authenticate users. The first call return expected code and state values Socialite::driver('laravelpassport')->...
1
vote
0
answers
65
views
Why is `institutionId` a string in my old API response but an integer in the new version after upgrading PHP, Yii, and MariaDB?
I recently upgraded my application's stack, and I noticed a change in the API responses. Below are the details of the version changes:
Component Old Version New Version
PHP 7.3.0 8.3.0
...
2
votes
1
answer
62
views
PDO Firebird 2.5 and PHP 7.3 : unable to use temporary table
I'm populating a temporary table with items, and then use this table to filter with a SQL JOIN operator, but it does not work.
Snippet below show the problem.
$pdo->beginTransaction();
$pdo->-&...
0
votes
0
answers
146
views
Warning: session_id(): Cannot change session id when session is active
After the server PHP version of my Magento 2.2.1 website was upgraded from 7.2 to 7.3, the following error was prompted:
Warning: session_id(): Cannot change session id when session is active in /home/...
1
vote
0
answers
133
views
Why does Xdebug 3.1 not report ZipArchive function time?
Context
In a legacy app I am profiling a script that archives files in a zip. At the moment it takes about 30-35 seconds to add 55MB (~450 files) to a zip archive on a locally-running VM. I was hoping ...
0
votes
1
answer
2k
views
How to run composer install in php script via exec or shell_exec?
I am trying to run composer update --lock -n via php exec or shell_exec
$commands = array(
'echo $PWD',
'whoami',
'git fetch',
'git reset --hard HEAD',
'...
-1
votes
1
answer
3k
views
PPA repository to install deprecated php7.3 on Ubuntu
I need to deploy a PHP application that was built on PHP 7.3` in 2019.
It is dockerized and the Dockerfile tries to install it from a well know repository:
RUN apt-add-repository -y ppa:ondrej/php
...
0
votes
0
answers
50
views
Why PHP Curl execution time is increased while using php 7.3 and Nginx compare to Apache and php 5.6
I am using Apache and PHP 5.6 to execute a curl for an API hosted on another domain with a URL in the format of https://xyz. The total curl execution time for this setup is around 30 milliseconds. ...
1
vote
1
answer
125
views
PHP Composer dependencies conflict
I have a legacy application with PHP 7.3 and Composer v1.
There is an installed lcobucci/jwt:3.3.1 library.
The requirements for this library are very straightforward:
php: ^5.6 || ^7.0
ext-mbstring: *...
0
votes
1
answer
793
views
Installing php-dev results in 7.0 packages being installed instead of 7.3
When I run -
apt-get install php-dev
I see a bunch of php 7.0 packages being installed -
The following additional packages will be installed: dh-php libexporter-tiny-perl liblist-moreutils-perl libssl-...
0
votes
2
answers
240
views
PHP 7.3 PHP Deprecated: Function create_function() is deprecated
I updated my php vesrion from 5.6 to 7.3 and now it showing an error
PHP Deprecated: Function create_function() is deprecated in magiczoomplus/magiczoomplus.module.core.class.php on line 78
my code ...
0
votes
2
answers
1k
views
Connection could not be established with: php_network_getaddresses: getaddrinfo failed: Name or service not known
Connection could not be established with host
p3plvcpnl452615.prod.phx3.secureserver.net :stream_socket_client():
php_network_getaddresses: getaddrinfo failed: Name or service not
known
I have ...
0
votes
0
answers
341
views
Symfony 4.4 The "datatable" service or alias has been removed or inlined when the container was compiled
I am new in Symfony and I have migrated Symfony from 3 to 4.
I got this error in this external service:
The "datatable" service or alias has been removed or inlined when the container was ...
0
votes
1
answer
31
views
How to use an anonomyous function directly to assign a value? [duplicate]
I know I can do this:
$myFunc = function () { return 42; };
$val = $myFunc();
But I want to skip $myFunc and do something like this:
$val = () { return 42; };
Is this possible?
Of course, my real ...