Bin neu und brauche Hilfe!!!

Und alles was mit phpMyAdmin seine Verwandtschaft findet hat hier seinen Platz.

Bin neu und brauche Hilfe!!!

Postby calvador » 12. December 2007 17:05

Hallo,

ich bin seit einiger Zeit am Tüfteln mit PHP und mache da auch gute Fortschritte. Nun möchte ich aber auch mit Datenbanken rummachen.

Ich habe einen Apache 2.0.54 am laufen und arbeite mit PHP 5.0.4.
Läuft bestens. Jetzt habe ich MySql installiert und der läuft auch. Version: 5.0.

Jetzt habe ich mir phpMyAdmin besorgt und möchte auf den SQL-Server, bekomme aber immer wieder die gleiche Fehlermeldung:


phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

Arbeite auf einem XP-Pro Rechner!

Habe das Problem schon mit einem Kumpel über Telefon versucht zu lösen, da der schon länger mit MySql macht, aber wir haben es auch nicht hin bekommen.

Kann mir bitte jemand helfen damit ich endlich weiterarbeiten kann? Danke!

Gruß

Calvador
calvador
 
Posts: 4
Joined: 12. December 2007 16:53
Location: NRW

Postby Scory » 12. December 2007 22:30

Offensichtlich kann phpMyAdmin keine Session starten. Welche Konfiguration hast Du in config.inc.php für das Login in der Datenbank aktiviert?

Wie lautet die URL Deines Servers (localhost?)?

Sind Cookies uneingeschränkt erlaubt im Browser für diesen Server? Welcher Browser?

Wie lautet der Pfad für session.save_path in php.ini? Gibt es dieses Verzeichnis?

MfG
Scory
Scory
 

Postby calvador » 12. December 2007 23:01

in der php.ini gibt es folgende einträge mit:

;session.save_path = "/tmp"

; session.save_path = "N;MODE;/path"

; session.save_path = "N;/path"

Die php.ini gibt es einmal im Windows-Verzeichnis und dann noch im php5-Ordner. Welche wird ausgeführt, ist ausschlaggebend?




habe mal hier die, denke ich, wichtigen passagen der config.inc.php


* Server(s) configuration
*/
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension'] = 'mysql'; // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
// (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables).
// The controluser is also
// used for all relational
// features (pmadb)
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
// with 'config' auth_type)
$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
// this db is displayed in left frame
// It may also be an array of db-names, where sorting order is relevant.
$cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features
// (see scripts/create_tables.sql)
// - leave blank for no support
// DEFAULT: 'phpmyadmin'
$cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table
// - leave blank for no bookmark support
// DEFAULT: 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc)
// - leave blank for no relation-links support
// DEFAULT: 'pma_relation'
$cfg['Servers'][$i]['table_info'] = ''; // table to describe the display fields
// - leave blank for no display fields support
// DEFAULT: 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF schema
// - leave blank for no PDF schema support
// DEFAULT: 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf
// - leave blank if you don't want to use this
// DEFAULT: 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
// - leave blank for no column comments/mime types
// DEFAULT: 'pma_column_info'
$cfg['Servers'][$i]['history'] = ''; // table to store SQL history
// - leave blank for no SQL query history
// DEFAULT: 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables
// are up to date. This prevents compatibility
// checks and thereby increases performance.
$cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root login
$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
= '';
$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
= array();


$i++;
$cfg['Servers'][$i]['host'] = '';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable'] = ''; // 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = ''; // 'pma_relation'
$cfg['Servers'][$i]['table_info'] = ''; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = ''; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = ''; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = ''; // 'pma_column_info'
$cfg['Servers'][$i]['history'] = ''; // 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE;
$cfg['Servers'][$i]['AllowRoot'] = TRUE;
$cfg['Servers'][$i]['AllowDeny']['order']
= '';
$cfg['Servers'][$i]['AllowDeny']['rules']
= array();

