0

I did not use Tsodeigniter but now got a working site that was another hosting. Once you run it you get this: address : 95.87.255.162 just waiting and nothing loaded in the Apache log file nothing. My settings config file are:

$ Active_group = 'default';
$ Active_record = TRUE;

$ Db ['default'] ['hostname'] = 'localhost';
$ Db ['default'] ['username'] = 'MYUSER';
$ Db ['default'] ['password'] = 'MYPASS';
$ Db ['default'] ['database'] = 'MYDATABASE';
$ Db ['default'] ['dbdriver'] = 'mysqli';
$ Db ['default'] ['dbprefix'] ='';
$ Db ['default'] ['pconnect'] = FALSE;
$ Db ['default'] ['db_debug'] = FALSE;
$ Db ['default'] ['cache_on'] = FALSE;
$ Db ['default'] ['cachedir'] ='';
$ Db ['default'] ['char_set'] = 'utf8';
$ Db ['default'] ['dbcollat'] = 'utf8_general_ci';
$ Db ['default'] ['swap_pre'] ='';
$ Db ['default'] ['autoinit'] = TRUE;
$ Db ['default'] ['stricton'] = FALSE;

(MYUSER, MADATABASE, MYPASS) are real. However, if wrong some of these things the site is loaded but only starting and other static pages, those recorded as "page" in the database does not open, gives 404. In the wrong data to the base and change $ db ['default'] ['db_debug'] = TRUE;

gives error:

Error reading the database.
Unable to connect to your database server using the provided settings.
Filename: core / Loader.php
Line Number: 268

The same happens if (MYUSER, MADATABASE, MYPASS) are correct and change localhost to 127.0.0.1. As I wrote nothing in error_log and access_log only get:

xxx.xxx.xxx.xxx - [03/Jun/2013: 07:01:03 0300] "GET / en / home HTTP/1.1" 200 -
My system is centos, php 5.1.6 mysql 5.1, codeigniter 2.0.3
Yogus
  • 2,307
  • 5
  • 20
  • 38
vandeto
  • 1
  • 2

2 Answers2

0

codeigniter 2.0.3 , try to change mysql driver from mysqli into mysql. and in your database config, set debug to true too see what happens, and open your codeigniter log file in application/logs/{date}.php

i don't know if it's a bug or not cause i've faced this before, when configure my site using mysqli driver the site going slow. i've not tested yet in the public hosting.

achy
  • 31
  • 4
  • in case of a $ Db ['default'] ['db_debug'] = TRUE; and real data (verified user, password, database) nothing changes, still cycles browser and nothing ... I changed mysql driver 'mysql' and again nothing. In the log directory (application / logs / date), there is nothing there that is older than 2011. Directory is writable by apache, test. Other ideas? – vandeto Jun 03 '13 at 04:34
  • open application/config/config.php and set $config['log_threshold'] = 4; – achy Jun 03 '13 at 04:37
  • please see -> http://stackoverflow.com/questions/7254049/codeigniter-unable-to-connect-to-your-database-server-using-the-provided-settin – achy Jun 03 '13 at 04:50
  • looked at it and it tested but found no solution there. – vandeto Jun 03 '13 at 18:20
  • have you tried access mysql server using phpmyadmin? if you can play with phpmyadmin using the same credentials in your codeigniter config database, then. there must be something's wrong with your codeigniter app config/installation. try to reinstall the core class, and try to make a simple access database connection with it. if you can passed it, i believe, there some library/plugin in your codeigniter configuration prevent the access and halt with throwing an error. – achy Jun 03 '13 at 21:36
  • as a reference too. try to read the link , cause some user have the same problem too. he hosted his application using openshift, when he started to build the demo site and not finished yet, everything just fine, but after he completed the site, he faced the same problem as yours . :) , just take a look at this https://www.openshift.com/forums/openshift/unable-to-connect-to-your-database-server-using-the-provided-settings – achy Jun 03 '13 at 21:50
  • I installed a brand new CodeIgniter v. 2.0.3 as is inoperative. Infusions of the database are the same, that is read the same database. I wrote a test controler and view files in the controller read yuzerite table, that only verified user id1 and in view print it: 95.87.255.163 (you can see here). Everything works so limiting problem in any of the written components of the previous enclosing the site. That is, it's working site but now the owners transferred it to me and this is my backup that was sent. – vandeto Jun 04 '13 at 10:35
0

in my / application / log / {date} came after DEBUG:

DEBUG - 2013-06-03 21:21:30 --> Config Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Hooks Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Utf8 Class Initialized
DEBUG - 2013-06-03 21:21:30 --> UTF-8 Support Enabled
DEBUG - 2013-06-03 21:21:30 --> URI Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Router Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Output Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Security Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Input Class Initialized
DEBUG - 2013-06-03 21:21:30 --> CRSF cookie Set
DEBUG - 2013-06-03 21:21:30 --> Global POST and COOKIE data sanitized
DEBUG - 2013-06-03 21:21:30 --> Language Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Config file loaded: ../application/config/lang.php
DEBUG - 2013-06-03 21:21:30 --> Loader Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Config file loaded: ../application/config/machina.php
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: common_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: url_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: form_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: html_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: markdown_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: language_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: string_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: date_helper
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: widget_helper
DEBUG - 2013-06-03 21:21:30 --> Language file loaded: language/english/general_lang.php
DEBUG - 2013-06-03 21:21:30 --> Database Driver Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Session Class Initialized
DEBUG - 2013-06-03 21:21:30 --> A session cookie was not found.
DEBUG - 2013-06-03 21:21:30 --> Session routines successfully run
DEBUG - 2013-06-03 21:21:30 --> Config file loaded: ../application/config/ion_auth.php
DEBUG - 2013-06-03 21:21:30 --> Email Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Session class already loaded. Second attempt ignored.
DEBUG - 2013-06-03 21:21:30 --> Language file loaded: language/english/ion_auth_lang.php
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Helper loaded: cookie_helper
DEBUG - 2013-06-03 21:21:30 --> Session class already loaded. Second attempt ignored.
DEBUG - 2013-06-03 21:21:30 --> Carabiner: Library initialized.
DEBUG - 2013-06-03 21:21:30 --> Config file loaded: ../application/config/carabiner.php
DEBUG - 2013-06-03 21:21:30 --> Carabiner: config loaded from config file.
DEBUG - 2013-06-03 21:21:30 --> Carabiner: library configured.
DEBUG - 2013-06-03 21:21:30 --> Simple ACL library initialized
DEBUG - 2013-06-03 21:21:30 --> Controller Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
DEBUG - 2013-06-03 21:21:30 --> Model Class Initialized
vandeto
  • 1
  • 2