Grüss euch
Bräuchte bitte Hilfe.
Wenn ich folgenden Code ausführe:
kommt es zu dieser Fehlermeldung:

Folgende Versionen habe ich installiert:
Xampp 1.7.0
Apache/2.2.11
PHP/5.2.8
Logfile von Apache:
Ausserdem würde ich gerne alle Dateien auf meinen Webspace schützen,also nicht aufrufbar machen und automatisch ohne Verzögerung auf die Index weiterleiten.
Hab mich aber noch nie mit htacces und mod_rewrite beschäftigt.
Würde folgendes funktionieren?
RewriteEngine on
RewriteRule !index.php index.php
Und könnte ich dann in den Unterverzeichnissen eine neue htacces mit anderen RewriteRules anlegen ohne das es zu Problemen kommt?
mfg
freddino
Bräuchte bitte Hilfe.
Wenn ich folgenden Code ausführe:
PHP:
<?php
include('../includes/funktionen.inc.php') ;
$dbh = new PDO('mysql:host=' . HOST . ';dbname=' . DB , USER , PW) ;
//$dbh->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$stmt = $dbh->prepare('select * from admin_login where name= :name') ;
$stmt->bindValue(':name' , $_POST["nick"]) ;
$stmt->execute() ;
$ds = $stmt->fetch() ;
// Prüfen ob Daten richtig und weiterleiten oder zurück zum Login-Formular
if ($_POST["los"] && $_POST["nick"] == $ds["name"] && md5($_POST["pw"]) == $ds["pw"])
{
$zufall = rand(1,100000000000000) ;
$key = crypt ($zufall, rand(10,100000000000000)) ;
$id = $ds["id"] ;
$timestamp = time() ;
//$stmt->closeCursor() ;
$stmt1 = $dbh->prepare('insert into admin_temp (uid , temp_key , zeit) values ( :id , :key , :zeit)') ;
$stmt1->bindValue(':id' , $id) ;
$stmt1->bindValue(':key' , $key) ;
$stmt1->bindValue(':zeit' , $timestamp) ;
$stmt1->execute() ;
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'verwaltung.php?code=' . $key ;
header("Location:https://$host$uri/$extra");
exit;
}
else
{
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'index.html';
header("Location:https://$host$uri/$extra");
exit;
}
?>
kommt es zu dieser Fehlermeldung:
Folgende Versionen habe ich installiert:
Xampp 1.7.0
Apache/2.2.11
PHP/5.2.8
Logfile von Apache:
Code:
Thu Jan 14 14:26:08 2010] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Thu Jan 14 14:26:09 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 14:26:09 2010] [notice] Digest: done
[Thu Jan 14 14:26:10 2010] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Thu Jan 14 14:26:10 2010] [notice] Server built: Dec 10 2008 00:10:06 [Thu Jan 14 14:26:10 2010] [notice] Parent: Created child process 3320 [Thu Jan 14 14:26:10 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 14:26:10 2010] [notice] Digest: done
[Thu Jan 14 14:26:11 2010] [notice] Child 3320: Child process is running [Thu Jan 14 14:26:11 2010] [notice] Child 3320: Acquired the start mutex. [Thu Jan 14 14:26:11 2010] [notice] Child 3320: Starting 250 worker threads.
[Thu Jan 14 14:26:11 2010] [notice] Child 3320: Starting thread to listen on port 443.
[Thu Jan 14 14:26:11 2010] [notice] Child 3320: Starting thread to listen on port 80.
[Thu Jan 14 14:26:14 2010] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Thu Jan 14 14:26:14 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 14:26:14 2010] [notice] Digest: done
[Thu Jan 14 14:26:15 2010] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Thu Jan 14 14:26:15 2010] [notice] Server built: Dec 10 2008 00:10:06 [Thu Jan 14 14:26:15 2010] [notice] Parent: Created child process 4400 [Thu Jan 14 14:26:16 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 14:26:16 2010] [notice] Digest: done
[Thu Jan 14 14:26:16 2010] [notice] Child 4400: Child process is running [Thu Jan 14 14:26:16 2010] [notice] Child 4400: Acquired the start mutex.
[Thu Jan 14 14:26:16 2010] [notice] Child 4400: Starting 250 worker threads.
[Thu Jan 14 14:26:16 2010] [notice] Child 4400: Starting thread to listen on port 443.
[Thu Jan 14 14:26:16 2010] [notice] Child 4400: Starting thread to listen on port 80.
[Thu Jan 14 14:32:28 2010] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Thu Jan 14 14:32:28 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 14:32:28 2010] [notice] Digest: done
[Thu Jan 14 14:32:29 2010] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Thu Jan 14 14:32:29 2010] [notice] Server built: Dec 10 2008 00:10:06 [Thu Jan 14 14:32:29 2010] [notice] Parent: Created child process 3760 [Thu Jan 14 14:32:30 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 14:32:30 2010] [notice] Digest: done
[Thu Jan 14 14:32:30 2010] [notice] Child 3760: Child process is running [Thu Jan 14 14:32:30 2010] [notice] Child 3760: Acquired the start mutex. [Thu Jan 14 14:32:30 2010] [notice] Child 3760: Starting 250 worker threads. [Thu Jan 14 14:32:30 2010] [notice] Child 3760: Starting thread to listen on port 443.
[Thu Jan 14 14:32:30 2010] [notice] Child 3760: Starting thread to listen on port 80.
[Thu Jan 14 14:32:49 2010] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Thu Jan 14 14:32:50 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 14:32:50 2010] [notice] Digest: done
[Thu Jan 14 14:32:51 2010] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Thu Jan 14 14:32:51 2010] [notice] Server built: Dec 10 2008 00:10:06 [Thu Jan 14 14:32:51 2010] [notice] Parent: Created child process 5288 [Thu Jan 14 14:32:52 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 14:32:52 2010] [notice] Digest: done
[Thu Jan 14 14:32:52 2010] [notice] Child 5288: Child process is running [Thu Jan 14 14:32:52 2010] [notice] Child 5288: Acquired the start mutex.
[Thu Jan 14 14:32:52 2010] [notice] Child 5288: Starting 250 worker threads.
[Thu Jan 14 14:32:52 2010] [notice] Child 5288: Starting thread to listen on port 443. [Thu Jan 14 14:32:52 2010] [notice] Child 5288: Starting thread to listen on port 80. [Thu Jan 14 16:58:20 2010] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jan 14 16:58:20 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 16:58:20 2010] [notice] Digest: done
[Thu Jan 14 16:58:20 2010] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Thu Jan 14 16:58:20 2010] [notice] Server built: Dec 10 2008 00:10:06 [Thu Jan 14 16:58:20 2010] [notice] Parent: Created child process 6164 [Thu Jan 14 16:58:21 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 14 16:58:21 2010] [notice] Digest: done
[Thu Jan 14 16:58:21 2010] [notice] Child 6164: Child process is running [Thu Jan 14 16:58:21 2010] [notice] Child 6164: Acquired the start mutex.
[Thu Jan 14 16:58:21 2010] [notice] Child 6164: Starting 250 worker threads.
[Thu Jan 14 16:58:21 2010] [notice] Child 6164: Starting thread to listen on port 443.
[Thu Jan 14 16:58:21 2010] [notice] Child 6164: Starting thread to listen on port 80.
Ausserdem würde ich gerne alle Dateien auf meinen Webspace schützen,also nicht aufrufbar machen und automatisch ohne Verzögerung auf die Index weiterleiten.
Hab mich aber noch nie mit htacces und mod_rewrite beschäftigt.
Würde folgendes funktionieren?
RewriteEngine on
RewriteRule !index.php index.php
Und könnte ich dann in den Unterverzeichnissen eine neue htacces mit anderen RewriteRules anlegen ohne das es zu Problemen kommt?
mfg
freddino