воскресенье, 15 января 2012 г.

UT2004 game no sound

Params:
Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

Problem:
No sound in game Unreal Tournament 2004.

Solution:
UT2004 uses openal lib. So you must have this lib in system.
If you run the game by this binary "Games/ut2004/System/ut2004-bin" (32bit system), 
you must have /usr/lib32/openal.so.
Or if you use binary"Games/ut2004/System/ut2004-bin-linux-amd64" (64bit system),
you must have /usr/lib64/openal.so.
On my Gentoo amd64 it wasn't installed (case second). So just type in console:
> emerge media-libs/openal -av

Gentoo error: not found libstdc++.so.5

Params:
- Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux
- gcc (Gentoo 4.5.3-r1 p1.0, pie-0.4.5) 4.5.3

Problem:
When I run applicaton it give me this error:
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory


Solution:
> emerge app-emulation/emul-linux-x86-compat -av
It will install also sys-libs/libstdc++-v3
Also, may be you need to create a symbolic link in your application to this shared library.

понедельник, 9 января 2012 г.

Configure Zend Debugger

Params:
Linux Gentoo 3.1.6
PHP 5.3.8-pl0-gentoo
Apache 2.2.21-r1

Problem:
Need to configure Zend Debugger.

Solution:
1) Download Zend Debugger from site zend.com
2) Unpack archive to the temporary folder.
3) Find ZendDebugger.so file with version compatibale to your PHP version
For example, I have PHP version 5.3.8 so my ZendDebugger.so file located in 5.3.x folder.
4) Copy ZendDebugger.so to the folder accesibale by apache.
For example: /home/<user_name>/Applications/ZendDebugger/ZendDebugger.so
5) Edit php.ini. Location of php.ini depends by system. For Gentoo is here: /etc/php/apache2-php5.3/php.ini
6) Add following lines to the end of php.ini:

[Zend]
zend_extension=/home/<user_name>/Applications/ZendDebugger/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
About this and additional options you can read in internet.
7) Restart the apache. In gentoo just execute /etc/init.d/apache2 restart
8) Check debugger. Look to the phpinfo() if all "ok!" you will see section "Zend Debugger" with config options.
9) Fix errors. If you can't see "Zend Debugger" section look to the apache error log file and fix the errors.
Log file in Gentoo: /var/log/apache2/error_log
In my case I have this errors:
* Failed loading /home/<user_name>/Applications/ZendDebugger/ZendDebugger.so:  libssl.so.0.9.8: cannot open shared object file: No such file or directory
* Failed loading /home/<user_name>/Applications/ZendDebugger/ZendDebugger.so:  libcrypto.so.0.9.8: cannot open shared object file: No such file or directory
So I create soft links to the existing libs "libssl.so.1.0.0" and "libcrypto.so.1.0.0"
> ln -s /usr/lib/libssl.so.1.0.0 /home/<user_name>/Applications/ZendDebugger/
> ln -s /usr/lib/libcrypto.so.1.0.0 /home/<user_name>/Applications/ZendDebugger/
links must be in the same folder with ZendDebugger.so

That's all.

суббота, 7 января 2012 г.

Configure Apache to interpret PHP scripts

Params:
- Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux,
- PHP 5.3.8-pl0-gentoo,
- Apache/2.2.21 (Unix)

Problem:
Apache not interpret php scripts, theirs content printed in browser.

Solution:
Edit apache config file /etc/conf.d/apache2 (don't forget this is gentoo!)
Find string where defined parameter APACHE2_OPTS and add "-D PHP5" to his value.

Kjots data migrate to new version (Kjots 4.6 -> Kjots 4.7.3)

Params:
Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux
KDE 4.7.3

Problem:
Upgrade kde from 4.6 to 4.7.4 and need to migrate my Kjots data to new application version.

Solution:
Open console, and input commands (current user account, not root):
> cd ~/.kde4/share/apps/kjots
> kjotsmigrator --interactive