Bug #16850
closedTypo3 (PHP) cannot connect to mysql on Windows
0%
Description
If you are using Apache 2.x.x and PHP on MS Windows (c) with mod_fcgid (PHP is running in CGI mode) PHP cannot connect to the database because the socket to mysql cannot be created (error #19799).
The problem is caused by the lack of the environent variable SYSTEMROOT.
Setting this variable with
putenv("SYSTEMROOT=c:/Windows");
solves this problem and Typo3 (PHP) works as expected.
Would be nice, if there could be an check in init.php like
if(TYPO3_OS=="WIN" && php_sapi_name()=="cgi-fcgi" && empty(getenv("SYSTEMROOT")) ...
and a print out of a warning.
Better would be a new config field like
$TYPO3_CONF_VARS['SYS']['WIN_SYSTEMROOT']
which is set in this case.
(issue imported from #M4767)
Updated by Christian Welzel almost 17 years ago
This problem has been fixed in version 2.0 of mod_fcgid.
This bugreport can be closed.
Updated by Oliver Hader almost 17 years ago
Closing bug as requested by initial bug reporter.