SimpleTest [Browser] on Vista
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
The Symptom
[Browser] based SimpleTests are failing when run on your localhost (or any system) running Windows Vista.
The Problem
Windows Vista has added a line to its hosts file that blocks SimpleTest's Browser from fetching pages via the following code in SimpleTest's socket.php file
function _openSocket($host, $port, &$error_number, &$error, $timeout) {
return @fsockopen($host, $port, $error_number, $error, $timeout);
}
The Solution
1. Run notepad as Administrator (find the icon for notepad, right-click->run as Administrator)
2. Navigate to your hosts file (c:\windows\system32\drivers\etc\hosts)
3. Find the line that looks like:
::1 localhost
and remove it, or comment it out with a #
4. Restart apache
5. Enjoy working SimpleTest [browser] tests
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion