Posts Tagged ‘Old’

How to update expiring OpenSSL certificates without downtime on haproxy Pacemaker / Corosync PCS Cluster

Tuesday, July 19th, 2022

pcm-active-passive-scheme-corosync-pacemaker-openssl-renew-fix-certificate

Lets say you have a running PCS Haproxy cluster with 2 nodes and you have already a configuration in haproxy with a running VIP IP and this proxies
are tunneling traffic to a webserver such as Apache or directly to an Application and you end up in the situation where the configured certificates,
are about to expire soon. As you can guess having the cluster online makes replacing the old expiring SSL certificate with a new one relatively easy
task. But still there are a couple of steps to follow which seems easy but systemizing them and typing them down takes some time and effort.
In short you need to check the current certificates installed on the haproxy inside the Haproxy configuration files,
in my case the haproxy cluster was running 2 haproxy configs haproxyprod.cfg and haproxyqa.cfg and the certificates configured are places inside this
configuration.

Hence to do the certificate update, I had to follow few steps:

A. Find the old certificate key or generate a new one that will be used later together with the CSR (Certificate Request File) to generate the new Secure Socket Layer
certificate pair.
B. Either use the old .CSR (this is usually placed inside the old .CRT certificate file) or generate a new one
C. Copy those .CSR file to the Copy / Paste buffer and place it in the Website field on the step to fill in a CSR for the new certificate on the Domain registrer
such as NameCheap / GoDaddy / BlueHost / Entrust etc.
D. Registrar should then be able to generate files like the the new ServerCertificate.crt, Public Key Root Certificate Authority etc.
E. You should copy and store these files in some database for future perhaps inside some database such as .xdb
for example you can se the X – Certificate and Key management xca (google for xca download).
F. Copy this certificate and place it on the top of the old .crt file that is configured on the haproxies for each domain for which you have configured it on node2
G. standby node1 so the cluster sends the haproxy traffic to node2 (where you should already have the new configured certificate)
H. Prepare the .crt file used by haproxy by including the new ServerCertificate.crt content on top of the file on node1 as well
I. unstandby node1
J. Check in browser by accessing the URL the certificate is the new one based on the new expiry date that should be extended in future
K. Check the status of haproxy
L. If necessery check /var/log/haproxy.log on both clusters to check all works as expected

haserver_cluster_sample

Below are the overall commands to use to complete below jobs

Old extracted keys and crt files are located under /home/username/new-certs

1. Check certificate expiry start / end dates


[root@haproxy-serv01 certs]# openssl s_client -connect 10.40.18.88:443 2>/dev/null| openssl x509 -noout -enddate
notAfter=Aug 12 12:00:00 2022 GMT

2. Find Certificate location taken from /etc/haproxy/haproxyprod.cfg / /etc/haproxy/haproxyqa.cfg

# from Prod .cfg
   bind 10.40.18.88:443 ssl crt /etc/haproxy/certs/www.your-domain.com.crt ca-file /etc/haproxy/certs/ccnr-ca-prod.crt 
 

# from QA .cfg

    bind 10.50.18.87:443 ssl crt /etc/haproxy/certs/test.your-domain.com.crt ca-file /etc/haproxy/certs

3. Check  CRT cert expiry


# for haproxy-serv02 qa :443 listeners

[root@haproxy-serv01 certs]# openssl s_client -connect 10.50.18.87:443 2>/dev/null| openssl x509 -noout -enddate 
notAfter=Dec  9 13:24:00 2029 GMT

 

[root@haproxy-serv01 certs]# openssl x509 -enddate -noout -in /etc/haproxy/certs/www.your-domain.com.crt
notAfter=Aug 12 12:00:00 2022 GMT

[root@haproxy-serv01 certs]# openssl x509 -noout -dates -in /etc/haproxy/certs/www.your-domain.com.crt 
notBefore=May 13 00:00:00 2020 GMT
notAfter=Aug 12 12:00:00 2022 GMT


[root@haproxy-serv01 certs]# openssl x509 -noout -dates -in /etc/haproxy/certs/other-domain.your-domain.com.crt 
notBefore=Dec  6 13:52:00 2019 GMT
notAfter=Dec  9 13:52:00 2022 GMT

4. Check public website cert expiry in a Chrome / Firefox or Opera browser

In a Chrome browser go to updated URLs:

https://www.your-domain/login

https://test.your-domain/login

https://other-domain.your-domain/login

and check the certs

5. Login to one of haproxy nodes haproxy-serv02 or haproxy-serv01

Check what crm_mon (the cluster resource manager) reports of the consistancy of cluster and the belonging members
you should get some output similar to below:

[root@haproxy-serv01 certs]# crm_mon
Stack: corosync
Current DC: haproxy-serv01 (version 1.1.23-1.el7_9.1-9acf116022) – partition with quorum
Last updated: Fri Jul 15 16:39:17 2022
Last change: Thu Jul 14 17:36:17 2022 by root via cibadmin on haproxy-serv01

2 nodes configured
6 resource instances configured

Online: [ haproxy-serv01 haproxy-serv02 ]

Active resources:

 ccnrprodlbvip  (ocf::heartbeat:IPaddr2):       Started haproxy-serv01
 ccnrqalbvip    (ocf::heartbeat:IPaddr2):       Started haproxy-serv01
 Clone Set: haproxyqa-clone [haproxyqa]
     Started: [ haproxy-serv01 haproxy-serv02 ]
 Clone Set: haproxyprod-clone [haproxyprod]
     Started: [ haproxy-serv01 haproxy-serv02 ]


