JavaScript HTML/JS/PHP - Kein Zugriff auf mysql - Probleme mit Berechtigungen?

Endless Storm

Commander
Registriert
Dez. 2008
Beiträge
2.154
Hallo zusammen,

ich wollte mit HTML, AngularJS und ursprünglich der MongoDB etwas zur Übung basteln. Ich scheiterte aber an der Einrichtung der MongoDB, ich erhielt gar keinen Zugriff auf die Datenbank. Also bin ich wieder auf XAMPP gestoßen, welches ich in der Vergangenheit bereits im Einsatz hatte zur Übung.

Kurz der Hinweis:
Ich soll mich mit HTML, AngularJS und REST befassen, am besten mit der MongoDB. Da letztere nicht funktioniert, greife ich auf bekanntes zurück, mit XAMPP... Leider funktioniert das auch nicht, da ich aber prinzipiell Zugriff auf die DB habe und nur der Zugriff von der HTML nicht klappt, wollte ich es dennoch mit dieser Variante probieren.

Was bisher geschah:
- XAMPP frisch installiert und mit gestarteten Apache sowie MySQL-Diensten eine DB angelegt in phpMyAdmin.
- Selbst, wenn ich XAMPP über rechtsklick "Als Administrator starten" starte, habe ich keinen Zugriff von der HTML aus.
- Über die Shell von XAMPP habe ich einen User angelegt:
Code:
CREATE USER 'user1'@'localhost' IDENTIFIED BY 'user1password';
GRANT ALL PRIVILEGES ON *.* TO 'user1'@'localhost' WITH GRANT OPTION;
- Zur Übung habe ich eine kleine HTML-Seite mitsamt dem AngularJS-Teil und dem ebenfalls verwendeten PHP-Code nachprogrammiert.
- Über die Shell kann ich mich mit root und pw="" einloggen und in der DB herumspielen, mit meinem programmierten Ergebnis bekomme ich es jedoch nicht zum laufen.
- Ich habe in der PHP als User="root" und PW="" und mit User="user1" und PW="user1password" versucht, beides Erfolglos.
- Die Rechte für "Jeder" habe ich aus phpMyAdmin entfernt, da ich gelesen habe, dass dies zu Problemen führen kann.
! Da ich noch Anfänger bin, wollte ich was nachprogrammieren um es dann für mich anzupassen. Leider funktioniert nicht einmal das... !

Die HTML inklusive AngularJS:
HTML:
<html>
<head>
	<meta charset="utf8" />
	<title>Employee-Test</title>
	<link rel="stylesheet" href="style.css">
	<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.js"></script>
</head>
<body>
  <div ng-app="myapp" ng-controller="empcontroller">		
		<form>
			Employee No. <input type="text" ng-model="empno"/><br />
			First Name <input type="text" ng-model="fname"/><br />
			Last Name <input type="text" ng-model="lname"/><br />
			Department <input type="text" ng-model="dept"/><br />
			<input type="button" value="submit" ng-click="insertdata()"/><br />
		</form>		
		<script>
			var app= angular.module('myapp',[]);
				app.controller('empcontroller',function($scope,$http){
					$scope.insertdata=function(){
						$http.post("test.php",
							{'empno':$scope.empno,'fname':$scope.fname,'lname':$scope.lname,'dept':$scope.dept}
						)
						.success(function(data,status,headers,config){
							console.log("data inserted successfully");
						});
					}
				});
		</script>
	</div>
</body>
</html>

