Language Codes

Found a List of Language Codes:

af Afrikaans sq Albanian
ar-sa Arabic (Saudi Arabia) ar-iq Arabic (Iraq)
ar-eg Arabic (Egypt) ar-ly Arabic (Libya)
ar-dz Arabic (Algeria) ar-ma Arabic (Morocco)
ar-tn Arabic (Tunisia) ar-om Arabic (Oman)
ar-ye Arabic (Yemen) ar-sy Arabic (Syria)
ar-jo Arabic (Jordan) ar-lb Arabic (Lebanon)
ar-kw Arabic (Kuwait) ar-ae Arabic (U.A.E.)
ar-bh Arabic (Bahrain) ar-qa Arabic (Qatar)
eu Basque (Basque) bg Bulgarian
be Belarusian ca Catalan
zh-tw Chinese (Taiwan) zh-cn Chinese (PRC)
zh-hk Chinese (Hong Kong SAR) zh-sg Chinese (Singapore)
hr Croatian cs Czech
da Danish nl Dutch (Standard)
nl-be Dutch (Belgium) en English
en-us English (United States) en-gb English (United Kingdom)
en-au English (Australia) en-ca English (Canada)
en-nz English (New Zealand) en-ie English (Ireland)
en-za English (South Africa) en-jm English (Jamaica)
en English (Caribbean) en-bz English (Belize)
en-tt English (Trinidad) et Estonian
fo Faeroese fa Farsi
fi Finnish fr French (Standard)
fr-be French (Belgium) fr-ca French (Canada)
fr-ch French (Switzerland) fr-lu French (Luxembourg)
gd Gaelic (Scotland) ga Irish
de German (Standard) de-ch German (Switzerland)
de-at German (Austria) de-lu German (Luxembourg)
de-li German (Liechtenstein) el Greek
he Hebrew hi Hindi
hu Hungarian is Icelandic
id Indonesian it Italian (Standard)
it-ch Italian (Switzerland) ja Japanese
ko Korean ko Korean (Johab)
lv Latvian lt Lithuanian
mk Macedonian (FYROM) ms Malaysian
mt Maltese no Norwegian (Bokmal)
no Norwegian (Nynorsk) pl Polish
pt-br Portuguese (Brazil) pt Portuguese (Portugal)
rm Rhaeto-Romanic ro Romanian
ro-mo Romanian (Republic of Moldova) ru Russian
ru-mo Russian (Republic of Moldova) sz Sami (Lappish)
sr Serbian (Cyrillic) sr Serbian (Latin)
sk Slovak sl Slovenian
sb Sorbian es Spanish (Spain)
es-mx Spanish (Mexico) es-gt Spanish (Guatemala)
es-cr Spanish (Costa Rica) es-pa Spanish (Panama)
es-do Spanish (Dominican Republic) es-ve Spanish (Venezuela)
es-co Spanish (Colombia) es-pe Spanish (Peru)
es-ar Spanish (Argentina) es-ec Spanish (Ecuador)
es-cl Spanish (Chile) es-uy Spanish (Uruguay)
es-py Spanish (Paraguay) es-bo Spanish (Bolivia)
es-sv Spanish (El Salvador) es-hn Spanish (Honduras)
es-ni Spanish (Nicaragua) es-pr Spanish (Puerto Rico)
sx Sutu sv Swedish
sv-fi Swedish (Finland) th Thai
ts Tsonga tn Tswana
tr Turkish uk Ukrainian
ur Urdu ve Venda
vi Vietnamese xh Xhosa
ji Yiddish zu Zulu

Failed to verify krb5 credentials: Server not found in Kerberos database

I was getting “Failed to verify krb5 credentials: Server not found in Kerberos database” errors when trying to use Kerberos authentication in Apache2. The problem was in my /etc/hosts file. I needed to change this:

10.183.97.44    charity.progclub.org charity
67.207.128.184  charity-public

To this:

10.183.97.44    charity.progclub.org charity
67.207.128.184  charity.progclub.org charity-public

Disabling sound in Debian KDE

I’m having a problem whereby my KDE session is “locking up” periodically for 5 or 10 minutes at a time. I checked /var/log/syslog and dmesg and it *seems* as though the high-priority audio threads are staving other threads, so I figure I’ll try to disable sound and see if my system continues to lock up. To disable sound I used:

root@mercy:/home/jj5# alsa force-unload
Unloading ALSA sound driver modules: snd-ens1371 snd-ac97-codec snd-seq-midi snd-seq-midi-event snd-rawmidi snd-pcm snd-page-alloc snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-ens1371 snd-ac97-codec snd-rawmidi snd-pcm snd-page-alloc snd-seq-device snd-timer).

OWASP ESAPI PHP tests: Security configuration file does not exist

To get the source for OWASP ESAPI PHP:

 svn checkout http://owasp-esapi-php.googlecode.com/svn/trunk/ owasp-esapi-php-read-only

Make sure phpunit is installed with PEAR. To run the unit tests:

 root@mercy:/home/jj5/Desktop/owasp-esapi-php-read-only# phpunit test
 Security configuration file does not exist.PHP Fatal error:  Call to a member function xpath()
 on a non-object in /home/jj5/Desktop/owasp-esapi-php-read-only/src/reference/DefaultSecurityConfiguration.php on line 226

To get a better error message:

 root@mercy:/home/jj5/Desktop/owasp-esapi-php-read-only# grep -R 'Security conf' .
 ./src/reference/DefaultSecurityConfiguration.php:            throw new Exception("Security configuration file does not exist.");

Edit ‘src/refererence/DefaultSecurityConfiguration.php’ and replace “Security configuration file does not exist.” with “Security configuration file ‘$path’ does not exist.”

Try again:

 root@mercy:/home/jj5/Desktop/owasp-esapi-php-read-only# phpunit test
 Security configuration file '/home/jj5/Desktop/owasp-esapi-php-read-only/test/filters/../../testresources/ESAPI.xml' does not exist.PHP Fatal error:  Call to a member function xpath() on a non-object in /home/jj5/Desktop/owasp-esapi-php-read-only/src/reference/DefaultSecurityConfiguration.php on line 226

So the problem is a misconfigured path to the ESAPI.xml file,

 root@mercy:/home/jj5/Desktop/owasp-esapi-php-read-only# grep -R \\.\\.\\/testres .
 ./test/filters/SafeRequestTest.php:            $ESAPI = new ESAPI(dirname(__FILE__) . '/../../testresources/ESAPI.xml');
 ...

Edit the SafeRequestTest.php file:

 root@mercy:/home/jj5/Desktop/owasp-esapi-php-read-only# vim test/filters/SafeRequestTest.php 

On line 58 change “/../../testresources” to “/../testresources”.

Now our tests will run:

 root@mercy:/home/jj5/Desktop/owasp-esapi-php-read-only# phpunit test