Version 1.2 ()
------------------------------------------------------------------------
+ * Improve installation on hosts where fsockopen() is disabled
+ (garvinhicking)
+
* Improve memory usage of WordPress importer, add debug output
(garvinhicking)
$htaccess_cgi = '';
}
+ /* If this file exists, a previous install failed painfully. We must consider the safer alternative now */
+ if (file_exists($serendipity_core . '.installer_detection_failsafe')) {
+ $htaccess_cgi = '_cgi';
+ @unlink($serendipity_core . '.htaccess');
+ }
/* Detect comptability with php_value directives */
if ($htaccess_cgi == '') {
if ($fp) {
fwrite($fp, 'php_value register_globals off'. "\n" .'php_value session.use_trans_sid 0');
fclose($fp);
-
- $sock = @fsockopen($serendipity_host, $_SERVER['SERVER_PORT'], $errorno, $errorstring, 10);
+
+ $safeFP = @fopen($serendipity_core . '.installer_detection_failsafe', 'w');
+ fclose($safeFP);
+ $sock = fsockopen($serendipity_host, $_SERVER['SERVER_PORT'], $errorno, $errorstring, 10);
if ($sock) {
fputs($sock, "GET {$serendipityHTTPPath} HTTP/1.0\r\n");
fputs($sock, "Host: $serendipity_host\r\n");
fclose($sock);
}
- /* If we get HTTP 500 Internal Server Error, we have to use the .cgi template */
+ # If we get HTTP 500 Internal Server Error, we have to use the .cgi template
if (preg_match('@^HTTP/\d\.\d 500@', $response)) {
$htaccess_cgi = '_cgi';
}
} else {
@unlink($serendipity_core . '.htaccess');
}
+
+ @unlink($serendipity_core . '.installer_detection_failsafe');
}
}