$i++;
$cfg['Servers'][$i]['host'] = '';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable'] = ''; // 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = ''; // 'pma_relation'
$cfg['Servers'][$i]['table_info'] = ''; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = ''; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = ''; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = ''; // 'pma_column_info'
$cfg['Servers'][$i]['history'] = ''; // 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE;
$cfg['Servers'][$i]['AllowRoot'] = TRUE;

$cfg['Servers'][$i]['AllowDeny']['order']
= '';
$cfg['Servers'][$i]['AllowDeny']['rules']
= array();

// If you have more than one server configured, you can set $cfg['ServerDefault']
// to any one of them to autoconnect to that server when phpMyAdmin is started,
// or set it to 0 to be given a list of servers without logging in
// If you have only one server configured, $cfg['ServerDefault'] *MUST* be
// set to that server.
$cfg['ServerDefault'] = 1; // Default server (0 = no default server)
$cfg['Server'] = '';
unset($cfg['Servers'][0]);


Vielleicht noch meine Ordnerstruktur:

E:\Server\Apache2\
E:\Server\php5\
E:\Server\mysql\
E:\Server\htdocs\
E:\Server\htdocs\phpMyAdmin\
calvador
 
Posts: 4
Joined: 12. December 2007 16:53
Location: NRW

Postby sari42 » 13. December 2007 03:02

;session.save_path = "/tmp"
ist auskommentiert, MUSS aber auf ein Dir zeigen, in dem php Schreibrechte hat, z.B.:
session.save_path = "c:\windows\temp"
(cmd:"set")

welche php.ini gilt sagt
<?PHP
phpinfo();
?>
bei mir: Loaded Configuration File D:\xampplite\apache\bin\php.ini
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby calvador » 13. December 2007 09:35

zuerst nochmal der hinweis, das ich vorher nie etwas mit mysql zutun hatte. bin eher der hardware-typ. also bitte schreiben, wie für ein kleinkind. Danke!


sari42 wrote:;session.save_path = "/tmp"
ist auskommentiert, MUSS aber auf ein Dir zeigen, in dem php Schreibrechte hat, z.B.:
session.save_path = "c:\windows\temp"
(cmd:"set")


habe das jetzt mal ausprobiert, bin aber zu keinem erfolg gekommen.

Vielleicht habe ich ja bei der installation von MySql einen fehler gemacht. phpMyAdmin habe ich übrigens komplett von einem freund übernommen, der genau die gleiche ordnerstruktur mit E:/Server usw. hat wie ich.


sari42 wrote:welche php.ini gilt sagt
<?PHP
phpinfo();
?>
bei mir: Loaded Configuration File D:\xampplite\apache\bin\php.ini


in welcher datei muss diese zeile stehen?

vielleicht sollte ich MySql und PHP nochmal neu installieren nach einer brauchbaren verständlichen anleitung. gibts da eine? am Apache kanns ja eigentlich nicht liegen!?

Bitte Hilfe! Möchte so gerne weiterartbeiten. Macht nämlich Spaß!

Gruß

Calvador




P.S.

habe grad gesehen, das noch einige Dateien mit Schreibschutz belastet waren und habe den kompletten Ordner E:/Server davon befreit.

Nun bekomme ich eine neue Fehlermeldung. Hier guckst Du:

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

Error
MySQL said:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)


Invalid hostname for server 2. Please review your configuration.
Invalid hostname for server 3. Please review your configuration
calvador
 
Posts: 4
Joined: 12. December 2007 16:53
Location: NRW

Postby Scory » 13. December 2007 11:57

Zunächst mußt Du eine Masse Zeilen in config.inc.php löschen und zwar diesen ganzen Block:

Code: Select all
$i++;
$cfg['Servers'][$i]['host'] = '';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable'] = ''; // 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = ''; // 'pma_relation'
$cfg['Servers'][$i]['table_info'] = ''; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = ''; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = ''; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = ''; // 'pma_column_info'
$cfg['Servers'][$i]['history'] = ''; // 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE;
$cfg['Servers'][$i]['AllowRoot'] = TRUE;
$cfg['Servers'][$i]['AllowDeny']['order']
= '';
$cfg['Servers'][$i]['AllowDeny']['rules']
= array();

