ZF3 problem in Cache\Backend.php with PHP7


#1

I have recently upgraded my O/S to OpenSuse Leap 15.0 and that installed PHP7 and Zend 3.2.0. I use bacula for backups and have webacula as a browser front end. I had some problems even getting this to work but eventually found ways around the problems but then I was getting two messages which seem to indicate bugs in the Zend framework. I am going to post separate reports for each.

This one is in Cache\Backend.php. The message is about each() being deprecated and on line 79 this is the case. Changing it to a foreach statement corrects the error.


#2

Can you check the specific zend-cache version? We had recently released PHP 7.2 compliant versions.


#3

Hi there.

Your message prompted me to look a little more closely at what is installed. I had assumed that phpinfo was correct when it told me that the Zend Engine was 3.2.0 but a closer look at the binaries and also yast tells me that what is installed is actually 1.12.20.

My apologies for not seeing this earlier but I was assuming that the phpinfo was giving me the correct information.

David


#4

Ah yes, ZendFramework 1.x has been EOL’d long time ago, and won’t be adapted to newer PHP releases.


#5

Don’t mix up zend-framework and Zend Engine


#6

My mistake. I didn’t realise that the engine and framework had different versions. I also hadn’t noticed that, for reasons I’m still trying to establish, the OpenSuse Leap 15 packages only have the old framework even though PHP has moved to version 7.


#7

Please don’t rely on the distribution’s zend-framework packages.
Use composer instead!


#8

I am not familiar with composer. Can I use it to update the installed framework? I would be extremely grateful if you could give me some advice on how to proceed.


#9

Best, you start with a tutorial.
Installation using composer is part of it.


#10

Thank you. I will read it.