installazione

Sergio88

New member
Ciao,
ecco il mio problema durante l'installazione

[06] Error: during database connection.
The DBMS server said: SQLSTATE[HY000] [1045] Access denied for user 'Sergio'@'localhost' (using password: YES)
( ! ) Notice: Undefined variable: conn in C:\wamp\www\TripAdvisorCT\include\db_functions_pdo.php on line 54
Call Stack
# Time Memory Function Location
1 0.0173 707672 {main}( ) ..\index.php:0
2 0.0487 2892312 include( 'C:\wamp\www\TripAdvisorCT\include\common_start.php' ) ..\index.php:20
3 0.0491 2911176 connect_db( ) ..\common_start.php:44

( ! ) Fatal error: Call to a member function query() on a non-object in C:\wamp\www\TripAdvisorCT\include\db_functions_pdo.php on line 96
Call Stack
# Time Memory Function Location
1 0.0173 707672 {main}( ) ..\index.php:0
2 0.0487 2892312 include( 'C:\wamp\www\TripAdvisorCT\include\common_start.php' ) ..\index.php:20
3 0.0515 2921608 build_tables_names_array( ) ..\common_start.php:99
4 0.0515 2922064 get_tables_list( ) ..\business_logic.php:489
5 0.0515 2922448 execute_db( ) ..\db_functions_pdo.php:319
 

eugenio

Administrator
Staff member
L'errore riportato e' "Access denied for user 'Sergio'@'localhost'", quindi molto probabilmente lo username o la password non sono corrette o comunque l'utente sergio non ha i diritti per accedere al database.
E' necessario comunque riportare tutti i dettagli richiesti dal forum:

"Per ricevere supporto è obbligatorio specificare tutti i dettagli relativi all'installazione: versione di DaDaBIK, browser, sistema operativo, DBMS (es. Mysql 5.1.47), Web server (es. Apache 2.2.16).
Se hai giù installato DaDaBIK e la versione è >= 5 è sufficiente andare nella sezione administration dell'installazione, cliccare su About/Check upgrade e copiare il contenuto della pagina nella richiesta di supporto.
Se stai riportando errori, posta il risultato dopo aver settato a 1 l'opzione debug_mode in config.php."
 

Sergio88

New member
Dadabik 5.1.2
Google Chrome
Windows 8 64-bit
MySQL 5.6.12
Apache 2.4.4

Ho provate anche ad inserire Username='root' e Password=' ', dà sempre lo stesso errore:

[06] Error: during database connection.
The DBMS server said: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
( ! ) Notice: Undefined variable: conn in C:\wamp\www\TripAdvisorCT\include\db_functions_pdo.php on line 54
Call Stack
# Time Memory Function Location
1 0.0160 707672 {main}( ) ..\index.php:0
2 0.0560 2892312 include( 'C:\wamp\www\TripAdvisorCT\include\common_start.php' ) ..\index.php:20
3 0.0563 2911176 connect_db( ) ..\common_start.php:44

( ! ) Fatal error: Call to a member function query() on a non-object in C:\wamp\www\TripAdvisorCT\include\db_functions_pdo.php on line 96
Call Stack
# Time Memory Function Location
1 0.0160 707672 {main}( ) ..\index.php:0
2 0.0560 2892312 include( 'C:\wamp\www\TripAdvisorCT\include\common_start.php' ) ..\index.php:20
3 0.0581 2921600 build_tables_names_array( ) ..\common_start.php:99
4 0.0581 2922056 get_tables_list( ) ..\business_logic.php:489
5 0.0581 2922440 execute_db( ) ..\db_functions_pdo.php:319
 

eugenio

Administrator
Staff member
Ma l'utente e password inseriti sono in effetti corretti? Esiste nel db l'utente root senza password? L'host e' corretto (localhost?)
 

Sergio88

New member
localhost è corretto.
Io semplicemente ho creato un database con MySQL Workbench,
da dove li prendo username e password?
Perdonami ma sono alle primissime armi
 

eugenio

Administrator
Staff member
Vedo che come host hai usato "localhost" invece di "127.0.0.1", prova prima di tutto a cambiarlo con "127.0.0.1", se ancora non funziona sara' appunto un problema di username/password.