$i++;
$cfg['Servers'][$i]['host'] = '';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable'] = ''; // 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = ''; // 'pma_relation'
$cfg['Servers'][$i]['table_info'] = ''; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = ''; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = ''; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = ''; // 'pma_column_info'
$cfg['Servers'][$i]['history'] = ''; // 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE;
$cfg['Servers'][$i]['AllowRoot'] = TRUE;

$cfg['Servers'][$i]['AllowDeny']['order']
= '';
$cfg['Servers'][$i]['AllowDeny']['rules']
= array();

// If you have more than one server configured, you can set $cfg['ServerDefault']
// to any one of them to autoconnect to that server when phpMyAdmin is started,
// or set it to 0 to be given a list of servers without logging in
// If you have only one server configured, $cfg['ServerDefault'] *MUST* be
// set to that server.
$cfg['ServerDefault'] = 1; // Default server (0 = no default server)
$cfg['Server'] = '';


Übrig bleibt darüber der erste Block, wo die Datenbankszugangsdaten drin sind. Dort ist für User 'root' kein Passwort angegeben - das scheint nicht zu stimmen, dort muss das richtige Passwort hin (das kennst nur DU, bevor Du hier fragst). Das sind diese Zeilen:

Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed


Da muss in der 'password' Zeile rechts ein Passwort stehen, nicht ein leerer String.

Da Du totaler Anfänger bist und auch noch komischerweise ausgerechnet HIER im Forum fragst: wieso schmeißt Du den ganzen Müll nicht runter und installierst das Xampp Paket? Das ist genau Sinn und Zweck von Xampp, dass man nicht so kenntnisfrei rumhampelt. Dann ist alles fertig installiert, mit Apache, MySQL, Php, PhpMyAdmin und vieles mehr.

Grüße
Scory
Scory
 

Postby calvador » 13. December 2007 19:48

so, jetzt klappt es auch bei mir, nachdem ich das password eingetragen habe.
abes es klappt nichtmehr, wenn ich die blöcke wie vorgeschlagen auskommentiere bzw. lösche!?


habe dann in mysql auch noch diese fehlermeldung:

Invalid hostname for server 2. Please review your configuration.
Invalid hostname for server 3. Please review your configuration.
Your PHP MySQL library version 4.1.7 differs from your MySQL server version 5.0.27. This may cause unpredictable behavior.


kann aber trotzdem arbeiten.

Soweit erstmal vielen Dank!

P.S. Das mit dem Xampp Paket hätte mir ja mal jemand vor drei tagen sagen sollen. Egal! Irgendwie macht es mit problemen doch viel mehr spass. :-)
calvador
 
Posts: 4
Joined: 12. December 2007 16:53
Location: NRW

Postby Scory » 13. December 2007 22:01

calvador wrote:Irgendwie macht es mit problemen doch viel mehr spass. :-)


Dir vielleicht - aber immer dieselbt Blödfragen zu beantworten ist wenig spaßig. Wie wäre es, wenn Du mal ein paar Antworten gibst? Immer die gleichen Antworten auf immer die gleichen Fragen.
Scory
 

Postby sari42 » 14. December 2007 17:15

abes es klappt nichtmehr, wenn ich die blöcke wie vorgeschlagen auskommentiere bzw. lösche!?

da fehlt ja auch $i=1; davor.
--
<?PHP
phpinfo();
?>
ist ein selbststängiges Skript, erzeugt mit einem geeigneten Editor, gespeichert als info.php (z.B.) in deinem webspace.

Es lohnt sich tatsächlich immer noch, den ganzen alten Müll zu entsorgen (vorher Dienste stoppen und entfernen!) und xampp zu installieren! (wir können dann auch besser helfen)
sari42
 
Posts: 800
Joined: 27. November 2005 18:28


Return to phpMyAdmin

Who is online

Users browsing this forum: No registered users and 15 guests