6. Create backup of existing certificates before proceeding to regenerate expiring
On both haproxy-serv01 / haproxy-serv02 run:

 

# cp -vrpf /etc/haproxy/certs/ /home/username/etc-haproxy-certs_bak_$(date +%d_%y_%m)/


7. Find the .key file etract it from latest version of file CCNR-Certificates-DB.xdb

Extract passes from XCA cert manager (if you're already using XCA if not take the certificate from keypass or wherever you have stored it.

+ For XCA cert manager ccnrlb pass
Find the location of the certificate inside the .xdb place etc.

+++++ www.your-domain.com.key file +++++

—–BEGIN PUBLIC KEY—–

—–END PUBLIC KEY—–


# Extracted from old file /etc/haproxy/certs/www.your-domain.com.crt
 

—–BEGIN RSA PRIVATE KEY—–

—–END RSA PRIVATE KEY—–


+++++

8. Renew Generate CSR out of RSA PRIV KEY and .CRT

[root@haproxy-serv01 certs]# openssl x509 -noout -fingerprint -sha256 -inform pem -in www.your-domain.com.crt
SHA256 Fingerprint=24:F2:04:F0:3D:00:17:84:BE:EC:BB:54:85:52:B7:AC:63:FD:E4:1E:17:6B:43:DF:19:EA:F4:99:L3:18:A6:CD

# for haproxy-serv01 prod :443 listeners

[root@haproxy-serv02 certs]# openssl x509 -x509toreq -in www.your-domain.com.crt -out www.your-domain.com.csr -signkey www.your-domain.com.key


9. Move (Standby) traffic from haproxy-serv01 to ccnrl0b2 to test cert works fine

[root@haproxy-serv01 certs]# pcs cluster standby haproxy-serv01


10. Proceed the same steps on haproxy-serv01 and if ok unstandby

[root@haproxy-serv01 certs]# pcs cluster unstandby haproxy-serv01


11. Check all is fine with openssl client with new certificate


Check Root-Chain certificates:

# openssl verify -verbose -x509_strict -CAfile /etc/haproxy/certs/ccnr-ca-prod.crt -CApath  /etc/haproxy/certs/other-domain.your-domain.com.crt{.pem?)
/etc/haproxy/certs/other-domain.your-domain.com.crt: OK

# openssl verify -verbose -x509_strict -CAfile /etc/haproxy/certs/thawte-ca.crt -CApath  /etc/haproxy/certs/www.your-domain.com.crt
/etc/haproxy/certs/www.your-domain.com.crt: OK

################# For other-domain.your-domain.com.crt ##############
Do the same

12. Check cert expiry on /etc/haproxy/certs/other-domain.your-domain.com.crt

# for haproxy-serv02 qa :15443 listeners
[root@haproxy-serv01 certs]# openssl s_client -connect 10.40.18.88:15443 2>/dev/null| openssl x509 -noout -enddate
notAfter=Dec  9 13:52:00 2022 GMT

[root@haproxy-serv01 certs]#  openssl x509 -enddate -noout -in /etc/haproxy/certs/other-domain.your-domain.com.crt 
notAfter=Dec  9 13:52:00 2022 GMT


Check also for 
+++++ other-domain.your-domain.com..key file +++++
 

—–BEGIN PUBLIC KEY—–

—–END PUBLIC KEY—–

 


# Extracted from /etc/haproxy/certs/other-domain.your-domain.com.crt
 

—–BEGIN RSA PRIVATE KEY—–

—–END RSA PRIVATE KEY—–


+++++

13. Standby haproxy-serv01 node 1

[root@haproxy-serv01 certs]# pcs cluster standby haproxy-serv01

14. Renew Generate CSR out of RSA PRIV KEY and .CRT for second domain other-domain.your-domain.com

# for haproxy-serv01 prod :443 renew listeners
[root@haproxy-serv02 certs]# openssl x509 -x509toreq -in other-domain.your-domain.com.crt  -out domain-certificate.com.csr -signkey domain-certificate.com.key


And repeat the same steps e.g. fill the CSR inside the domain registrer and get the certificate and move to the proxy, check the fingerprint if necessery
 

[root@haproxy-serv01 certs]# openssl x509 -noout -fingerprint -sha256 -inform pem -in other-domain.your-domain.com.crt
SHA256 Fingerprint=60:B5:F0:14:38:F0:1C:51:7D:FD:4D:C1:72:EA:ED:E7:74:CA:53:A9:00:C6:F1:EB:B9:5A:A6:86:73:0A:32:8D


15. Check private key's SHA256 checksum

# openssl pkey -in terminals-priv.KEY -pubout -outform pem | sha256sum
# openssl x509 -in other-domain.your-domain.com.crt -pubkey -noout -outform pem | sha256sum

# openssl pkey -in  www.your-domain.com.crt-priv-KEY -pubout -outform pem | sha256sum

# openssl x509 -in  www.your-domain.com.crt -pubkey -noout -outform pem | sha256sum


16. Check haproxy config is okay before reload cert


# haproxy -c -V -f /etc/haproxy/haproxyprod.cfg
Configuration file is valid


# haproxy -c -V -f /etc/haproxy/haproxyqa.cfg
Configuration file is valid

Good so next we can the output of status of certificate

17.Check old certificates are reachable via VIP IP address

Considering that the cluster VIP Address is lets say 10.40.18.88 and running one of the both nodes cluster to check it do something like:
 

# curl -vvI https://10.40.18.88:443|grep -Ei 'start date|expire date'


As output you should get the old certificate


18. Reload Haproxies for Prod and QA on node1 and node2

You can reload the haproxy clusters processes gracefully something similar to kill -HUP but without loosing most of the current established connections with below cmds:

Login on node1 (haproxy-serv01) do:

# /usr/sbin/haproxy -f /etc/haproxy/haproxyprod.cfg -D -p /var/run/haproxyprod.pid  -sf $(cat /var/run/haproxyprod.pid)
# /usr/sbin/haproxy -f /etc/haproxy/haproxyqa.cfg -D -p /var/run/haproxyqa.pid  -sf $(cat /var/run/haproxyqa.pid)

repeat the same commands on haproxy-serv02 host

19.Check new certificates online and the the haproxy logs

# curl -vvI https://10.50.18.88:443|grep -Ei 'start date|expire date'

*       start date: Jul 15 08:19:46 2022 GMT
*       expire date: Jul 15 08:19:46 2025 GMT


You should get the new certificates Issueing start date and expiry date.

On both nodes (if necessery) do:

# tail -f /var/log/haproxy.log

How to Turn Off, Suppress PHP Notices and Warnings – PHP error handling levels via php.ini and PHP source code

Friday, April 25th, 2014

php-logo-disable-warnings-and-notices-in-php-through-htaccess-php-ini-and-php-code

PHP Notices are common to occur after PHP version upgrades or where an obsolete PHP code is moved from Old version PHP to new version. This is common error in web software using Frameworks which have been abandoned by developers.

Having PHP Notices to appear on a webpage is pretty ugly and give a lot of information which might be used by malicious crackers to try to break your site thus it is always a good idea to disable PHP Notices. There are plenty of ways to disable PHP Notices

The easiest way to disable it is globally in all Webserver PHP library via php.ini (/etc/php.ini) open it and make sure display_errors is disabled:

display_errors = 0

or

display_errors = Off

Note that that some claim in PHP 5.3 setting display_errors to Off will not work as expected. Anyways to make sure where your loaded PHP Version display_errors is ON or OFF use phpinfo();

It is also possible to disable PHP Notices and error reporting straight from PHP code you need code like:

 

<?php
// Turn off all error reporting
error_reporting(0);
?>

 

or through code:

 

ini_set('display_errors',0);


PHP has different levels of error reporting, here is complete list of possible error handling variables:

 

 

 

<?php
// Report simple running errors

error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings …)

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// Report all errors except E_NOTICE
// This is the default value set in php.ini

error_reporting(E_ALL ^ E_NOTICE);
// Report all PHP errors (see changelog)

error_reporting(E_ALL);
// Report all PHP errors error_reporting(-1);
// Same as error_reporting(E_ALL);

ini_set('error_reporting', E_ALL); ?>

The level of logging could be tuned on Debian Linux via /etc/php5/apache2/php.ini or if necessary to set PHP log level in PHP CLI through /etc/php5/cli/php.ini with:

error_reporting = E_ALL & ~E_NOTICE

 

If you need to remove to remove exact warning or notices from PHP without changing the way  PHPLib behaves is to set @ infront of variable or function that is causing NOTICES or WARNING:
For example:
 

@yourFunctionHere();
@var = …;


Its also possible to Disable PHP Notices and Warnings using .htaccess file (useful in shared hosting where you don't have access to global php.ini), here is how:

# PHP error handling for development servers
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log /home/path/public_html/domain/php_errors.log
php_value error_reporting -1
php_value log_errors_max_len 0

This way though PHP Notices and Warnings will be suppressed errors will get logged into php_error.log

Curious: Old ladies from Plovdiv, Bulgaria are knitting mobile and computer equipment hand made cases

Monday, November 11th, 2013

new business idea manual hand crafted knitted mobile device cases

While reading one of my daily tech news websites today I stimbled on very unusual news and a business idea, worthy to re-blog 😉 The idea of the new Innovative business is just genious and simple as that – knitted digital equipment cases. There are plenty of old ladies in Bulgaria who are used to knitting sweaters, hats and all kind of hand made winter clothes. Knitting was among the must have skills for ladies in Bulgaria until some years time even my grandmother when a bit younger used to knit in most of her free time. Thus most of grandmothers in Bulgaria still when get old and have a lot of free time, kill their time with the craft they learned as young. For the young European people who probably never heard of it knitting is unique kind of manufacture for producing winter clothes from yarn.

yarn in different colors the base material for knitting

Knitting was a top ladies craft before the boom of industrial manufacture before 19th century industrial revolution, nowadays its almost a forgotten craft. Now some genious people in Bulgaria decided to give work to this old ladies and pay them for knitting computer and mobile equipment cases (cases for Tablets, Smartphones, Notebooks etc.) Knitting of mobile equipment cases opens new work places and introduces new way for old people to earn some extra income, such extra income is absolutely necessary in Bulgaria nowdays as most old ladies receive ridiculous pension of 120 to 150 EUR per month (money insufficient to pay expensive winter heating bills and so expensive food that is nowdays in Bulgaria).

lady knitting a sweater or some kind of clothe

The company who invented this new business and introduced it for the masses is Snug Essentials and is started by enthusiastic young people who had grandmothers practicing the old craft. The innovative product is distributed via Etsy Global Platform for distributing hand crafted goods as well as in   Facebook, Twitter and Ebay. As of time of writting the companyis extremely small 6 old grandmas work on producing the knitted cases for digital equipment but the tendency is this to rise soon, as there are plenty of people who love the hand made cases.
The price of a case is also not too high, it costs only around 10$ per knitted case. Here are few nice knitted cases produced by grandmas 🙂

notebook laptop in knitted hand made case

Your girlfriend will love it if you gift her one of these 🙂

knitted notebook case original business idea

 

Saint Abraham the Bulgarian co-memoration in Bulgarian Orthodox Church

Monday, April 2nd, 2012

saint Abraham the Bulgarian, sv. Avramii Bolgarski

Saint Abraham the Bulgarian is an Orthodox Christian saint venerated across most Slavonic Christian dome. His co-memoration in the Bulgarian Orthodox Church (BPC) is on 1st of April.

What is unique about this saint is that he used to be born and grown in the tradition of the Muslim (Islam) faith and by the great providence of God he converted to the true faith of Christianity.

St. Abraham of (Bulgaria), was born in Volga Bulgaria in a community of Muslim Volga Bulgars (old Bulgarians). Nowdays Volga Bulgaria is located in Tararstan Russia. The saint used to be an islamic merchant and His martyrdom for Christ happened in March 6 (according to old Church Calendar) in year 1229.

He used to live in a very complex situation, when the islamic influence of Arabs in his motherland was quite severe. St. Abraham of Bulgaria used to be a rich man for his time, he was a merchant.
Because of the trade he travelled a lot to the Byzantine Empire and the Orthodox Christian principalities. This give him an opportunity to get to know Christian faith little by little.

He was accustomed to a wordly life but still always accepted strangers and similar to the Old Testamental father of nations st. Abraham he's been very hospitable to poor people.
By Gods grace he become convinced Muslim faith does not teach a true faith to the one God,  being pointed by God himself towards the right salvation way, he accepted Jesus Christ as a Lord and Saviour being baptized and hence converting to the truthful Christian faith.

His Christian baptizmal was accepted from Russian traders, who lived nearby the place of Great Bulgar.
Being baptized in the Christian faith Saint Abraham of Bulgaria not only confessed Christian faith across his fellow people, but he also led very harsh (ascetic like) life, wearing secretly below his clothes a heavy chains during his worldly travels. The profit he made from trade often he shared with the poor.Once he went for a trade to the city of Great (Bulgar) Bulgar. There he was arrested because there was a rumor, he cursed (islamic faith believed prophect) Mohammed and the muslim faith.


Saint Abraham Avramii Bylgarski Bulgarian Martyr saint old drawing

Muslims catched him and started convincing him to reject Christ, accusing him at a blasphemy. Abraham was not scared of muslim threats of expel and even putting to death. As Muslims failed to force him "by words" to convert back to Islam, they took him and put him in jail because of his denial of (their) Islamic faith.

In jail he was tortured but, they failed to convince him to deny Christ, seeing they have no way to convince him to accept Muslim faith once again, saint tormentors first cut his hands, then the legs and finally disgraced by his boldness and continues confession of Christ they beheaded him.

Soon afterwards the city of Bulgar was captured and burned down by the Mongols, many people in that time saw this is Gods punishment for the innocent shed blood of Abraham the Bulgar.
The local Christians took his body and buried him in the Christian cemetery of the ancient city of (Bolgar) / Bulgar.
On the place, where the saint was buried, a healing water spring emerged. The first man who received healing from this spring by Christ's grace was a muslim.

Miracle Making Spring Well Saint Abraham the Bulgarian

Great healing miracles happened on the saint grave. Local Christians took their relatives and bring them to the saints grave for a miracle healing and a prayer intercession of the saint. A rumour about the saints great graceous grave quickly spread and some people told about the miracle healing grave f st. Abraham to prince Georgi / (George) Vsevolodich.One year later again on 6th March 1230, the body of the saint was carried in the city of Vladimir, where the prince and his family, the Vladimirsk Bishop, the clergy and the local people received the holy relics of st. Abraham (of Bulgaria). The holy relics was kept in the local church "Dormition of Mother Mary" on 6th of March in the year of 1230.

The co-memoration of st. Abraham the Bulgarian is being observed in the Bulgarian Orthodox Church, since very ancient times.
Nowdays both Christians and Muslim celebrate the saints feast.

Icon of Orthodox Christian Saint Abraham of Bulgaria and his Holy Relics

Interesgingly, nowdays St. Abraham the Bulgarian is venerated as a saint by both Orthodox Christians and by Muslims. Many Muslims from Turkey and other muslim countries come each year for the saints feast day to pray and ask for healing or prayer intercession to God.

Even to this very day people receive by Jesus's grace through saint Abraham the Bulgarian's prayers – a various incurable disease healings. The healings occur on the same holy spring where the saint was buried. Many people are also healed from incurrable diseases through the veneration of the incorruptable saint holy relics kept in the Church Dormition of Mother Mary.

Feast of Saint Stephen’s martyrdom in Bulgarian Orthodox Church / Saint Stephen the first Christian Saint

Tuesday, December 27th, 2011

Saint Stephen Martyrdom Orthodox Christian Icon

It is 27th of December, the 3rd day of Christmas and in those day in the Bulgarian Orthodox Church we co-memorate saint Stephen's Martyrdom.

Its a well known fact that by his martyrdom Saint Stephen become the first Christian martyr
Stephen's name etymology comes from Greek (Stephanos) and translated means "Crown".

What we know from Orthodox Church's tradition is that Stephen was a very young in his age of Martyrdom probably in his 20s.

Stephen's glorious martyrdom has inspired and strengthened significantly the early seveerly hunted Church and has give a lot of courage and faith to many of our early Saint Martyrs. These early Church saints now incesently pray to God to have mercy on our earthly Church.
Its not much known fact St. Stephen held a rank in the early Church clergy, he was a HieroDeacon.
Hierodeaconism in our church is considered the maximum rank of deaconship one can have just before he is ordained for a Priest.

St. Stephen Orthodox Christian icon

St. Stephen was burning for love in Christ and had a strong faith in God, turning many Jewish to our Lord and Saviour Jesus Christ. He has shown the truth way to many by teaching them, how to properly interpret the Old Testament (Ancient Jewish) writtings.
He explained to many jewish, how all the old scriptures testify about the coming of the Messiah (Christ), which will save all who believe in his name from sins hell damnation.
As Jewish looked for ways to shutter any kind of preaching of the Gospel and kill Christianity, they saw Stephen as a big enemy just like all Christians in those early days. Therefore they looked for ways to accuse him and execute them and end up the large numbers of jewish people converting from Jewism to Christianity
The whole story of stoning (execution) of st. Stephen is described in the Holy Scriptures in the book called Acts of the Apostles

As he was about to die, Stephen looked up to heaven and said;

"Behold, I see the heavens opened, and the Son of man standing at the right hand of God."
Then, as he was being stoned, he cried out, "Lord Jesus, receive my spirit.".Our Beloved saints last words were, "Lord, do not hold this sin against them." manifesting his saintship and deep Christ love even during his last moments of earthly living.
St. Stephen is celebrated in almost all West Roman Catholic Church and in Anglicans.
Churches who co-mmemorate the great saint are located in all around the world.
St. Stephen is also considered a patron saint of Republika Sprska (Bosnia and Herzegovina)
Stephen's name later probably become the origin name for western's so popular Steven name).
Saint Stephen Orthodox Christian Icon 11th century byzantine icon
 