Die PHP:
PHP:
<?php
$data = json_decode(file_get_contents("php://input"));
$empno = mysql_real_escape_string($data->empno);
$fname = mysql_real_escape_string($data->fname);
$lname = mysql_real_escape_string($data->lname);
$dept = mysql_real_escape_string($data->dept);
mysql_connect("localhost","user1","user1password");
mysql_select_db("company");
// 'id' bewusst ausgespart, da Auto-Inkrement eingestellt ist!!
mysql_query("INSERT INTO employee('emp_no', 'first_name', 'last_name', 'dept_name')
	VALUES('".$empno."','".$fname."','".$fname."','".$dept."')");
?>

Ein Ausschnitt aus der DB-Shell:
Code:
+--------------------+
| Database           |
+--------------------+
| company            |
+--------------------+

+-------------------+
| Tables_in_company |
+-------------------+
| employee          |
+-------------------+

+------------+-------------+------+-----+---------+----------------+
| Field      | Type        | Null | Key | Default | Extra          |
+------------+-------------+------+-----+---------+----------------+
| id         | int(11)     | NO   | PRI | NULL    | auto_increment |
| emp_no     | int(10)     | NO   |     | NULL    |                |
| first_name | varchar(14) | NO   |     | NULL    |                |
| last_name  | varchar(15) | NO   |     | NULL    |                |
| dept_name  | varchar(25) | NO   |     | NULL    |                |
+------------+-------------+------+-----+---------+----------------+

Testdatensatz:
+----+--------+------------+-----------+-----------+
| id | emp_no | first_name | last_name | dept_name |
+----+--------+------------+-----------+-----------+
|  1 |    123 | John       | Deere     | IT        |
|  2 |    456 | Obi Wan    | Kenobi    | Jedi      |
+----+--------+------------+-----------+-----------+

Das allermeiste an dem Code ist ab-programmiert, von daher nicht mein eigener Code-Stil und nicht mein Fachwissen, welches da verwendet wird.
Wenn Ihr Ideen für Lösungen habt, dann bitte Schritt für Schritt.

Final wollte ich eigentlich was ohne PHP machen, hatte gehofft, ich käme um PHP herum und kann ausschließlich AngularJS nutzen für die CRUD-Funktionen... Vielleicht finde ich da aber noch was.

Wenn ihr weitere Infos braucht, einfach Nachfragen!

Vielen Dank im Vorraus.


[edit]
Für alle, die es interessiert, welche Probleme ich mit MongoDB habe. Ich scheitere bereits an der mongod.exe:
Code:
C:\Program Files\MongoDB\Server\3.4\bin>mongod.exe
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten] MongoDB starting : pid=7
376 port=27017 dbpath=C:\data\db\ 64-bit host=**MeinPCName**
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten] targetMinOS: Windows 7/W
indows Server 2008 R2
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten] db version v3.4.1
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten] git version: 5e103c4f558
3e2566a45d740225dc250baacfbd7
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten] OpenSSL version: OpenSSL
 1.0.1t-fips  3 May 2016
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten] allocator: tcmalloc
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten] modules: none
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten] build environment:
2016-12-30T19:02:43.242+0100 I CONTROL  [initandlisten]     distmod: 2008plus-ss
l
2016-12-30T19:02:43.243+0100 I CONTROL  [initandlisten]     distarch: x86_64
2016-12-30T19:02:43.243+0100 I CONTROL  [initandlisten]     target_arch: x86_64
2016-12-30T19:02:43.243+0100 I CONTROL  [initandlisten] options: {}
2016-12-30T19:02:43.244+0100 I -        [initandlisten] Detected data files in C
:\data\db\ created by the 'wiredTiger' storage engine, so setting the active sto
rage engine to 'wiredTiger'.
2016-12-30T19:02:43.244+0100 I STORAGE  [initandlisten] wiredtiger_open config:
create,cache_size=7654M,session_max=20000,eviction=(threads_max=4),config_base=f
alse,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=sn
appy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),st
atistics_log=(wait=0),
2016-12-30T19:02:43.478+0100 I CONTROL  [initandlisten]
2016-12-30T19:02:43.479+0100 I CONTROL  [initandlisten] ** WARNING: Access contr
ol is not enabled for the database.
2016-12-30T19:02:43.479+0100 I CONTROL  [initandlisten] **          Read and wri
te access to data and configuration is unrestricted.
2016-12-30T19:02:43.479+0100 I CONTROL  [initandlisten]
2016-12-30T19:02:43.479+0100 I CONTROL  [initandlisten] Hotfix KB2731284 or late
r update is not installed, will zero-out data files.
2016-12-30T19:02:43.480+0100 I CONTROL  [initandlisten]
2016-12-30T19:02:43.584+0100 W FTDC     [initandlisten] Failed to initialize Per
formance Counters for FTDC: WindowsPdhError: PdhExpandCounterPathW failed with '
Das angegebene Objekt wurde nicht auf dem Computer gefunden.' for counter '\Memo
ry\Available Bytes'
2016-12-30T19:02:43.584+0100 I FTDC     [initandlisten] Initializing full-time d
iagnostic data capture with directory 'C:/data/db/diagnostic.data'
2016-12-30T19:02:43.590+0100 I NETWORK  [thread1] waiting for connections on por
t 27017
Hier das Consolenfenster, wenn ich im neuen CMD-Fenster mongo.exe ausführen will:
Code:
C:\Program Files\MongoDB\Server\3.4\bin>mongo
MongoDB shell version v3.4.1
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.1
Server has startup warnings:
2016-12-30T19:02:43.478+0100 I CONTROL  [initandlisten]
2016-12-30T19:02:43.479+0100 I CONTROL  [initandlisten] ** WARNING: Access contr
ol is not enabled for the database.
2016-12-30T19:02:43.479+0100 I CONTROL  [initandlisten] **          Read and wri
te access to data and configuration is unrestricted.
2016-12-30T19:02:43.479+0100 I CONTROL  [initandlisten]
2016-12-30T19:02:43.479+0100 I CONTROL  [initandlisten] Hotfix KB2731284 or late
r update is not installed, will zero-out data files.
2016-12-30T19:02:43.480+0100 I CONTROL  [initandlisten]
So am Rande, ich nutze Win7Prof 64Bit und habe Kaspersky als Anti-Viren-Programm.
 
Zuletzt bearbeitet: (Fehlermeldung der MongoDB ergänzt)
Endless Storm schrieb:
Final wollte ich eigentlich was ohne PHP machen, hatte gehofft, ich käme um PHP herum und kann ausschließlich AngularJS nutzen für die CRUD-Funktionen...

Du kannst in Angular keine DB Operationen machen, denn das ist Clientseitig!
Du brauchst immer eine API die das übernimmt (der REST-Teil der Übung :D) auf die Client-JS zugreift.

