Questions tagged [php-7]
PHP 7 is the successor to PHP 5.6, it was released on December 3, 2015. Use this tag for issues relating to development using PHP 7
php-7
2,745
questions
1
vote
1
answer
40
views
Sending messages to MSMQ with PHP 7
I'm trying to send messages to Microsoft Message Queuing (MSMQ) from PHP (version 7).
Could anyone provide me with code examples or point me to relevant documentation or libraries that can be used to ...
0
votes
1
answer
46
views
Can I check if ReflectionType is instance of another type?
I want to check if a callable's return type is an instance of another type. For example, let's say I a have:
A class Pigeon which extends Animal.
A function addSupplier() which takes a callable ...
0
votes
0
answers
66
views
Debian 10 - Remove 2 different versions of PHP
I have a really screwed up Debian 10 system. It has about 20 years worth of customer records I have been tasked with recovering. I'm pretty sure the problem started, when someone upgraded it from ...
1
vote
0
answers
40
views
Can I persist a flag across all sessions?
I have an expensive operation that runs in my PHP application when the /api/replicate endpoint is requested. The operation takes roughly 30 seconds, so I want to prevent this endpoint from being ...
0
votes
0
answers
23
views
Apache or PHP issue is downloading ONLY Some Pages such as index.php and some rewrite pages. Other pages work fine [duplicate]
I use VirtualMin/Webmin (https://www.virtualmin.com/) for my hosting server. There must have been an update, but I am honestly still not sure what exactly happened, but since last few days all of a ...
0
votes
1
answer
55
views
overwriting basic count function in laravel globally
We are upgrading our laravel project, and it includes a language upgrade from php7 to php8. Consider this code:
$a = new stdClass()
count($a)
Will result in:
// php7
==> 1
// php8
==> ...
0
votes
1
answer
63
views
Errors PHP Notice: Undefined offset:, Trying to access array offset on value of type null
I get multiples php errors in server log , the error show on 2 lines of my php code, However php script is working but it show these errors in server log.
PHP Notice: Trying to access array offset on ...
0
votes
1
answer
234
views
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 ...
-1
votes
2
answers
59
views
$_GET not display character like & [duplicate]
i tried to create a script to redirect link of amazon, but when pass the link in a get variable url not return Url after the character &, i tried to echo the variable $_GET['tolink'] but display a ...
2
votes
1
answer
1k
views
Why i get alert : "This page has expired" in laravel livewire upon logging back in in?
I created a step-by-step form using Laravel Livewire, following this tutorial: here.
However, I'm experiencing some issues when logging in after logging out, when I submit the form I get a alert:
&...
0
votes
0
answers
104
views
Encryption/Decryption with Sodium extension with php 5.6 not working
My Old project is on 5.6 so Sodium extension for Encryption/Decryption is not working so my system engineer set some setting that if I run file with .php7 extension it run on php 7 and normal .php ...
0
votes
0
answers
396
views
firebase/php-jwt throws Signature verification failed error on every scenario in PHP 7.4
I've installed firebase/php-jwt as described in the repo.
In composer file.
"firebase/php-jwt": "~5.5.1",
"paragonie/sodium_compat" : "~1.19.0",
In my PHP file
...
0
votes
1
answer
33
views
Under the Laravel 7 (php7) system, if I query any id of my table, there is no result
Under the Laravel 7 (php7) system, if I query any id of my table, there is no result, but if I enter the id value as a string, then there is a result.
In the table, the id column type is int(11). ...
1
vote
1
answer
59
views
Cannot access the properties inside the Closure object in php 7
I have this in my unit test code:
$data = $this->_createSfApiFindMock($cisDataCount);
var_dump($data()); die();
output:
class Closure#731 (3) {
public $static =>
array(4) {
'...
0
votes
2
answers
405
views
Prestashop 1.7: Use statement not working in module main php file
I would like to edit the kpi section on the admin orders page,in Prestashop 1.7, so i created a module, i tried to use a custom module class, in the module's main php file, but i got error
so I ...