Se hai installato tu MySQL avrai dovuto ad un certo punto scegliere una password per root (forse l'hai lasciata in bianco ma non saprei) e/o aggiungere un nuovo utente con relativa passowrd, se non ti ricordi username e password purtroppo non posso aiutarti, DaDaBIK non ha accesso alle password di MySQL, prova a cercare qualche tutorial su come resettare la password di MySQL.
 

Sergio88

New member
No ho sempre inserito host='127.0.0.1'
Per quanto riguarda la password non ne ho mai inserita alcuna,
infatti nella linea di comando di MySQL entro senza inserirne alcuna.
E ho anche visto che a tutti i database a cui mi connetto tramite Workbench
lo faccio tramite 'root' e senza password.
 

eugenio

Administrator
Staff member
prova a copiare qua la prima parte di config.php (se non ci sono informazioni sensibili).
 

Sergio88

New member
// dbms type ('mysql' or 'postgres' or 'sqlite')
$dbms_type = 'mysql';

// DBMS server host
$host = '127.0.0.1'; // the name or the IP of the host where the DBMS is running (e.g. '127.0.0.1' if the DBMS and

the DaDaBIK scripts are in the same host) please use '127.0.0.1' instead of 'localhost' because 'localhost' can

give problems

// database name
$db_name = 'local_guide'; // for sqlite not only the name but 1) the full path is also needed (e.g.

'/my_databases/music_databases/songs.db') and 1) write permissions on the database file is needed for the Web

server

// database user
$user = 'root'; // this user must have select, insert, update, delete permissions, create and drop permissions are

also needed for installation, upgrade and administration area e.g. 'root'; for SQLite this parameter is not needed

// database password
$pass = ' '; // for sqlite this parameter is not needed

// DaDaBIK complete url (e.g. http://www.mysite.com/john/dadabik/)
$site_url = 'http://localhost/TripAdvisorCT/';

// DaDaBIK url path (e.g. if $site_url is http://www.mysite.com/john/dadabik/ this must be /john/dadabik/, put

slashes at the beginning and at the end; put just one slash '/' if DaDaBIK is installed in the root of a Website,

e.g. a $site_url like http://www.mysite.com PLEASE NOTE THAT THIS IS NOT THE PHYSICAL PATH IT IS JUST THE LAST

PART OF SITE_URL)
$site_path = '/TripAdvisorCT/';

// timezone, specify here your timezone (a list of available timezone here:

http://php.net/manual/en/timezones.php)
$timezone = 'Europe/Rome';

// secret_key: a long (60+ characters), random and complicated phrase which is used to sign authentication cookies

for this application and therefore improve authentication security; you don't need to remember this phrase
// please note that in order to benefit from this security mechanism you must choose a different secret_key for

each DaDaBIK application you create and you must keep this value secret
$secret_key = 'gta';

// dadabik_session_name: the name of the session for this DaDaBIK application, used to avoid unexpected and risky

effects if other applications installed in the same domain make use of the same session variable names that this

application use.
// it must contain only alphanumeric characters, with at least one letter; its length must be less than 100

characters and must be different than $secret_key; you don't need to remember this name
// please note that in order to benefit from this security mechanism you must choose a name which is unique among

session names used by other applications installed in the same domain
$dadabik_session_name = 'milan';
 

eugenio

Administrator
Staff member
La parte di secret_key e session_name va tenuta riservata, inoltre secret_key deve essere di almeno 60 caratteri.

Per quanto riguarda il problema della connessione se sei sicuro che root senza password sia un utente valido, prova anche con 'localhost' invece di '127.0.0.1', se non funziona probabilmente a questo punto l'unica spiegazione e' che non hai il supporto a PDO abilitato (http://www.dadabik.org/index.php?function=show_documentation#requirements).
 

eugenio

Administrator
Staff member
Se sei su windows non serve scaricare nulla, normalmente e' sufficiente aggiungere al php.ini (o decommentare se esistono gia')

extension=php_pdo.dll
extension=php_pdo_mysql.dll

ed eventualmente riavviare Apache
 
Top