Und dein PHP geht vermutlich nicht weil mysql_connect seit PHP 7 nichtmehr geht! XAMPP nutzt afaik 7.0, sollte aber im error.log stehen falls das das Problem ist.

In dem Fall sollte mysqli gehen, hier z.B. mit Rückgabe als json:
PHP:
$data = json_decode(file_get_contents("php://input"));

$servername = "localhost";
$username = "user1";
$password = "user1password";
$db = "company";
$mysqli = new mysqli($servername, $username, $password, $db);
if ($mysqli->connect_error) {
	die("Connection failed: " . $mysqli->connect_error);
} 

$empno = $mysqli->real_escape_string($data->empno);
$fname = $mysqli->real_escape_string($data->fname);
$lname = $mysqli->real_escape_string($data->lname);
$dept = $mysqli->real_escape_string($data->dept);

$sql = "INSERT INTO employee('emp_no', 'first_name', 'last_name', 'dept_name')
	VALUES('".$empno."','".$fname."','".$fname."','".$dept."')";

if ($mysqli->query($sql) === TRUE) {
	echo json_encode(array('success' => 'true'));
} else {
	echo json_encode(array('success' => 'false', error => $mysqli->error));
}

Edit: Falls du doch XAMPP mit PHP 5.x hast, dann schau doch mal in den apachelog was das problem ist, das sollte da auftauchen.

Edit: mysql_real_escape_string gibts natürlich auch nichtmehr in 7.0, code mal angepasst :)
 
Zuletzt bearbeitet:
In phpMyAdmin steht PHP-Version: 5.6.28 und Apache/2.4.23.

Im access-log von Apache steht ganz aktuell, wenn ich den "submit"-Button klicke folgendes:
Code:
::1 - - [30/Dec/2016:19:29:59 +0100] "GET /phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=659bfdda90ee41ee658973bb15522f15&ajax_request=true&ajax_page_request=true&_nocache=1483122599529785996 HTTP/1.1" 200 7272 "http://localhost/phpmyadmin/index.php?token=659bfdda90ee41ee658973bb15522f15" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:19:30:00 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=659bfdda90ee41ee658973bb15522f15&no_debug=true&_nocache=1483122599940555996 HTTP/1.1" 200 1479 "http://localhost/phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=659bfdda90ee41ee658973bb15522f15" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"

Was sagt mir das nun?

Im error-log kommt nichts neues und der php-error-log ist nicht vorhanden, wohl also noch leer.


Es würde aber einiges erklären, warum nichts funktioniert, falsche Versionen... ^^

Gibt es eigentlich ein XAMPP mit aktuellem php oder kann man das nachinstallieren oder sowas?
Ergänzung ()

Ich lade mir gerade die aktuelle Version von XAMPP herunter. Habe versucht, mithilfe einer Internetanleitung manuell das PHP zu aktualisieren, aber Apache hat nicht mitgemacht^^ Jetzt gibt es PHP 7.0.0 anstatt 7.1.0. Auch Ok... Wird nur bisl was dauern bis ich wieder testen kann... Ich melde mich
 
Ne also laut accesslog kommt das nichtmal bei Apache an, das ist wohl das Problem, da sind nur 2 Anfragen für phpmyadmin drin.

