0

My error >>>

An uncaught Exception was encountered

Type: ParseError

Message: syntax error, unexpected '<', expecting end of file

Filename: C:\wamp64\www\application\config\database.php

Line Number: 97


   $active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'localhost',
    'username' => 'root',
    'password' => '',
    'database' => 'sistema', // your database 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
);
?>

complete code https://pastebin.com/us3mycVT

Pavan Nagadiya
  • 652
  • 4
  • 10
Pedro HB
  • 15
  • 1
  • 6

1 Answers1

0

Remove the ?> at the end of that file.

Here you can find more information on why you shouldn't close the php tags on those files.

Why would one omit the close tag?

Looked at the original file sent by the user. Basically there was a hidden character in the file. Created a new database.php with original encoding and everything worked fine.

marcogmonteiro
  • 2,061
  • 1
  • 17
  • 26