Welcome Guest, Not a member yet? Register   Sign In
Teach me how to program
#21

(This post was last modified: 02-17-2016, 03:24 AM by ciadmin.)

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.
Reply
#22

(This post was last modified: 02-17-2016, 03:49 AM by keulu.)

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
Reply
#23

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
); 
" If I looks more intelligence please increase my reputation."
Reply
#24
Thumbs Down 

You should leave programming.
Web Developer
Reply
#25

(This post was last modified: 02-19-2016, 01:22 AM by davy_yg.)

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
); 
" If I looks more intelligence please increase my reputation."
Reply
#26

(This post was last modified: 02-20-2016, 12:16 AM by Php.)

(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:
'username' => 'root'
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
); 
Web Developer
Reply
#27

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 streamNo 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 
" If I looks more intelligence please increase my reputation."
Reply
#28

(This post was last modified: 02-20-2016, 02:50 AM by Php.)

(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 streamNo 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. !!
Web Developer
Reply
#29

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.
" If I looks more intelligence please increase my reputation."
Reply
#30

(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 streamNo 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.
" If I looks more intelligence please increase my reputation."
Reply




Theme © iAndrew 2016 - Forum software by © MyBB