Saint Stephen's Byzantine Icon from the 11th Century

Let by the Holy Prayers of St. Stephen God have mercy on the Church and increase our faith and mercies to us sinners.

How to change MySQL server root password

Friday, July 29th, 2011

MySQL pass dialog Debian

I had to change my mysql root password for one of the servers since during the install I mispasted the password in the MySQL password prompt I needed the pwd to be changed.

Here is how I changed it to my desired one:

linux:~# /usr/bin/mysqladmin -u root -p'OLD_PASSWORD_STRING' password NEW_PASSWORD_STRING
linux:~#

The password gets changed immediately 😉

If a new password has to be set to a passwordless mysql server, the command to be issued is:

linux:~# /usr/bin/mysqladmin -u root password PASSWORD_STRING

Changing the MySQL password is also possible with mysql cli, after connecting to the sql server, though this method is a bit more time consuming. Here is how to do it from mysql console:

linux:~# mysql -u root -p
Server version: 5.1.49-3 (Debian)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.
mysql> use mysql;
mysql> update user set password=PASSWORD(“NEW_PASSWORD”) where User=’root’;mysql> flush privileges;

Of course it’s possible to do change the root pass via phpmyadmin
Cheers 😉

20th of July St. Elijah (Elias) feast in Bulgarian Orthodox Church / st. prophet Elias short Living

