Error downloading a site made in CodeIgniter for my machine localhost [closed]

-1

I downloaded a website already made with the codeigniter framework on my machine, put it in localhost but it has the error "", I think I need to define the database, if so, how do I do this?

Is there any file like wordpress that has wp-config?

    
asked by anonymous 07.09.2016 / 19:47

1 answer

1

Since you did not say what the error is, just "" it is difficult to hit accurately. But come on, one hour is right.

If the site needs to connect to a banco de dados , you need to have it created on your machine¹, either mysql , postgres , sqlite etc, and imagining that you are not able to access that site by your machine for this error, then to set the connection to that database, go to /application/config/ and change the database.php file in the following lines:

'hostname' => 'localhost',
'username' => 'usuario_dono_do_banco',
'password' => 'senha',
'database' => 'nome_do_banco',
'dbdriver' => 'mysqli',

In% with% leave as dbdriver if it is MySQL, and 'mysqli' if it is PostgreSQL.

More questions about connecting to 'postgre' can be strips in the official banco de dados .

Another important point to look at is if the site you have at hand, if in the root structure there is a ci file, where it often defines that .htaccess can become shorter, using url of mod_rewrite . Then, refer to this by running a apache file with the following line:

<?php print_r(apache_get_modules()); ?>

Consider verifying that the .php module appears in the listing. If it does not appear, use the command mod_rewrite in the terminal if it is sudo a2enmod rewrite or consider deleting the linux/ubuntu file.

¹ If remote access to the existing database is not possible.

    
07.09.2016 / 21:23