Home / Community / Blog

I've noticed that in one of my old pages, based on ezPublish 4.4 ezcache script does not do anything.

I've found solution. You have to applay patch to kernel/classes/ezcache.php file. Diff looks like this:

--- kernel/classes/ezcache.php-2015-06-10       2012-05-22 18:40:06.000000000 +0200
+++ kernel/classes/ezcache.php  2015-06-11 00:30:00.126363504 +0200
@@ -451,10 +451,12 @@
         $cacheItem['iterationSleep'] = $iterationSleep;
         $cacheItem['iterationMax']   = $iterationMax;
         $cacheItem['expiry']         = $expiry;
-        $functionName = 'function';
+        $functionName = false;
         if ( $purge && isset( $cacheItem['purge-function'] ) )
             $functionName = 'purge-function';
-        if ( isset( $cacheItem[$functionName] ) )
+        else if ( !$purge && isset( $cacheItem['function'] ) )
+            $functionName = 'function';
+        if ( $functionName )
         {
             $function = $cacheItem[$functionName];
             if ( is_callable( $function ) )

Now command

php bin/php/ezcache.php --clear-all --purge

works.

I've got a question: How to add map to Navit - step-by-step.

On Android it's pretty simple. You have to press "Menu" button, then "Download maps" and choose desired region.

Today most of my sites stopped to work. After some time I've noticed that PostgreSQL has some problem with locale:

psql: FATAL:  database locale is incompatible with operating system
DETAIL:  The database was initialized with LC_COLLATE "pl_PL.UTF-8",  which is not recognized by setlocale().
HINT:  Recreate the database with another locale or install the missing locale.

I've found similar symptoms in thread "Problem with locales on Linux with 9.3.4" posted by Hubert "depesz" Lubaczewski.

My databases has collation pl_PL.UTF-8:

                                           List of databases
        Name        |       Owner        | Encoding |  Collation  |    Ctype    |   Access privileges
--------------------+--------------------+----------+-------------+-------------+-----------------------
 eztest-demo        | xxxxxxxx           | UTF8     | pl_PL.UTF-8 | pl_PL.UTF-8 |
 eztest-flow        | xxxxxxxx           | UTF8     | pl_PL.UTF-8 | pl_PL.UTF-8 |
 eztest-web         | xxxxxxxx           | UTF8     | pl_PL.UTF-8 | pl_PL.UTF-8 |

and this locale was installed:

[root@jaqb ~]# locale -a | grep pl
pl_PL
pl_PL.iso88592
pl_PL.utf8

The solution: Restart PostgreSQL ;-)

[root@jaqb ~]# /etc/init.d/postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [  OK  ]
[root@jaqb ~]# psql eztest-web
psql (8.4.20)
Type "help" for help.

eztest-web=>

That's all.

First installation. It's simple

yum install postgrey

Turn on automatic start:

chkconfig postgrey on

Check:

chkconfig --list postgrey
postgrey        0:off   1:off   2:on    3:on    4:on    5:on    6:off

Add

, check_policy_service unix:/var/spool/postfix/postgrey/socket

in main.cf file as last element smtpd_recipient_restrictions option:

Now it looks like this:

smtpd_recipient_restrictions = permit_mynetworks,
 permit_sasl_authenticated,
 reject_unauth_destination,
 reject_unknown_recipient_domain,
 check_policy_service unix:/var/spool/postfix/postgrey/socket

Restart postfix. Done.

You can check in maillog if it works:

grep postgrey /var/log/maillog

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30