since mysqli is not included until php-5.0 you will need to use the --with-mysql=/path/to/mysql option while building PHP and you should use the --old-passwords command line option while starting the MySQL 4.1.x server. This will allow the use of older MySQL clients on the server.
Good luck.. grtz Jan