Thursday, July 21st, 2011

Saint Prophet Elijah Bulgarian Orthodox Christian icon

It’s again 20th of July and we in the Bulgarian Orthodox Church, celebrate the Holy memory of st. Prophet Elijah (Elias

St. Elijah is among the greatest Old Testamental prophets. He lived before the birth of our saviour Jesus Christ in a time when apostacy from true faith was severe.

In Elias’s time (few centuries B.C.), there used to be also a severe hunger on the land.
Elias was among the little number of Jews who did continued to honour the True God creator of Heaven and of Earth instead of turning to false religious teachings inspired by demons, like it’s the Baal’s cult which was widely spread among Jews back in the time.

Because of his faith in the true God, st. Prophet Elijah was hunted by the king’s wife Jezabel and he was forced to escape from Bersheeba and went alone in the wilderness and sat down in despondency under a juniper tree.

As he slept, an angel touched him, and said unto him, “Arise and eat; because the journey is too great for thee.” He arose and found a cake and a cruse of water. Having partaken of the provision, he went forward on his way for forty days to Horeb, where he took residence in a cave. Here God appeared to him and said, “What dost thou here, Elijah?” In answer to Elijah’s despondent words God manifests to him his glory, and then directs him to return to Damascus and anoint Hazael king over the Arameans (Syria), Jehu king over Israel, and Elisha to be prophet in his room (1 Kings 19:13-21; compare 2 Kings 8:7-15; 9:1-10).

Some six years after this he prophecised and warned by God’s commandment Ahab and Jezebel of the violent deaths they would die (1 Kings 21:19-24; 22:38)

The reason for the great hunger at this times was the fact that no rain has fallen down to the land for two years, as Elias prayed to God that no rain will be given to the people of Israel until they turn back to their true God.

One of the most notable moments of st. Elias’s earhtly living was the great miracle he performed by God’s providence which proofed that only the God of Israel is the true God of heaven and earth.

This happened while he was still in desolation on mount Carmel, it came to pass that Elijah met Obadiah, one of king Ahab’s officers (the king at that time of Israel).
Obadiah was he sent out at this time to seek for pasturage for the cattle (as the hunger on the land was so severe that even pastures for animals was obscure).
Elias’s by God’s word bade him go and tell his master that Elijah was there. King Ahab came forth and met Elias and accused him to be the “Trouble of Israel” as, he thought that his lands troubles are because Elias did not turns to Baal as the the king himself and most of the Jews at that time.
It was then proposed by Elias, that sacrifices should be publicly offered (to determine whose God is in control of taking out the hunger – e.g. Elias’s God of Israel or Baal to whom has many falsely turned.
, for the purpose of determining whether Baal or the Israelite’s God is the one’s master of the Universe.
The competition was accepted by Ahab and many of the prophets of Baal gathered together to “beg” his God for a miracle.

Baal’s false manu prophets gathered around the sacrifice place and started Begging Baal to send fire and burn the sacrificial altar.
Nomatter how hard they screamed, nothing happened so eventually they started cutting their bodies pouring blood in a hope to catch baal’s attention and make him have mercy on them.

As long time passed on and no miracle happened Elias told baal’s worshippers to step back from the sacrificial calf on the built altar and ordered some of the king’s servants to spill water over the calf (three times).
The water brought was so much that the whole altar trench was over-filled with water.

Then saint Elias begged to God: “Oh Lord, God of Abraham, Isaac and Jacob, please hear me! Let oh God this people recognize that You Lord is God and please oh Lord turn the people’s hearts towards you.”, he was still praying when fire came down from heaven and burnt the stones, the water in and the trench itself.

When all the gathered people around saw this great miracle of God, they bowed down and confessed the One and only God.
By Elias’s order the Baal’s false priests has been killed.
After this great miracle, Elias said to Ahab to came back home, before the rain has followed him.
The saint prophet climbed to the mountain top and prayed for a very long time.

After the holy man of God completed his prayers a powerful wind started blowing and the sky has filled with big clouds and a pouring rain come down to the overdried earth.
The king’s wife Jezabel, still kept her stubborness and continued severely hunting for st. Elias and even gave a vow to kill him because all her prophets were killed.

But God again was with st. Elias and saved him by warning him to run away in the wilderness.

Elias was in a big sorrow, here because many of the people still continued to honour the false god baal even though all the great heavenly signs.

God however by a great miracles, has once again shown the prophet he should be of a good spirit always and always to trust in God as he even send his Angel to give Elijah food in the desert.

Elias was among the only 7000 of Israelish man who does rejected to venerate the false god Baal.

By God’s providence st. Elias had a pupil prophet called Elijah.
The time now drew near when he was to be taken up into heaven (2 Kings 2:1-12). He went down to Gilgal, where there was a school of prophets, and where his successor Elisha, whom he had anointed some years before, resided.
Elisha was distraught by the thought of his master’s leaving him, and refused to be parted from him. The two went on and came to Bethel and Jericho, and crossed the Jordan, the waters of which were “divided hither and thither” when smitten with Elijah’s mantle.
Upon arriving at the borders of Gilead, which Elijah had left many years before, it “came to pass as they still went on and talked” they were suddenly separated by a chariot and horses of fire; and “Elijah went up by a whirlwind into heaven,” Elisha receiving his mantle, which fell from Elijah as he ascended.
Elijah’s chosen successor was the prophet Elisha; Elijah designated Elisha as such by leaving his mantle with him (2 Kings 2:13-15), so that his wish for “a double portion” of the older prophet’s spirit (2:9)

Later on in New Testamential time it was again st. prophet Elias, who appearance in glory on Mount Tabor and talked with our Saviour Christ at the Son of God’s Glorious Transfiguration.
An interesting fact is that Elias and Enoch are the only two people who according to the Holy writtings were taken by God straight to heaven. No other mortal man has been taken that way in flesh.

According to Orthodox Church’s tradition, Elias and Enoch will be brought back to earth again by God in the last days of the anti-christ, when they will again testify about our Lord Jesus Christ’s being the truth God and will also expose the anti-christ who will falsely pretend as being the true god of Israel and a true saviour of mankind.

Again according to this church history this two prophets at this last days, will be given an enormous power from God, even a power to stop the rain to come down to earth and the power to command the rivers to stop.

Oh Holy Prophet Elias, let God have mercy on us the sinners by your Holy prayers and save us, give us grace and always show us His great mercies.
Amen!

How to fix “Fatal error: Call to undefined function: curl_init()” on FreeBSD and Debian

Saturday, June 18th, 2011

After installing the Tweet Old Post wordpress plugin and giving it, I’ve been returned an error of my PHP code interpreter:

Call to undefined function: curl_init()

As I’ve consulted with uncle Google’s indexed forums 😉 discussing the issues, I’ve found out the whole issues are caused by a missing php curl module

My current PHP installation is installed from the port tree on FreeBSD 7.2. Thus in order to include support for php curl it was necessery to install the port /usr/ports/ftp/php5-curl :

freebsd# cd /usr/ports/ftp/php5-curl
freebsd# make install clean

(note that I’m using the php5 port and it’s surrounding modules).

Fixing the Call to undefined function: curl_init() on Linux hosts I suppose should follow the same logic, e.g. one will have to install php5-curl to resolve the issue.
Fixing the missing curl_init() function support on Debian for example will be as easy as using apt to install the php5-curl package, like so:

debian:~# apt-get install php5-curl
...

Now my tweet-old-post curl requirement is matched and the error is gone, hooray 😉

Why does Orthodox Christian priests and monks wears long beards and why Roman Catholics does not

Thursday, May 19th, 2011

A really Long bearded Orthodox Christian Priest

One might question why does Orthodox Christian priests wear beards? and why does the long beards of our Orthodox priests makes differences with the Roman Catholics?

Here are the few reasons:

1. Long beards wearing's tradition among Orthodox Christian priests and monks comes after Christ

Christ himself had a beard as it was normal and considered proper for a man to wear long beard.

The fact that our Lord Jesus Christ had a long beard himself can clearly be observed on all our Orthodox Christian icons:
The Lord Jesus Christ Sinai monastery ancient icon Pantocrator from the 6th century

The Lord's Pantecrator Icon (Pantocrator / Pantecrator ) from the 6th century

2. Long beards priest wearing comes as a natural tradition from the Old Testament's times and the tradition of early Church

If one reads thoroughfully the old testament, he will find out that even from Moses and Aaron and onwards the tradition is the same.
All the Godly man and the priests had their long beards unshaved as a mark for their belongship and dedication to God.
To generalize the long beards wearing is according to ancient old testamential ancient tradition.
The long beards tradition as an ancient Jewish religion (Old testamental) tradition can still be clearly observed in Jewish rabbis (nowdays the jewish priests), who still wears their beards long, like for example you can see in the picture below:

Jewish Rabbi weiss picture
A modern day Jewish Rabbi notice the beard 🙂

The long beards tradition later was adopted by Muslims when Islam emerged as a religion and more specificly by the muslim priests the Hodjas:

Sait Muslim Hodja Picture

One very interesting historical source of information which proofs that the ancient Church's priests had the tradition not to cut their beards is given by the historian Egezit who writes in his Chronicles that st. Apostle James, the head of the Church in Jerusalem, never cuts his hair.

A source of confirmation that the long hear and beards wearing was an established tradition that dates back to the old testament is found in the old testament in (Ezekiel 8:3)

Here is what exactly we read there:

He stretched out what looked like a hand and took me by the hair of my head.
The Spirit lifted me up between earth and heaven and in visions of God he took me to Jerusalem,
to the entrance to the north gate of the inner court, where the idol that provokes to jealousy stood.

3. Long hair and beards wearing by the Monks


Hieromonk_Sergij_Monk_Pomorie
An interesting fact is why does the Monks and novice neophyte lay brothers also stick to the ancient tradition.
It appears long hair and beards wearing traces back to the holy life of the ascetics of the deserts (e.g. the hermits).

The reason why ascetics did not shaved their hairs or bears as a way to avoid vanity and therefore this old hermitage practice has also had a spiritual reason.

4. The Nazarite old testament tradition

In the old testament in Numbers 6:1-21, we read about the term nazarite which means consecrated / separated

Each boy or man who was to become a Nazarine has been devoted to God for a certain period of time or in some cases for his all life, one of the many conditions for one to be a nazarite is not to shave his beard or hair.
One can read about this in the old testament in Leviticus 21:5

Leviticus 21:5
"They shall not make baldness upon their head,
neither shall they shave off the corner of their beard nor make any cuttings in their flesh."

There are some other prohibitions relating to Nazarite's one of the most notable ones is found in Numbers 6:4:

All the days of his Naziriteship shall he eat nothing that is made of the grape-vine,
from the pressed grapes even to the grapestone.

One example for people who gaves vow to become temporary Nazarites is found in 1 Maccabees 3:49 (this book is only available in the Orthodox Holy Bible).
One of the most important figure in Christianity that used to be Nazarite is Samson, his life can be read in the old testament in Judges 13 – 16

As we read in Judges , Samson's great God given power consituted in a prohibition to shave his hair and not to drink wine.

5. Reason why Roman Catholic Priests and monks abandoned the ancient tradition of wearing long hairs and beards

In the early Roman Empire it was a customfor a men to shave. The "enlightened" Romans believed that only the barbarians did not shaved themselves, and as you can imagine Jewish people and early Christians were of course considered to be barbarians, e.g. being unshaved was a sign for a cultural inferiorness in according to Romans comprehension.

The long hairs and beards tradition in the Western Church has started disappearing and consequentially completely lost with the Tyranny of Charlemagne at the end of the eight century.
With his massive 'barbarian' inferiority complex, it was his desire in all things to imitate pagan classical Rome.
It was therefore under him that Western clergy were ordered to shave regularly.
For example at the Council of Aachen (816), it was stipulated that priests and monks were to shave every two weeks.

By the beginning of the 11th century the tradition of wearing long beards was already completely torned apart and almost all the Roman Catholic clergy was regularly shaving.

In the sixteenth century beardlessness for Roman Catholic clergy was enforced by further canons,
which appear to have been dropped since the Second Vatican Council.

6. Why does protestants does not wear beards

As we all know protestant Church denominations has emerged as schismatics from Roman Catholic church and therefore mostly the influence they had was from Roman Catholics which already had the tradition within their clergy to regularly shave, thus pastors shaving was completely out of question and never come to an established reality among the Protestant Church pastors.

7. Is the Orthodox Christian layman obliged to wear beards

Absolutely not! The layman within the Orthodox Church can choose for themselves, if they want to wear their hair and beard and through that possess an image physically similar to Christ.
In my view it's more righteous for us the layman to wear our hairs and beards as I personally believe long hair and beards demonstrates mans dignity and God's dedication, but this is my own private opinion.
At many cases wearing beards or long hairs is an obstacle for a good integration in nowdays society, so if wearing a beard or hair as laymans does become an obstacle for our normal daily lifes then I believe cutting a long beard or hair is perfectly acceptable.
Moreover even the Orthodox Christian priests are not enforced to wear beards and in some cases where the priest's wife is against the beardness the Orthodox priest is allowed to shave himself, though as a matter of fact having a completely shaved priests in our Orthodox Churches is rare and less common today.

In conclusion wearing of beard and long hair by Orthodox Christna clergy, has come from the desire to physically resemble Christ.
This physical resemblance is a symbol of the spiritual resemblance of Christ's humility, which is the ultimate aim of our life.

The Church feast of St. Tsar (King) Boris Mihail (Michael) I – Baptizer of Bulgaria – 2nd of May a Triumph for Bulgarian Autocephalous Church and Church Slavonic

Monday, May 2nd, 2011

saint Tsar Boris the baptizer of all Bulgaria

Today on Second of May every year in the Bulgarian Orthodox Church calendar we commemorate the memory of Saint King Boris (Michael) who is a baptizer of Bulgarian nation and among the greatest saint of Bulgaria, perhaps second in saintship after St. John of Rila.

St. King Boris was the ruler of the First bulgarian Empire (852-889) the actual title as we know it from the chronicles is not king but archont which literally means ruler, but as the main chronicles who came to us are Byzantine we have to take in consideration that Byzantine Chronicles aimed to discredit the Bulgarian rulers because of feeling inferior every non-Byzantines who in Byzantine terms were considered barbarians.

He had a notable correspondence with Pope Nicolas II head of the Western Church before the Great Schism.
Saint Boris I is famous with with 115 Questions (which are fully preserved). He  beseech the pope to sent an apostoles of faith who will teach the new nation to faith in the same time he lead a correspondence with the Byzantine emperor and the Eastern Church.

The pope sent 2 missionaries cardinal Formiosa of Portuens and Bishop Paul of Papulon. King Boris requested for Cardinal Formiosa to become a future archibishop of Bulgaria, but the pope Nicolas II being afraid of loosing ground of a choice of future Bulgarian archibishop rejected king Boris request it is interesting fact that the same cardinal Formiosa become the next Pope of the Roman Western Church in period (891 – 896).

Taking in consideration the papal's desire to dominate over him and the more freedoms given by the Byzantine Church along with the fact that Saint Cyril and Methodius's pupils came to him with a ready Church Slavonic Glagolic version of the Holy Bible and a new Church language (and considering the fact that the seven pupils of St. Cyril and Methodius were being chased away from Great Moravia (Saint Clement of Ohrid (Kliment Ohridski) and Naum Ohrdiski with Sava, Angelarius and Gorazd) and seeing the fallacy of the filioque addition to the Creed of Faith finally King Boris received baptism by the hands of Patriarch Photius.

He received holy baptismal in year 864, receiving the Christian name Michael (Mihail) receiving his Christian name from his godfather, Emperor Michael III.

According to Church tradition the reason to Baptize in Christian faith was his amazement of an icon of the Judgement Day he saw in one of his visits to Constantinople.

The Church tradition also says saint Boris I's sister have lived for a long time in Constantinople, where she received baptism and once returning to the Bulgaria she bring the light of faith here too.

Besides that some of his family has already earlier converted to Christianity and some earlier Bulgarian Khans such as Trivelius (Tervel) who is considered to saved Europe from Muslim Invasion earlier were already Christians.

King_Boris I bapttish of Byzantine Emperor Michael III

During his holy reign he has established mass Christianization of Bulgaria, where the traditional ancient pagan traditions and belief in fake gods like Tangra were abolished completely.

St. Tsar Boris has secured the Bulgarian Church an autocephalousy, he also received the saints Cyril and Methodius, when they were banished from Great Moravia.

Our saint king has secured a refuge for st. Cyril and Methodius and provided them with assistance to develop the Slavonic alphabet and literature.

After he abdicated in 889, his eldest son and successor tried to restore the old pagan religion but was deposed by Boris I. During the Council of Preslav which followed that event, the Byzantine clergy was replaced with Bulgarian and the Greek language was replaced with Old Bulgarian as an official language of the Church and the state.

Bulgaria_under_rule_of_Boris_I-st-the-baptizer-king-of-Bulgaria

In 889 Boris abdicated the throne and became a monk. His son and successor Vladimir attempted a pagan reaction (to return the Bulgarians to the old belief in Tanra), which brought Boris out of his monastic life in 893 out of zeal for Christ and a fatherhood for the future of Bulgarian nation.

Vladimir was defeated and blinded by a miracle of God as Boris had less soldiers than his pagan son but in the name of the Lord Jesus Christ he showed victorious.

Once defeating his unbelieving son, Boris gathered the Council of Preslav in which the Old Greek language in Church was replaced with Church Slavonic and most imporantly on the council King Boris on the Church assembly placed his third son, Simeon I of Bulgaria on the throne, threatening him with the same fate if he too apostatized.

Simeon I was reluctant to become a secular ruler as according to some of the written sources he was preparing to become a great spiritual leader a monk and perhaps a next archibishop or even patriarch in the newly established autocephalous Bulgarian Church but following the monk rule of humility he decided and accepted the throne but throughout his life he kept his great zeal for monasticism and enlightenment. His ruling become a golden age for the Church Slavonic he financed seriously and worked hardly to prepare educated monks and to translate a major works of the Holy Fathers such as Shestodnev (The Six Days of Creation), Simeonov Sbornik (Simeon's Collection) and many of the key works of saint Athanasius the Great, Saint Basyl the Great, Saint John of Damascus etc.

According to some historians it was King Simeon who later give birth to the second by size Monastic Community in Byzantine Emperire the Stone Monasteries of (Meteora).

Boris returned to his monastery, emerging once again in c. 895 to help Simeon fight the Magyars, who had invaded Bulgaria in alliance with the Byzantines. After the passing of this crisis, Boris resumed monastic life and led a holy life until he pass out in year 907.

Here is the daily troparion assigned by the Bulgarian Orthodox Church sang at the churches today (the text is translation from Bulgarian):

St. Boris-Michael, prince of Bulgaria, Troparion

Full of the fear of God, and enlightened by holy baptism, thou becamest a habitation of the Holy Spirit,
O right-believing King Boris; and having established the Orthodox Faith in the land of Bulgaria,
and set aside the scepter of kingship,
thou madest thine abode in the wil derness,
didst flourish in ascetic struggles, and found grace before the Lord.
And now, standing before the throne of the Most High, pray thou, that He grant unto us who entreat thee salva tion for our souls.