Questions tagged [php-7.2]

Use this tag for version-specific issues relating specifically to PHP 7.2.Use with the [php] tag

Deprecations: https://wiki.php.net/rfc/deprecations_php_7_2

GA release is scheduled for 2017-11-30: https://wiki.php.net/todo/php72#timetable

724 questions
3
votes
4 answers

Error: Apache shutdown unexpectedly error message

I just upgraded the PHP version of XAMPP from PHP 7.1.7 to PHP 7.2.0 using the guidelines from this article. Then I tried restarting the XAMPP but I got this error: 10:54:47 AM [Apache] Error: Apache shutdown unexpectedly. 10:54:47 AM [Apache] …
user9162601
3
votes
1 answer

Why php adds null bytes to private and protected property names?

I am new to PHP world and learning it from php.net. I know that when casting object to an array then the null byte is added around the private and protected property names when ClassName or asterisk key (*) is prepended to the private and protected…
user8480171
2
votes
1 answer

Getting an error when I try to add variable on Query on my php 7 platform

I'm trying add limit & offset as variables on a sql in php application code looks like this: $bind[':limit'] = $limit; $bind[':offset'] = $offset; $sql= 'SELECT id, monkeys '. 'from monkeyisland mi ' . 'left join monkeyland ml ' …
Fabian
  • 265
  • 1
  • 11
2
votes
0 answers

Uncaught PHP exception

I have the following code: set_error_handler( function ($errno, $errstr, $errfile, $errline, array $errcontex) { throw new Exception($errstr, 0); }, E_ALL ); class Foo { public function asd(): int { return 0; …
Vadim Samokhin
  • 3,378
  • 4
  • 40
  • 68
2
votes
1 answer

ALL possible issues of 404 NOT found laravel 6

I've been stuck in a weird problem for a couple of days. All my web application routes are working fine except one. Its has a 404 not found issue. So I checked: My Routes list. It exists. | | GET|HEAD | dashboard/profile/create …
Saif Kamal
  • 67
  • 1
  • 11
2
votes
1 answer

How can I change session.gc_maxlifetime at execution time on php 7.2?

I want to change the session timeout if the user is signed in, if not(user is only visiting), the session should over early. Everything was working until I update from php 5.6 to 7.2, I know this newer version doesn't supports anymore this approach…
Éder Rocha
  • 1,538
  • 11
  • 29
2
votes
1 answer

How to enable PDO_ODBC on Linux?

I want to run Microsoft Access Database using PDO_ODBC (on Centos 7 x64 bit). But unfortunately i get this error on the page : could not find driver First of all i am looking the problem through my connection.php, but seems like there is no problem…
2
votes
3 answers

How to split string by slash which is not between numbers?

How to split string by slash which is not between numbers? I am using preg_split function below: $splitted = preg_split('#[/\\\\\_\s]+#u', $string); Input: "925/123 Black/Jack" Splitted result now: [ 0 => '925', 1 => '123', 2 =>…
Jackson
  • 23
  • 3
2
votes
2 answers

how to count the difference between the two time in php and show it

I need to show the difference between two times in PHP I use strtotime() function to convert my times to integer but my problem is the result not matched what I expected
Amir Hossein
  • 916
  • 2
  • 13
  • 38
2
votes
1 answer

Unable to link an ubuntu-apache container with ubuntu-php container using the docker run command

I was trying to learn docker and this is something I can't understand. I was trying to set up apache2 and php(fpm) in seperate containers. My folder structure is like this . ├── apache | ├── dockerfile | └── demo.apache.conf ├── php | ├──…
2
votes
0 answers

How to set calculate items of loop in one array in PHP

Following is my array ( [0] => Array ( [items] => 10.4 [Total] => 10.4 ) [1] => Array ( [items] => 10.5 [Total] => 10.5 ) [2] => Array ( …
David
  • 223
  • 1
  • 3
  • 9
2
votes
3 answers

Twig If statement within for loop opening tag

I have this code that is supposed to count items in a for loop retrieved from an object. This code is running on a symfony 5.0 project with php 7.2.5 and twig-bundle 5.0 {% set sent_mails = 0 %} {% for email in emails if email.status == 1 %} …
Eddy
  • 139
  • 1
  • 14
2
votes
0 answers

Roundcube - Uncaught ArithmeticError: Bit shift by negative number

I have install dovecot, postfix and roundcube but roundcube logs give the this Error: [12-Nov-2019 21:23:08 UTC] PHP Fatal error: Uncaught ArithmeticError: Bit shift by negative number in /usr/share/roundcube/program/lib/des.inc:155 Stack trace: #0…
Safa
  • 31
  • 7
2
votes
2 answers

Doctrine ODM - float field not working with decimal field

I have a document in doctrine with the field config set to /** @ODM\Field(type="float") */ public $stock_price; and on my mongodb the field has a validation for decimal stock_price: { bsonType: 'decimal', description: 'must be a decimal…
2
votes
1 answer

Wordpress site shows php code after fresh install of VirtualMin on Ubuntu 18.04 LTS

I'm getting the below error for my WordPress website immediately after installing Virtualmin. Website was working fine before. I've repeated this several times over by restoring my VM to its previous state. I just can't work it out. Some history. I…
deancrabb
  • 41
  • 2