Menu

#136 Webacula and Zend Framework 3

database
open
nobody
None
5
2018-06-17
2018-06-16
No

I have been using Webacula for some time on an OpenSuse installation. I recently upgraded to Leap 15.0 which also upgrades PHP to 7 and Zend to 3. I couldn't get Webacula to start as it kept giving me an exception with Zend_Session::start saying that the session was already opened. I eventually managed to get it working by commenting out the setSaveHandler line. There were several references on the internet to permission problems with the session data and so I wasn't entirely surprised that this got it working. However, try as I have, I can't actually see what is wrong with the savehandler logic other than in the Dbtable.php code, which is the handler, it gets to ZendAuth get instance and that is where it blows up.

So, I now have it working without storing the session information in the database. Plus, there is still one other minor glitch in that the screen gets the following message all the time:
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /usr/share/php7/Zend/Cache/Backend.php on line 79

If anyone out there is still looking at this and has any ideas on how to fix the original problem I would be glad to hear.

Discussion

  • David Wilcox

    David Wilcox - 2018-06-16

    OK, a slight step forward. I decided to keep digging and found that if I added the 'strict' option to the mix things got a little better but I also had to add 'throw_startup_exceptions'. Now the system is working and writing the login to the database. There is still the 'Deprecated' message and another has been added:
    Warning: count(): Parameter must be an array or an object that implements Countable in /usr/share/php7/Zend/Db/Table/Abstract.php on line 1307
    but as before they don' t seem to be causing any problem.

     
  • David Wilcox

    David Wilcox - 2018-06-17

    As far as I can tell the problems with the Warning and Deprecated messages are genuine bugs in the Zend framework. I have made the following modifications and no longer get these messages.

    In Cache/Backend.php at line 79 replace
    while (list($name, $value) = each($directives)) {
    with
    foreach($directives as $name => $value) {

    In Db/Table/Abstract.php at line 1307 cut
    $keyValuesCount = count($keyValues);
    and place it after the test that follows it

     
  • David Wilcox

    David Wilcox - 2018-06-17

    This has become slightly more complicated as I have now discovered that the Zend components installed by OpenSuse Leap 15 are not up to date for PHP7

     

Log in to post a comment.

MongoDB Logo MongoDB