I set up PHP to make use of Apache mod_fcgid. PHP is working, but after alterations in configuration I'm not in a position to connect with mysql via php. How you can fix this? Any ideas, which could hint me, are extremely preferred!

To check on mysql connection I personally use the next php code:

error_reporting(E_ALL);

$link = mysql_connect('127.0.0.1', 'root', 'password_here');
if (!$link) {
    die('Could not connect. Error message: <' . mysql_error() . '>');
}
echo 'Connected successfully';

Error message came back by mysql_error() is empty.

I personally use the next configuration in Apache:

LoadModule fcgid_module modules/mod_fcgid.so
<IfModule fcgid_module>  
AddHandler fcgid-script .fcgi .php  
DefaultInitEnv PHPRC "C:/Program Files/php5"
DefaultInitEnv PHP_FCGI_MAX_REQUESTS      1000  
MaxRequestsPerProcess       1000  
MaxProcessCount 15
IPCCommTimeout 120
IdleTimeout 120
FCGIWrapper "C:/PROGRA~1/php5/php-cgi.exe" .php  
AddType application/x-httpd-php .php  

DefaultInitEnv PATH "C:/PROGRA~1/MYSQL/MYSQLS~1.0/LIB/OPT;C:/PROGRA~1/APACHE~1/APACHE2.2/BIN;C:/WINDOWS/system32;C:/WINDOWS"
</IfModule>  

PHP 5.3.1, Apache/2.2.14 (Win32), MySQL 5..67-community-nt, Home windows Vista Home Premium Service Pack 1. I downloaded binaries of mod_fcgid from http://www.apachelounge.com/download/mods/mod_fcgid-2.2b-w32.zip

EDIT:

I made use of phpinfo() to check configuration. "Loaded Configuration File" is identical for with and without mod_fcgid. mysql section is identical for configs. Things I discovered that Atmosphere section when mod_fcgid is switched on consists of only FastCGI related variable (4 products only), while without mod_fcgid - a lot more...

If you want more information please tell me.

If somebody has effective installing of FastCGI for php, with Apache and mysql on Home windows it may be excellent to understand about your experience.

EDIT:

I have the following warning:

Warning: mysql_connect() [function.mysql-connect]: in E: ... testphpmysql.php online 7

EDIT

Error log of mysql contain no any errors on mysql_connect().

Are you certain that Warning: mysql_connect() [function.mysql-connect]: in E:\ ... \testphp\mysql.php on line 7
may be the full error ? Because that's unusual it will say wrong there.
Also book your mysql server's log apply for any anomalies and publish them here. mysql error log documentation.

Perhaps you have attempted running php_info() to ascertain if the mysql module exists and set up for the CGI? The ini configuration could be different between CGI along with other approach to starting.

Jacob