Edit: Ich schätze mal die Ziel-URL beim http request in Angular reicht so nicht aus.
Code:
$http.post("test.php", {'empno':$scope.empno,'fname':$scope.fname,'lname':$scope.lname,'dept':$scope.dep
Versuch mal test.php durch die vollständige URL zu ersetzen, also http://localhost/pfad/zu/test.php
Ansonsten schau was die Browserkonsole sagt. Jedenfalls liegt der Fehler vor Apache und php, denn da kommt ja nicht mal was an.

Das nächste mal poste gleich die Logs, das macht vieles einfacher. :)

Edit: Da du die Seite mit dem Angularscript auch nicht über Apache bzw. localhost aufrufst (ist auch nicht im accesslog, denke mal du öffnest die direkt mit dem Browser), kann das Script gar nicht wissen unter welcher Adresse die test.php zu finden wäre, afaik verwendet Angular sonst die URL vom Server als Basis für Anfragen. Das könntest du also auch noch versuchen bevor du was am Code änderst.
 
Zuletzt bearbeitet:
Sooo, mal ein Update:

- XAMPP ist nun top aktuell, läuft mit PHP7, Installation ist frisch, ohne Sicherungen durchgeführt, da diese Probleme gemacht haben...
- Benutzer "user1" mit PW="user1password" wieder über die Shell angelegt, da es mit "root" und "" nicht geklappt hatte. Aber auch hier, ohne Erfolg.
- Die HTML und die PHP liegen im XAMPP Unterverzeichnis "company". Link also: "http://localhost/company/test.html" zur Startdatei.

Hier die aktuelle php:
PHP:
<?php
$data = json_decode(file_get_contents("php://input"));
 
$servername = "localhost";
$username = "user1";
$password = "user1password";
$db = "company";
$mysqli = new mysqli($servername, $username, $password, $db);
if ($mysqli->connect_error) {
	die("Connection failed: " . $mysqli->connect_error);
} 
 
$empno = $mysqli->real_escape_string($data->empno);
$fname = $mysqli->real_escape_string($data->fname);
$lname = $mysqli->real_escape_string($data->lname);
$dept = $mysqli->real_escape_string($data->dept);
 
$sql = "INSERT INTO employee('emp_no', 'first_name', 'last_name', 'dept_name')
	VALUES('".$empno."','".$fname."','".$fname."','".$dept."')";
 
if ($mysqli->query($sql) === TRUE) {
	echo json_encode(array('success' => 'true'));
} else {
	echo json_encode(array('success' => 'false', error => $mysqli->error));
}
?>

Entspricht zu 100% deiner Variante.

Die HTML ist nun mit dem geänderten Link folgende:
HTML:
<head>...
	<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.js"></script>
</head>
<body>
  <div ng-app="myapp" ng-controller="empcontroller">
		
		<form>
			Employee No. <input type="text" ng-model="empno"/><br />
			First Name <input type="text" ng-model="fname"/><br />
			Last Name <input type="text" ng-model="lname"/><br />
			Department <input type="text" ng-model="dept"/><br />
			<input type="button" value="submit" ng-click="insertdata()"/><br />
		</form>	
		
		<script>
			var app= angular.module('myapp',[]);
				app.controller('empcontroller',function($scope,$http){
					$scope.insertdata=function(){
						$http.post("localhost/company/test.php",
							{'empno':$scope.empno,'fname':$scope.fname,'lname':$scope.lname,'dept':$scope.dept}
						)
						.success(function(data,status,headers,config){
							console.log("data inserted successfully");
						});
					}
				});
		</script>
	</div>
</body>
</html>

Die nun neue, vollständige access-log:
Code:
::1 - - [30/Dec/2016:20:17:21 +0100] "GET /phpmyadmin/ HTTP/1.1" 200 13403 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/js/codemirror/lib/codemirror.css?v=4.5.1 HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/js/codemirror/addon/hint/show-hint.css?v=4.5.1 HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/phpmyadmin.css.php?nocache=5821480270ltr HTTP/1.1" 200 20074 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/js/codemirror/addon/lint/lint.css?v=4.5.1 HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/themes/pmahomme/css/printview.css?v=4.5.1 HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/js/whitelist.php?lang=de&db=&token=d067bd91e11b89f92b1e424360d6ada9&v=4.5.1 HTTP/1.1" 200 482 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/js/messages.php?lang=de&db=&token=d067bd91e11b89f92b1e424360d6ada9&v=4.5.1 HTTP/1.1" 200 9648 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=common.js&scripts%5B%5D=config.js&scripts%5B%5D=page_settings.js&scripts%5B%5D=codemirror/lib/codemirror.js&scripts%5B%5D=codemirror/mode/sql/sql.js&scripts%5B%5D=codemirror/addon/runmode/runmode.js&scripts%5B%5D=codemirror/addon/hint/show-hint.js&scripts%5B%5D=codemirror/addon/hint/sql-hint.js&scripts%5B%5D=codemirror/addon/lint/lint.js&scripts%5B%5D=codemirror/addon/lint/sql-lint.js&scripts%5B%5D=console.js&v=4.5.1 HTTP/1.1" 200 129429 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=jquery/jquery-1.11.1.min.js&scripts%5B%5D=sprintf.js&scripts%5B%5D=ajax.js&scripts%5B%5D=keyhandler.js&scripts%5B%5D=jquery/jquery-ui-1.11.2.min.js&scripts%5B%5D=jquery/jquery.cookie.js&scripts%5B%5D=jquery/jquery.mousewheel.js&scripts%5B%5D=jquery/jquery.event.drag-2.2.js&scripts%5B%5D=jquery/jquery-ui-timepicker-addon.js&scripts%5B%5D=jquery/jquery.ba-hashchange-1.3.js&scripts%5B%5D=jquery/jquery.debounce-1.0.5.js&scripts%5B%5D=menu-resizer.js&scripts%5B%5D=cross_framing_protection.js&scripts%5B%5D=rte.js&scripts%5B%5D=tracekit/tracekit.js&scripts%5B%5D=error_report.js&scripts%5B%5D=doclinks.js&scripts%5B%5D=functions.js&scripts%5B%5D=navigation.js&scripts%5B%5D=indexes.js&v=4.5.1 HTTP/1.1" 200 216095 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/js/get_image.js.php?theme=pmahomme&v=4.5.1 HTTP/1.1" 200 1822 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/themes/dot.gif HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/themes/pmahomme/img/logo_left.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/themes/pmahomme/img/s_collapseall.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:22 +0100] "GET /phpmyadmin/themes/pmahomme/img/ajax_clock_small.gif HTTP/1.1" 304 - "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:23 +0100] "GET /phpmyadmin/themes/pmahomme/img/left_nav_bg.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/phpmyadmin.css.php?nocache=5821480270ltr" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:23 +0100] "GET /phpmyadmin/themes/pmahomme/img/sprites.png?v=4.5.1 HTTP/1.1" 304 - "http://localhost/phpmyadmin/phpmyadmin.css.php?nocache=5821480270ltr" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:23 +0100] "POST /phpmyadmin/db_structure.php?ajax_request=1&favorite_table=1&sync_favorite_tables=1&token=d067bd91e11b89f92b1e424360d6ada9 HTTP/1.1" 200 162 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:17:23 +0100] "GET /phpmyadmin/version_check.php?server=1&_nocache=148312544336797817 HTTP/1.1" 200 41 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:47:34 +0100] "GET /phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9&ajax_request=true&ajax_page_request=true&_nocache=1483127254668268549 HTTP/1.1" 200 6020 "http://localhost/phpmyadmin/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:47:34 +0100] "GET /phpmyadmin/themes/pmahomme/img/arrow_ltr.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:47:34 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=server_databases.js&call_done=1&v=4.5.1 HTTP/1.1" 200 1707 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:47:45 +0100] "GET /phpmyadmin/url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.7%2Fen%2Fcreate-database.html HTTP/1.1" 200 226 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:48:05 +0100] "POST /phpmyadmin/db_create.php HTTP/1.1" 200 2019 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:48:05 +0100] "POST /phpmyadmin/navigation.php?ajax_request=1&token=d067bd91e11b89f92b1e424360d6ada9 HTTP/1.1" 200 2106 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:48:05 +0100] "GET /phpmyadmin/db_structure.php?db=company&token=d067bd91e11b89f92b1e424360d6ada9&db=company&ajax_request=true&ajax_page_request=true&_nocache=14831272853538266 HTTP/1.1" 200 2835 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:48:05 +0100] "GET /phpmyadmin/navigation.php?ajax_request=1&token=d067bd91e11b89f92b1e424360d6ada9&aPath=cm9vdA%3D%3D.Y29tcGFueQ%3D%3D&vPath=cm9vdA%3D%3D.Y29tcGFueQ%3D%3D&pos=0&pos2_name=&pos2_value=&searchClause=&searchClause2=&_nocache=1483127285726825849 HTTP/1.1" 200 1392 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:48:13 +0100] "POST /phpmyadmin/tbl_create.php HTTP/1.1" 200 48227 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:48:13 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=jquery/jquery.uitablefilter.js&call_done=1&v=4.5.1 HTTP/1.1" 200 1413 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:20:48:13 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=d067bd91e11b89f92b1e424360d6ada9&no_debug=true&_nocache=1483127293856846216 HTTP/1.1" 200 1391 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:13:47 +0100] "POST /phpmyadmin/tbl_indexes.php HTTP/1.1" 200 2731 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:13:47 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-bg_flat_75_ffffff_40x100.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:13:47 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:13:47 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-icons_888888_256x240.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:13:47 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:13:47 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:13:47 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-icons_222222_256x240.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:13:47 +0100] "GET /phpmyadmin/themes/pmahomme/img/s_sortable.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/phpmyadmin.css.php?nocache=5821480270ltr" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:14:06 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-bg_glass_75_dadada_1x400.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:14:07 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-bg_glass_65_ffffff_1x400.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:15:23 +0100] "POST /phpmyadmin/tbl_structure.php HTTP/1.1" 200 112 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:15:23 +0100] "POST /phpmyadmin/tbl_create.php HTTP/1.1" 200 133 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:15:43 +0100] "POST /phpmyadmin/tbl_indexes.php HTTP/1.1" 200 2736 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:15:51 +0100] "POST /phpmyadmin/tbl_structure.php HTTP/1.1" 200 112 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:15:52 +0100] "POST /phpmyadmin/tbl_create.php HTTP/1.1" 200 133 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:15:58 +0100] "POST /phpmyadmin/tbl_indexes.php HTTP/1.1" 200 2731 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:02 +0100] "POST /phpmyadmin/tbl_structure.php HTTP/1.1" 200 112 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:02 +0100] "POST /phpmyadmin/tbl_create.php HTTP/1.1" 200 1681 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:02 +0100] "GET /phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee&ajax_request=true&ajax_page_request=true&_nocache=1483128962824301232 HTTP/1.1" 200 4726 "http://localhost/phpmyadmin/server_databases.php?server=1&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:03 +0100] "GET /phpmyadmin/themes/pmahomme/img/arrow_ltr.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:02 +0100] "GET /phpmyadmin/tbl_structure.php?server=1&db=company&token=d067bd91e11b89f92b1e424360d6ada9&goto=db_structure.php&table=employee&ajax_request=true&ajax_page_request=true&_nocache=1483128962842265960 HTTP/1.1" 200 6607 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:02 +0100] "POST /phpmyadmin/navigation.php?ajax_request=1&token=d067bd91e11b89f92b1e424360d6ada9 HTTP/1.1" 200 2452 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:03 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=d067bd91e11b89f92b1e424360d6ada9&no_debug=true&_nocache=1483128963178606224 HTTP/1.1" 200 1415 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:03 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=tbl_structure.js&call_done=1&v=4.5.1 HTTP/1.1" 200 5130 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:03 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=d067bd91e11b89f92b1e424360d6ada9&no_debug=true&_nocache=1483128963653368606 HTTP/1.1" 200 1415 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:08 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/images/ui-icons_454545_256x240.png HTTP/1.1" 304 - "http://localhost/phpmyadmin/themes/pmahomme/jquery/jquery-ui-1.11.2.css" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:12 +0100] "GET /phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&add_key=1&sql_query=ALTER+TABLE+%60employee%60+ADD+PRIMARY+KEY%28%60id%60%29%3B&message_to_show=Ein+Prim%C3%A4rschl%C3%BCssel+wurde+in+id+erzeugt.&ajax_request=true&ajax_page_request=true&_nocache=1483128972151936400 HTTP/1.1" 200 9115 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:12 +0100] "POST /phpmyadmin/navigation.php?ajax_request=1&token=d067bd91e11b89f92b1e424360d6ada9 HTTP/1.1" 200 2455 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:12 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=gis_data_editor.js&scripts%5B%5D=multi_column_sort.js&call_done=1&v=4.5.1 HTTP/1.1" 200 4575 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:13 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=d067bd91e11b89f92b1e424360d6ada9&no_debug=true&_nocache=1483128972874131287 HTTP/1.1" 200 1418 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:17 +0100] "GET /phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1 HTTP/1.1" 200 17643 "http://localhost/phpmyadmin/db_structure.php?token=d067bd91e11b89f92b1e424360d6ada9&server=1&db=company&table=employee" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:17 +0100] "GET /phpmyadmin/js/whitelist.php?lang=de&db=company&token=d067bd91e11b89f92b1e424360d6ada9&v=4.5.1 HTTP/1.1" 200 482 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:17 +0100] "GET /phpmyadmin/js/messages.php?lang=de&db=company&token=d067bd91e11b89f92b1e424360d6ada9&v=4.5.1 HTTP/1.1" 200 9648 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:17 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=common.js&scripts%5B%5D=config.js&scripts%5B%5D=page_settings.js&scripts%5B%5D=tbl_structure.js&scripts%5B%5D=jquery/jquery.uitablefilter.js&scripts%5B%5D=codemirror/lib/codemirror.js&scripts%5B%5D=codemirror/mode/sql/sql.js&scripts%5B%5D=codemirror/addon/runmode/runmode.js&scripts%5B%5D=codemirror/addon/hint/show-hint.js&scripts%5B%5D=codemirror/addon/hint/sql-hint.js&scripts%5B%5D=codemirror/addon/lint/lint.js&scripts%5B%5D=codemirror/addon/lint/sql-lint.js&scripts%5B%5D=console.js&v=4.5.1 HTTP/1.1" 200 135066 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:18 +0100] "POST /phpmyadmin/navigation.php?ajax_request=1&token=d067bd91e11b89f92b1e424360d6ada9 HTTP/1.1" 200 2455 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:18 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=d067bd91e11b89f92b1e424360d6ada9&no_debug=true&_nocache=1483128978210304697 HTTP/1.1" 200 1418 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:20 +0100] "POST /phpmyadmin/tbl_structure.php HTTP/1.1" 200 112 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:20 +0100] "POST /phpmyadmin/tbl_structure.php HTTP/1.1" 200 7244 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:21 +0100] "POST /phpmyadmin/navigation.php?ajax_request=1&token=d067bd91e11b89f92b1e424360d6ada9 HTTP/1.1" 200 2455 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:16:21 +0100] "POST /phpmyadmin/tbl_structure.php HTTP/1.1" 200 6983 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:17:25 +0100] "GET /phpmyadmin/server_privileges.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&checkprivsdb=company&checkprivstable=employee&viewing_mode=table&ajax_request=true&ajax_page_request=true&_nocache=1483129045427750770 HTTP/1.1" 200 2302 "http://localhost/phpmyadmin/tbl_structure.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&goto=tbl_structure.php&back=tbl_structure.php&field=id&change_column=1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:17:25 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=server_privileges.js&call_done=1&v=4.5.1 HTTP/1.1" 200 3791 "http://localhost/phpmyadmin/server_privileges.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&checkprivsdb=company&checkprivstable=employee&viewing_mode=table" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:20:30 +0100] "GET /company/test.html HTTP/1.1" 200 1221 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:20:30 +0100] "GET /company/style.css HTTP/1.1" 404 1327 "http://localhost/company/test.html" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:20:41 +0100] "POST /company/test.php HTTP/1.1" 200 401 "http://localhost/company/test.html" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:20:46 +0100] "GET /phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9&ajax_request=true&ajax_page_request=true&_nocache=1483129246733388266 HTTP/1.1" 200 4548 "http://localhost/phpmyadmin/server_privileges.php?db=company&table=employee&token=d067bd91e11b89f92b1e424360d6ada9&checkprivsdb=company&checkprivstable=employee&viewing_mode=table" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:20:47 +0100] "GET /phpmyadmin/js/get_scripts.js.php?scripts%5B%5D=tbl_change.js&scripts%5B%5D=gis_data_editor.js&scripts%5B%5D=multi_column_sort.js&call_done=1&v=4.5.1 HTTP/1.1" 200 11039 "http://localhost/phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:20:47 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=d067bd91e11b89f92b1e424360d6ada9&no_debug=true&_nocache=1483129247191709927 HTTP/1.1" 200 1418 "http://localhost/phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:21:48 +0100] "POST /company/test.php HTTP/1.1" 200 401 "http://localhost/company/test.html" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:21:51 +0100] "GET /phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9&ajax_request=true&ajax_page_request=true&_nocache=1483129311083135514 HTTP/1.1" 200 4549 "http://localhost/phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:21:51 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=d067bd91e11b89f92b1e424360d6ada9&no_debug=true&_nocache=1483129311379377926 HTTP/1.1" 200 1418 "http://localhost/phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:25:17 +0100] "GET /company/test.html HTTP/1.1" 200 1239 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:25:18 +0100] "GET /company/style.css HTTP/1.1" 404 1327 "http://localhost/company/test.html" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:25:30 +0100] "POST /company/localhost/company/test.php HTTP/1.1" 404 1327 "http://localhost/company/test.html" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:25:33 +0100] "GET /phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9&ajax_request=true&ajax_page_request=true&_nocache=1483129533811112608 HTTP/1.1" 200 4548 "http://localhost/phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [30/Dec/2016:21:25:34 +0100] "GET /phpmyadmin/index.php?ajax_request=1&recent_table=1&token=d067bd91e11b89f92b1e424360d6ada9&no_debug=true&_nocache=1483129534119949989 HTTP/1.1" 200 1418 "http://localhost/phpmyadmin/sql.php?server=1&db=company&table=employee&pos=0&token=d067bd91e11b89f92b1e424360d6ada9" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"

