diff -uNdr drupal-5.7.old/cron.php drupal-5.7/cron.php --- drupal-5.7.old/cron.php 2006-08-09 09:42:55.000000000 +0200 +++ drupal-5.7/cron.php 2008-02-16 15:50:48.000000000 +0100 @@ -1,3 +1,4 @@ +#!/usr/bin/php 0; $i--) { for ($j = count($server); $j > 0; $j--) { $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i)); @@ -240,7 +240,7 @@ global $db_url, $db_prefix, $cookie_domain, $conf, $installed_profile; $conf = array(); - include_once './'. conf_path() .'/settings.php'; + include_once conf_path() .'/settings.php'; if (isset($base_url)) { // Parse fixed base URL from settings.php. @@ -258,7 +258,7 @@ // As $_SERVER['HTTP_HOST'] is user input, ensure it only contains // characters allowed in hostnames. - $base_url = $base_root .= '://'. preg_replace('/[^a-z0-9-:._]/i', '', $_SERVER['HTTP_HOST']); + $base_url = $base_root .= '://'. preg_replace('/[^a-z0-9-:._]/i', '', @$_SERVER['HTTP_HOST']); // $_SERVER['SCRIPT_NAME'] can, in contrast to $_SERVER['PHP_SELF'], not // be modified by a visitor. @@ -886,7 +886,7 @@ case DRUPAL_BOOTSTRAP_ACCESS: // Deny access to hosts which were banned - t() is not yet available. - if (drupal_is_denied('host', $_SERVER['REMOTE_ADDR'])) { + if (drupal_is_denied('host', @$_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 403 Forbidden'); print 'Sorry, '. $_SERVER['REMOTE_ADDR']. ' has been banned.'; exit();