I must use php 5.0.2 while it's supporting multibyte regex options fully. So i have build php 5.0.2 from the instructions that dzenav submitted ( Thanks a lot ! )

But when i used --with-mysql option to compile php i have lived some difficulties. First default mysql files is not listed right for php compilation. But i'll not explain you how to fix that, because it's not necessary

I have fix that but i can't see mysql client api version in phpinfo(). I have compiled php multiple times, with multiple configurations but phptest() dont show client api version and normally php can't connect to mysql !

While i have tried any solve option related with php, i have decided to change the mysql version.

1. 4.1.7 source was my first try out. Compiling was succesfull and i have builded the right mysql client api's for php at last.( Not : You must compile PHP with --with-mysql=/usr/local2/mysql option. This directory can change to where you have installed your second mysql )But post-compile configuration was failed. Because you need root permissions for a problemless configuration.

2. While 4.1.7 failed i have tried the latest binary distrubution. That was 4.0.22 ( not 4.1 version because i hate it nothing personal...) After a flawless setup i have tried start 4.0.22 but he gave me a " port bussy " error. I have "ps -al" all the ports vicinity but i cant see anything like mysql. So i give up with this version.

3. At last i have tried 4.0.20_max_binary version that i use on the win machine in my home. It's installed and worked that nothing badly happened before!

Mysql & PHP works fine now. You can found mysql 4.0.20_max below :

I haven't any time for testing 4.1.7 binary's but you need compile php --with-mysqli option for support this version of mysql.

I hope this message helps the people who want to install a new php&mysql on their VPS and they will not live the feelings like hate&anger&fear? etc