Welcome Guest, Not a member yet? Register   Sign In
codeigniter without using any database
#1

[eluser]MV[/eluser]
Hi,

How can i configure codeigniter to not use any database?

I am designing the layout of a website using CI and, for now, i am not able to create any DB on the server, and i need to upload my work for the client to see. The problem is, if i do, i always get the "A Database Error Ocurred" message, obviously.

Is it even possible?

Thanks.
#2

[eluser]danmontgomery[/eluser]
Just don't load the database.
#3

[eluser]Udi[/eluser]
[quote author="MV" date="1267495094"]Hi,

How can i configure codeigniter to not use any database?

I am designing the layout of a website using CI and, for now, i am not able to create any DB on the server, and i need to upload my work for the client to see. The problem is, if i do, i always get the "A Database Error Ocurred" message, obviously.

Is it even possible?

Thanks.[/quote]

Make sure your not loading it in any resource that auto-loaded, AND not auto-load the database library itself.
#4

[eluser]MV[/eluser]
thats the thing, my autoload.php is not loading anything. its an almost empty project and the darn thing keeps giving me that error. Any tips on where the databases could be peeking out to give trouble?

Thanks.
#5

[eluser]Udi[/eluser]
Look at the controller you're accessing at the beginning, look at the resources it uses, maybe it extends MY_Controller that loads a DB?
#6

[eluser]danmontgomery[/eluser]
Ensure in config.php:
Code:
$config['sess_use_database']    = FALSE;
#7

[eluser]MV[/eluser]
Sorry to return, but if i locad the following model on my simple controller, i get that database error and it doesnt have any database handling in it. its freaking me out. :-P

class Murl_catchall extends Model {
function Murl_catchall(){
parent::Model();
}

function get_page(){

$caminho = substr($this->uri->uri_string(),4);

$dados = $caminho;

return $dados;

}

function lang_urls($lingua){

$dados = array();
$dados['muda_pt'] = base_url()."pt/".substr($this->uri->uri_string(),4);
$dados['muda_en'] = base_url()."en/".substr($this->uri->uri_string(),4);
$dados['muda_es'] = base_url()."es/".substr($this->uri->uri_string(),4);

return $dados;

}


}




Theme © iAndrew 2016 - Forum software by © MyBB