...
Ergänzung ()

... und Teil 2:

Die error-log, ebenfalls neu und vollständig:
Code:
[Fri Dec 30 20:14:10.504073 2016] [ssl:warn] [pid 5328:tid 336] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 20:14:10.618080 2016] [ssl:warn] [pid 5328:tid 336] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 20:14:10.642081 2016] [mpm_winnt:notice] [pid 5328:tid 336] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.13 configured -- resuming normal operations
[Fri Dec 30 20:14:10.642081 2016] [mpm_winnt:notice] [pid 5328:tid 336] AH00456: Apache Lounge VC14 Server built: Jul  1 2016 11:09:37
[Fri Dec 30 20:14:10.642081 2016] [core:notice] [pid 5328:tid 336] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Dec 30 20:14:10.650081 2016] [mpm_winnt:notice] [pid 5328:tid 336] AH00418: Parent: Created child process 11516
[Fri Dec 30 20:14:11.016102 2016] [ssl:warn] [pid 11516:tid 348] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 20:14:11.119108 2016] [ssl:warn] [pid 11516:tid 348] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 20:14:11.140109 2016] [mpm_winnt:notice] [pid 11516:tid 348] AH00354: Child: Starting 150 worker threads.
[Fri Dec 30 20:16:58.678692 2016] [ssl:warn] [pid 11284:tid 344] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 20:16:58.790699 2016] [ssl:warn] [pid 11284:tid 344] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 20:16:58.812700 2016] [mpm_winnt:notice] [pid 11284:tid 344] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.13 configured -- resuming normal operations
[Fri Dec 30 20:16:58.812700 2016] [mpm_winnt:notice] [pid 11284:tid 344] AH00456: Apache Lounge VC14 Server built: Jul  1 2016 11:09:37
[Fri Dec 30 20:16:58.812700 2016] [core:notice] [pid 11284:tid 344] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Dec 30 20:16:58.814700 2016] [mpm_winnt:notice] [pid 11284:tid 344] AH00418: Parent: Created child process 11572
[Fri Dec 30 20:16:59.243724 2016] [ssl:warn] [pid 11572:tid 356] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 20:16:59.351731 2016] [ssl:warn] [pid 11572:tid 356] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 20:16:59.373732 2016] [mpm_winnt:notice] [pid 11572:tid 356] AH00354: Child: Starting 150 worker threads.
[Fri Dec 30 21:20:41.883367 2016] [:error] [pid 11572:tid 1724] [client ::1:61916] PHP Notice:  Use of undefined constant error - assumed 'error' in C:\\xampp\\htdocs\\company\\test.php on line 24, referer: http://localhost/company/test.html
[Fri Dec 30 21:21:36.907514 2016] [ssl:warn] [pid 8988:tid 344] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 21:21:36.937516 2016] [core:warn] [pid 8988:tid 344] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Dec 30 21:21:37.013520 2016] [ssl:warn] [pid 8988:tid 344] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 21:21:37.209531 2016] [mpm_winnt:notice] [pid 8988:tid 344] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.13 configured -- resuming normal operations
[Fri Dec 30 21:21:37.209531 2016] [mpm_winnt:notice] [pid 8988:tid 344] AH00456: Apache Lounge VC14 Server built: Jul  1 2016 11:09:37
[Fri Dec 30 21:21:37.209531 2016] [core:notice] [pid 8988:tid 344] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Dec 30 21:21:37.217532 2016] [mpm_winnt:notice] [pid 8988:tid 344] AH00418: Parent: Created child process 7996
[Fri Dec 30 21:21:37.590553 2016] [ssl:warn] [pid 7996:tid 356] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 21:21:37.688559 2016] [ssl:warn] [pid 7996:tid 356] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 30 21:21:37.711560 2016] [mpm_winnt:notice] [pid 7996:tid 356] AH00354: Child: Starting 150 worker threads.
[Fri Dec 30 21:21:48.413172 2016] [:error] [pid 7996:tid 1724] [client ::1:61931] PHP Notice:  Use of undefined constant error - assumed 'error' in C:\\xampp\\htdocs\\company\\test.php on line 24, referer: http://localhost/company/test.html


