Issue Bug Closed

#16850Typo3 (PHP) cannot connect to mysql on Windows

Christian Welzel 01/10/07, 22:33 updated 06/27/08, 15:20

Description

If you are using Apache 2.x.x and PHP on MS Windows © 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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.