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
1 answer

PHP DateTime difference is returning wrong number of days

I have the following code, which prints out differences between two dates: print_r((new DateTime('2018-01-01'))->diff(new DateTime('2018-11-01'))); print_r((new DateTime('2018-10-01'))->diff(new DateTime('2018-11-01'))); Output: DateInterval…
Askerman
  • 787
  • 1
  • 12
  • 31
3
votes
1 answer

Cannot use 'Object as class name as it is reserved Cake 2.2.x

I'm having an issue trying to set up a testing copy of a site we have running, I have the files and applications installed under a Mint VM and when I point apache at the directory I get a 500 error and the following- [Thu Oct 25 15:09:39.714201…
James McGrath
  • 187
  • 1
  • 4
  • 15
3
votes
3 answers

What is the difference b/w Countable and Non Countable Objects

I am trying out to find difference b/w a countable and a non countable object First I found out the Type of object echo gettype($data["current_fiat_currency"]); Which is a Object But when i had checked that it is a countable object or not …
Hassan ALi
  • 1,313
  • 1
  • 23
  • 51
3
votes
2 answers

Service with name "Zend\Authentication\AuthenticationService" could not be created. Reason: Session validation failed

I've developed a system using zend framework 3 and is working fine in my notebook, but when I try to run on a CentOS server it failed creating a session container. Session error image Session error image 2 I already compilated selinux modules, so…
3
votes
1 answer

Filter existing model data laravel

I have a model populated using hydrate, I now need to loop through this model and against each office return a new instance of the model. However, I cannot get the second foreach loop to work no matter what I try. Sadly the $data array needs to be…
Neo
  • 2,305
  • 4
  • 36
  • 70
3
votes
2 answers

PHP 7.2.7 warning: Use of undefined constant

So after I click submit on my index.php resgitration form. It all went good name, email, and password is saved from my database. But there is a warning that irrates me. Use of undefined constant result_query - assumed 'result_query' (this will…
Peter Festejo
  • 97
  • 2
  • 2
  • 9
3
votes
0 answers

Compile mbstring statically into PHP

Is there a way to compile the PHP extension mbstring statically into PHP (PHP >= 7)? Something like ./configure [...] --enable-mbstring=static [...] && make?
devopsfun
  • 1,368
  • 2
  • 15
  • 37
3
votes
1 answer

PHP 7.2.7: Attempted to call an undefined method named "setEncryptionName" of class "ZipArchive"

I am attempting to create an encrypted, password protected ZIP file using PHP 7.2.7. However, I am getting the following error message: Attempted to call an undefined method named "setEncryptionName" of class…
Magnanimity
  • 1,293
  • 8
  • 24
  • 44
3
votes
1 answer

How to start a session again after a session_write_close()

I have code in which I use sessions, and after modifying session variables, session_write_close() is called so that the session data lock is released. Now at another point in the same script, I need to make modifications to the session variables…
3
votes
2 answers

Compiling PHP 7.2 with OpenSSL

I am trying to compile PHP 7.2.5 on a RedHat operation system. I already compiled OpenSSL 1.1.0h on my own in a directory of my own /home/user/openssl-1.1. These are the lines how I compiled OpenSSL TARGET_DIR=/home/usr/openssl-1.1 # ... ./config…
devopsfun
  • 1,368
  • 2
  • 15
  • 37
3
votes
3 answers

XAMPP Access Forbidden

I have just downloaded the latest version of XAMPP with PHP version 7.2.4. I have made a very simple PHP validation for a HTML form and when I press submit it comes up with the following: Access forbidden! You don't have permission to access the…
Zac Cotterell
  • 105
  • 1
  • 1
  • 8
3
votes
0 answers

"Please install the "intl" extension for full localization capabilities" when intl IS installed

Symfony 2.8 project in ubuntu 16.04 I got this exception: An exception has been thrown during the rendering of a template ("The Symfony\Component\Intl\DateFormatter\IntlDateFormatter::__construct() method's argument $locale value 'es' behavior…
Sephy
  • 159
  • 1
  • 2
  • 15
3
votes
3 answers

installing php-imap on amazon ec2 linux 2

I need to install php-imap on amazon ec2 linux 2 instance. All the php stuff is inside amzn2extra-lamp-mariadb10.2-php7.2 but php-imap package is missing. Any advice ? Thanks
Leonardo Bernardini
  • 1,076
  • 13
  • 23
3
votes
1 answer

Argon2i in PHP7 - Picking Appropriate Options

What values should I use for generating Argon2i hashes and how can I find the appropriate settings my hardware can afford? Namely: memory_cost time_cost threads as: $options = [ 'memory_cost' => 1<<17, 'time_cost' => 4, 'threads' …
3
votes
2 answers

ini_set fails to set session variables – PHP 7.2.0 and higher

here´s an example with gc_maxlifetime but it worked for none of the session. variables I tried
musashii
  • 445
  • 6
  • 13