Closed studiowena closed 1 year ago
It was fixed on the upstream in https://github.com/pear/MDB2/commit/ee0563d1ac6ed2694c48701e24ed7c352edb6639#diff-f94887f1af0c817d672f0c66dea6f57b815aeb56be1007e85ddc84eaf925b54aL826 but it doesn't provide a new release so I guess a manually copy-and-overwrite will be needed... or just use a legacy PHP version.
Oh wait... It looks like we are only using the MDB2::parseDSN
in this plugin. We can just vender a fixed version of that static method.
Can you try whether https://github.com/nthu-ee/roundcube-plugin-vacation/commit/16f0d2e6d8064c8ae5fad7b6ac649586f3d336a8 works for you?
Can you try whether 16f0d2e works for you?
Trying this fix but my source of these files differ than Yours and lines number :) so just raw whole files:
vacationdriver.class.php
and on file
virtual.class.php (on my file i've these lines on 24 and 30 :) dont know maybe You have more code if i replace whole file from You RAW code of virtual.class.php there was problems with connection to DB of plugin
/roundcube/plugins/vacation/lib/VacationConfig.class.php on line 78
PHP Warning: Undefined array key "dotforward" in /roundcube/plugins/vacation/lib/VacationConfig.class.php on line 78
roundcube[6048]: <29ot3hb0> [1] SELECT goto FROM postfixadmin.alias WHERE address='user@domain.com' AND goto='user@domain.com';
roundcube[6048]: PHP Warning: Undefined variable $keepcopy in /roundcube/plugins/vacation/lib/virtual.class.php on line 288
roundcube[6048]: <29ot3hb0> [2] SELECT subject,body,active FROM vacation WHERE email='user@domain.com';
roundcube[6048]: <29ot3hb0> DB Error: [1046] No database selected (SQL Query: SELECT subject,body,active FROM vacation WHERE email='user@domain.com') in /roundcube/program/lib/Roundcube/rcube_db.php on line 564 (GET /roundcube/?_task=settings&_action=plugin.vacation)
roundcube[6048]: PHP Warning: Undefined array key "line" in /roundcube/program/lib/Roundcube/rcube.php on line 1497
roundcube[6048]: <29ot3hb0> DB Error: Vacation plugin: query on postfixadmin.vacation failed. Check DSN and verify that SELECT privileges on postfixadmin.vacation are granted to user 'virtual_vacation'. <br/><br/>Error message: [1046] No database selected in /roundcube/plugins/vacation/lib/virtual.class.php on line 0 (GET /roundcube/?_task=settings&_action=plugin.vacation)
and this on roundcube page error message
CONFIGURATION ERROR
Vacation plugin: query on postfixadmin.vacation failed. Check DSN and verify that SELECT privileges on postfixadmin.vacation are granted to user 'virtual_vacation'.
Error message: [1046] No database selected
Please read the INSTALL instructions!
strange while i've correct DSN on config file
so just change only these two lines with MDB2 on my virtual.class.php
Its start working but some php warnings left:
roundcube[6067]: PHP Warning: Undefined array key "dotforward" in /roundcube/plugins/vacation/lib/VacationConfig.class.php on line 78
and
roundcube[6067]: PHP Warning: Undefined variable $keepcopy in /roundcube/plugins/vacation/lib/virtual.class.php on line 283
i can ignore it while plugin just started working :) but maybe some simple fix for this to hide these warning on logs
Trying this fix but my source of these files differ than Yours and lines number :)
This repository is not the official one but customized for the university which I school enrolled a long time ago.
Since we are talking about different things, here's not for your use case. I don't think there will be people continue the work for either MDB2 or the vacation plugin. Plus, I no longer have access to the server I worked on and I don't use RoundCube personally.
If anyone want to have this fixed, I suggest you start your own repo. No one is really maintaining this repo.
Hi,
There is problem with Roundcube 1.6.0 and php 8.1 wich is required to run newest Roundcube...
This is related to MDB2 pear/MDB2 is already installed and is the same as the released version 2.5.0b5
Dont know how to fix this