Der mysql-error-log passt leider nicht mehr...

Datensatz lässt sich nach wie vor nicht eingeben...
Ergänzung ()

Nicht ganz uninteressant die letzten Zeilen aus der mysql-error-log:
Code:
2016-12-30 21:21:38 8792 [ERROR] mysqld.exe: Table '.\mysql\db' is marked as crashed and should be repaired
2016-12-30 21:21:38 8792 [Warning] Checking table:   '.\mysql\db'
2016-12-30 21:21:38 8792 [ERROR] mysql.db: 1 client is using or hasn't closed the table properly
2016-12-30 21:21:38 8792 [ERROR] mysqld.exe: Table '.\mysql\tables_priv' is marked as crashed and should be repaired
2016-12-30 21:21:38 8792 [Warning] Checking table:   '.\mysql\tables_priv'
2016-12-30 21:21:38 8792 [ERROR] mysql.tables_priv: 1 client is using or hasn't closed the table properly
2016-12-30 21:21:38 8792 [ERROR] mysqld.exe: Table '.\mysql\columns_priv' is marked as crashed and should be repaired
2016-12-30 21:21:38 8792 [Warning] Checking table:   '.\mysql\columns_priv'
2016-12-30 21:21:38 8792 [ERROR] mysql.columns_priv: 1 client is using or hasn't closed the table properly
2016-12-30 21:21:38 8792 [ERROR] mysqld.exe: Table '.\mysql\procs_priv' is marked as crashed and should be repaired
2016-12-30 21:21:38 8792 [Warning] Checking table:   '.\mysql\procs_priv'
2016-12-30 21:21:38 8792 [ERROR] mysql.procs_priv: 1 client is using or hasn't closed the table properly
2016-12-30 21:21:38 8792 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.19-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution

Vielleicht liegts hierran??
 
Erstmal vorweg: Wie der apache error.log schon sagt habe ich hier (24. Zeile im vollen codeblock)
PHP:
echo json_encode(array('success' => 'false', error => $mysqli->error));
vergessen error als String anzugeben, das mal ändern, dann sollte die test.php zumindest ohne Fehler laufen.

Weiterhin hab ich es mal selbst bei mir in XAMPP rein und mir die Rückgabe vom php script anzeigen lassen (dafür war das auch gedacht ;)), und siehe da:
Code:
{"success":"false","error":"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''emp_no', 'first_name', 'last_name', 'dept_name')\r\n \tVALUES('','','' at line 1"}

Richtig ist es so (hatte das leider vorhin beim kopieren gar nicht angeschaut):
Code:
"INSERT INTO employee (emp_no, first_name, last_name, dept_name) VALUES('".$empno."','".$fname."','".$fname."','".$dept."')"

Edit: Die ganzen crashed table error hab ich schon immer mit XAMPP, einfach ignorieren solange alles geht.
 
Zuletzt bearbeitet:
*Geschafft*

- Ich habe entsprechend deiner Angaben im error-log nachgeschaut und mit meinem Halbwissen es hinbekommen, diese Zeile final so aussehen zu lassen:
PHP:
	echo json_encode(array('success' => 'false', error => $mysqli->{'error'}));

