Project

General

Profile

Actions

Bug #16850

closed

Typo3 (PHP) cannot connect to mysql on Windows

Added by Christian Welzel almost 18 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2007-01-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

Actions #1

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.

Actions #2

Updated by Oliver Hader almost 17 years ago

Closing bug as requested by initial bug reporter.

Actions

Also available in: Atom PDF