Cant connect to database, verify credentials, password:NO

Just installed it on a MediaTemple shared server with verified mod_rewrite and LAMP server. Ive created the database with user and psasword, configured the settings.php to the best of my ability.

/ - this is root
/emoncmsdata - this is where i put the folders /phpfina & /phpfiwa & /phptimeseries
/httpdocs - this is my public folder
/httpdocs/emoncms - this is where the settings.php is and where modules are

But when I access santiapps.com/emoncms/ I get:

Can’t connect to database, please verify credentials/configuration in settings.php
Error message: Access denied for user ‘marskoko’@‘localhost’ (using password: NO)

Why does it say password:NO

I can log in with the password just fine via terminal.

Found a bunch of these in the server error.log:
[Fri Sep 28 20:53:23.620729 2018] [proxy_fcgi:error] [pid 8219:tid 140039956670208] [client 83.139.179.122:35214] AH01071: Got error ‘Primary script unknown\n’

This seems to be a phcfm thing. I did a fix on the .htaccess and it seems to have goten rid of it. So Im looking at the logs again after trying to reload emoncms/ and got this:

186.32.128.25 - - [28/Sep/2018:23:53:47 -0400] "GET /emoncms/admin/ HTTP/1.0" 200 383 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15"
186.32.128.25 - - [28/Sep/2018:23:53:50 -0400] "GET /emoncms/graph/readme.md HTTP/1.0" 200 383 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15"
186.32.128.25 - - [28/Sep/2018:23:53:54 -0400] "GET /emoncms/dashboard/ HTTP/1.0" 200 383 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15"
186.32.128.25 - - [28/Sep/2018:23:53:57 -0400] "GET /emoncms/trydb.php HTTP/1.0" 200 284 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) 

and

Fri Sep 28 22:59:01.208156 2018] [proxy_fcgi:error] [pid 27683:tid 140039956670208] [client 186.32.128.25:48126] AH01071: Got error 'PHP message: PHP Warning:  file_get_contents(http://api.openweathermap.org/data/2.5/forecast?q=SanPedroSula,HN&units=metric&appid=709ad769a8432a1a909fa58a22d86b91): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in /var/www/vhosts/santiapps.com/httpdocs/arduinoxmlOpenWeather/owvlas99.php on line 3\n'
[Fri Sep 28 22:59:38.144856 2018] [proxy_fcgi:error] [pid 8219:tid 140040197232384] [client 186.32.128.25:48584] AH01071: Got error 'PHP message: PHP Warning:  file_get_contents(http://api.openweathermap.org/data/2.5/forecast?q=SanPedroSula,HN&appid=709ad769a8432a1a909fa58a22d86b91): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in /var/www/vhosts/santiapps.com/httpdocs/arduinoxmlOpenWeather/owvlas99.php on line 3\n'
[Fri Sep 28 23:00:08.840830 2018] [proxy_fcgi:error] [pid 27646:tid 140039967160064] [client 186.32.128.25:49502] AH01071: Got error 'PHP message: PHP Warning:  file_get_contents(http://api.openweathermap.org/data/2.5/forecast?q=SanPedroSula,HN&appid=b6907d289e10d714a6e88b30761fae22): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized\r\n in /var/www/vhosts/santiapps.com/httpdocs/arduinoxmlOpenWeather/owvlas99.php on line 3\n'
[Fri Sep 28 23:20:08.271011 2018] [proxy_fcgi:error] [pid 27683:tid 140040082548480] [client 186.32.128.25:49528] AH01071: Got error 'PHP message: PHP Warning:  mysqli_connect(): (28000/1045): Access denied for user 'marskoko'@'localhost' (using password: NO) in /var/www/vhosts/santiapps.com/httpdocs/emoncms/trydb.php on line 3\n'
[Fri Sep 28 23:23:07.235534 2018] [proxy_fcgi:error] [pid 8219:tid 140039977649920] [client 186.32.128.25:54058] AH01071: Got error 'PHP message: PHP Warning:  mysqli_connect(): (28000/1045): Access denied for user 'marskoko'@'localhost' (using password: NO) in /var/www/vhosts/santiapps.com/httpdocs/emoncms/trydb.php on line 3\n'
[Fri Sep 28 23:23:10.987687 2018] [proxy_fcgi:error] [pid 27683:tid 140039925200640] [client 186.32.128.25:54136] AH01071: Got error 'PHP message: PHP Warning:  mysqli_connect(): (28000/1045): Access denied for user 'marskoko'@'localhost' (using password: NO) in /var/www/vhosts/santiapps.com/httpdocs/emoncms/trydb.php on line 3\n'
[Fri Sep 28 23:28:30.543078 2018] [proxy_fcgi:error] [pid 8219:tid 140039925200640] [client 186.32.128.25:35204] AH01071: Got error 'PHP message: PHP Warning:  mysqli_connect(): (28000/1045): Access denied for user 'emonuser'@'localhost' (using password: NO) in /var/www/vhosts/santiapps.com/httpdocs/emoncms/trydb.php on line 3\n'
[Fri Sep 28 23:53:57.950086 2018] [proxy_fcgi:error] [pid 8219:tid 140039967160064] [client 186.32.128.25:45438] AH01071: Got error 'PHP message: PHP Warning:  mysqli_connect(): (28000/1045): Access denied for user 'emonuser'@'localhost' (using password: NO) in /var/www/vhosts/santiapps.com/httpdocs/emoncms/trydb.php on line 3\n'

where the openweather thing is something else i was fixing, but the trydb.php is a file that tries to simply connect to the mysql database. Its just confirming that access is denied to that user evern though mysql lets the user in.

Oh and the user changed from marskoko to emonuser because I wanted to make sure it wasnt the user, so I deleted it and created a new user. Actually I removed the entire database and created it again and then created the new user. Still logs in perfectly via mysql but fails via php.

I think I found the problem, but not sure I can fix it. The variables $password is blank in the index.php file for some reason even though I’ve set it in the settings.php. So I was thinking of adding the settings.php since I see its not a required file atop index.php, but its somehow getting the other values for user and database and port. So I need to find out where those values get passed to…found them getting set in process_settings.php but $password is already empty there. Got IT!

[Edit - Moderator (RW)]
This problem continues here: Primary script unknown issue - #2 by Robert.Wall

[EDIT2] Apparently caused/fixed by a .htaccess mod (see Timezone error - #9 by marciokoko))