php notice Constant SYNC_FILTERTYPE_ALL already defined
-
Hai,
I recently upgrade my debian Jessie to Debian Stretch and my zarafa 7.2.4 to 7.2.6 and up to kopano 8.5.5 contributed edition.
and upgraded z-push to 2.4.0In this upgrade, there are some small misses on dependies, i got them fixed, im now left over with the following message:
PHP Notice: Constant SYNC_FILTERTYPE_ALL already defined in /etc/z-push/z-push.conf.php on line 166Now, i dont understand why im getting this message.
Can someone explain this please.Besides that everything works great, upgrade zarafa to kopano was not that hard.
For others a few pointers,
php5 => php7 upgrade.
run : dpkg -l | egrep “jessie|deb8|php5”
remove these all, write down what is removed and install the matching new version.
! Dont use parameters as --purge here. because that remove some config you might want to keep.mysql (5.5) => mariadb ( 10.1 )
Check the following:
dpkg -l | egrep “mysql|maria”
You might see, mysql-common but with a ~jessie extention which is a left over from backported packages or maria repo.
If you remove that one, kopano gets removed also, again here, write down what removed, dont use --purge.after its all removed, re-check your sources.list for any jessie left overs.
now install kopano-server-packages again.Dont forget to enable the php7-mapi
Last, bit optimization in systemd services.
If you run kopano on 1 server.run ; systemctl edit kopano-spooler
add:
[Unit]
After=kopano-server.service
Wants=kopano-server.servicedo this for all except kopano-server.
there i use :
[Unit]
After=network-online.target mysql.service mariadb.service
Wants=network-online.targetThe why, now you dont have any messages in de logs except that its started.
-
Hi thctlo,
from which Z-Push version have you upgraded? Are you using repositories?
Please post the output of fgrep -rn SYNC_FILTERTYPE_ALL /etc/z-push and fgrep -rn SYNC_FILTERTYPE_ALL [your-z-push-installation-folder].
Manfred
-
Hai Manfred,
Thank you for the quick responce.I’ve upgrade from z-push 2.3.1+0 to 2.4.0+0-0
im using the z-push repo.fgrep -rn SYNC_FILTERTYPE_ALL /etc/z-push
/etc/z-push/z-push.conf.php:163: // SYNC_FILTERTYPE_ALL (default, no limitation)
/etc/z-push/z-push.conf.php:166: define(‘SYNC_FILTERTYPE_ALL’, SYNC_FILTERTYPE_ALL);fgrep -rn SYNC_FILTERTYPE_ALL /usr/share/z-push
/usr/share/z-push/lib/request/getitemestimate.php:114: $spa->SetFilterType(SYNC_FILTERTYPE_ALL);
/usr/share/z-push/lib/request/getitemestimate.php:123: $spa->SetFilterType(SYNC_FILTERTYPE_ALL);
/usr/share/z-push/lib/request/sync.php:295: $spa->SetFilterType(SYNC_FILTERTYPE_ALL);
/usr/share/z-push/lib/request/sync.php:306: $spa->SetFilterType(SYNC_FILTERTYPE_ALL);
/usr/share/z-push/lib/request/sync.php:422: if ($maxAllowed > SYNC_FILTERTYPE_ALL &&
/usr/share/z-push/lib/request/sync.php:423: (!$spa->HasFilterType() || $spa->GetFilterType() == SYNC_FILTERTYPE_ALL || $spa->GetFilterType() > $maxAllowed)) {
/usr/share/z-push/lib/request/sync.php:430: $spa->SetFilterType(SYNC_FILTERTYPE_ALL);
/usr/share/z-push/lib/webservice/webservicedevice.php:115: * @param int $filtertype SYNC_FILTERTYPE_1DAY to SYNC_FILTERTYPE_ALL, false to ignore
/usr/share/z-push/lib/utils/zpushadmin.php:330: * @param int $filtertype SYNC_FILTERTYPE_1DAY to SYNC_FILTERTYPE_ALL, false to ignore
/usr/share/z-push/lib/utils/zpushadmin.php:341: if ($filtertype !== false && $filtertype < SYNC_FILTERTYPE_ALL || $filtertype > SYNC_FILTERTYPE_INCOMPLETETASKS) {
/usr/share/z-push/lib/core/zpushdefs.php:719:define(“SYNC_FILTERTYPE_ALL”, 0);
/usr/share/z-push/lib/core/devicemanager.php:709: $maxAllowed = (defined(‘SYNC_FILTERTIME_MAX’) && SYNC_FILTERTIME_MAX > SYNC_FILTERTYPE_ALL) ? SYNC_FILTERTIME_MAX : SYNC_FILTERTYPE_ALL;
/usr/share/z-push/lib/core/devicemanager.php:714: // ALL has a value of 0, all limitations have higher integer values, see SYNC_FILTERTYPE_ALL definition
/usr/share/z-push/lib/core/devicemanager.php:715: if ($maxDevice !== false && $maxDevice > SYNC_FILTERTYPE_ALL && ($maxAllowed == SYNC_FILTERTYPE_ALL || $maxDevice < $maxAllowed)) {
/usr/share/z-push/z-push-admin.php:1054: $filterType = (defined(‘SYNC_FILTERTIME_MAX’) && SYNC_FILTERTIME_MAX > SYNC_FILTERTYPE_ALL) ? SYNC_FILTERTIME_MAX : SYNC_FILTERTYPE_ALL;
/usr/share/z-push/z-push-admin.php:1056: if ($maxDevice !== false && $maxDevice > SYNC_FILTERTYPE_ALL && ($filterType == SYNC_FILTERTYPE_ALL || $maxDevice < $filterType)) { -
Hi thctlo,
your z-push.conf.php line 166 is wrong. It should be:
define('SYNC_FILTERTIME_MAX', SYNC_FILTERTYPE_ALL);
Manfred
-
Ok, yes, with above its ok, but i want SYNC_FILTERTYPE_2WEEKS
results in :
[Fri Apr 06 14:06:40.563116 2018] [:error] [pid 10170] [client 195.134.173.125:54572] PHP Notice: Constant SYNC_FILTERTYPE_2WEEKS already defined in /etc/z-push/z-push.conf.php on line 166What am im missing here.
-
Hi thctlo,
then you have to set
define('SYNC_FILTERTIME_MAX', SYNC_FILTERTYPE_2WEEKS);
Manfred
-
argg… , now you showed me, its clear, i changes the wrong field.
Thanks! mistery solved. … error in user… ;-)