Hi!
You dont understand me (((
No apache. No mod_php. No php-fpm.
This is ultra developer mode on my Mac in travel.
Install php 5.4 (and higher), instal WP 4.0 to folder ‘wordpress’, install plugin sqlite-integration, and run in terminal:
$php -S 0.0.0.0:8000 -t wordpres
Open browser https://localhost:8000/ and try install WP
Function db_conect call many times (((( I log this calls.
After my patch – db_connect one call, and WP install successfull.