RE: CI3 - ciadmin - 02-17-2016
Read the manual - you are not configuring your access correctly, and using this thread to debug your code instead.
Read the error messages - you do not have the correct username/password combination.
RE: CI3 - keulu - 02-17-2016
did gsaconst_admin user can access to the database with the hostname "locahost" ? try maybe with 127.0.0.1
try "root" as username without password
RE: CI3 - davy_yg - 02-17-2016
http://127.0.0.1/ci3/
---------------------------------------------------------------
I still receive this error message:
A PHP Error was encountered
Severity: Warning
Message: mysqli::real_connect(): (HY000/1044): Access denied for user ''@localhost to database 'gsaconst_database'
Filename: mysqli/mysqli_driver.php
Line Number: 202
Backtrace:
File: C:\xampp\htdocs\ci3\application\core\MY_Controller.php
Line: 7
Function: __construct
File: C:\xampp\htdocs\ci3\application\controllers\home.php
Line: 9
Function: __construct
File: C:\xampp\htdocs\ci3\index.php
Line: 292
Function: require_once
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: C:/xampp/htdocs/ci3/application/core/MY_Controller.php
Line Number: 7
I delete the password.
database.php
PHP Code: $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'gsaconst_admin', 'password' => '', 'database' => 'gsaconst_database', 'dbdriver' => 'mysqli', 'dbprefix' => 'pix_', 'pconnect' => TRUE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
RE: CI3 - Php - 02-17-2016
You should leave programming.
RE: CI3 - davy_yg - 02-19-2016
sorry still new. I still lots to learn.
Another error that I do not understand.
--------------------
A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257
A PHP Error was encountered
Severity: Warning
Message: require_once(C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php): failed to open stream: No such file or directory
Filename: database/DB.php
Line Number: 140
Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gsa\system\database\DB.php on line 140
database.php
PHP Code: $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'gsaconst_admin', 'password' => '', 'database' => 'gsaconst_database', 'dbdriver' => 'mysqli', 'dbprefix' => 'pix_', 'pconnect' => TRUE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
RE: CI3 - Php - 02-20-2016
(02-19-2016, 01:22 AM)davy_yg Wrote: sorry still new. I still lots to learn.
Another error that I do not understand.
--------------------
A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257
A PHP Error was encountered
Severity: Warning
Message: require_once(C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php): failed to open stream: No such file or directory
Filename: database/DB.php
Line Number: 140
Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gsa\system\database\DB.php on line 140
database.php
PHP Code: $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'gsaconst_admin', 'password' => '', 'database' => 'gsaconst_database', 'dbdriver' => 'mysqli', 'dbprefix' => 'pix_', 'pconnect' => TRUE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
Change
PHP Code: 'username' => 'gsaconst_admin',
to
PHP Code: $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'youdb_name', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
RE: CI3 - davy_yg - 02-20-2016
PHP Code: A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257 A PHP Error was encountered
Severity: Warning
Message: require_once(C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php): failed to open stream: No such file or directory
Filename: database/DB.php
Line Number: 140
Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gsa\system\database\DB.php on line 140
RE: CI3 - Php - 02-20-2016
(02-20-2016, 01:05 AM)davy_yg Wrote: PHP Code: A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257 A PHP Error was encountered
Severity: Warning
Message: require_once(C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php): failed to open stream: No such file or directory
Filename: database/DB.php
Line Number: 140
Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gsa\system\database\DB.php on line 140
OKEY..!!
Send me your Whole Source code with database i will fix them.
OR
other solution is delete your system folder from your project and download latest CI3 from www.codeigniter.com and copy only system folder and update in your project.
Should work. !!
RE: Teach me how to program - davy_yg - 02-20-2016
Hello,
Thanks for helping.
Okay. Here I attached the file for you. Perhaps it might help:
http://www.innovation.web.id/gsa/
Please download the above file in order to get both gsa website file and it's database.
After helping me to fix the file please attached the file back so that I can access the corrected file.
Thanks in advance.
RE: CI3 - davy_yg - 02-21-2016
(02-20-2016, 02:46 AM)Php Wrote: (02-20-2016, 01:05 AM)davy_yg Wrote: PHP Code: A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257 A PHP Error was encountered
Severity: Warning
Message: require_once(C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php): failed to open stream: No such file or directory
Filename: database/DB.php
Line Number: 140
Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gsa\system\database\DB.php on line 140
OKEY..!!
Send me your Whole Source code with database i will fix them.
OR
other solution is delete your system folder from your project and download latest CI3 from www.codeigniter.com and copy only system folder and update in your project.
Should work. !!
Hello,
Can you eventually fix it by the way?
Thanks in advance.
|