- Die Insert-Zeile habe ich ebenfalls nach deinem Code angepasst, und nachdem es endlich funktioniert hatte, war mir doch glatt noch ein Tippfehler aufgefallen, anstelle des Nachname, wurde der Vorname zweimal übertragen :) => Korrigiert, die Zeile sieht nun folgendermaßen aus:
PHP:
$sql = "INSERT INTO employee (emp_no, first_name, last_name, dept_name)
	VALUES('".$empno."','".$fname."','".$lname."','".$dept."')";

Ich muss mehr lernen, den error-log zu lesen und zu verstehen. Wie die String-Übergabe aussehen muss, habe ich auch aus der error-log herausgelesen, also den Hinweis auf die geschweiften Klammern :D

Vielen vielen Dank für deine Hilfe, nun werde ich mich weiter vorantasten und den Code erweitern. Wenn ich später dazu Hilfe brauche, eröffne ich einen neuen Thread.

Schonmal einen guten Rutsch ins neue Jahr :)
 
Schön dass es jetzt geht, aber
Code:
echo json_encode(array('success' => 'false', error => $mysqli->{'error'}));
ist immernoch falsch, so ist es richtig
Code:
echo json_encode(array('success' => 'false', 'error' => $mysqli->error));
Das ist ein assoziatives array und der key (key => value) muss hier der String sein, php erkennt den Fehler und nimmt das von selbst an, deshalb geht es auch so, gibt halt Fehler im Log.
$mysqli->error holt den Eintrag error aus dem Objekt $mysqli, das passt schon so wie es war, die Form $mysqli->{'error'} solte aber auch gehen, ist halt unnötig ;)

Edit: Aber wenn du damit eh nichts anfägst (Errorhandling in JS) kannst du es eh komplett weglassen. Das ganze hier sollte dir aber zeigen wie sinnvoll sowas sein kann :D
 
Zuletzt bearbeitet:
Zurück
Oben