Welcome Guest, Not a member yet? Register   Sign In
autoload database library problem
#1

[eluser]kosko[/eluser]
Hello,

I have a problem with autoload database library (ci 1.7.2). If i include it in autoload (clean copy of ci, tried to get welcome message) and reload page in browser, I don't get anything, just blank page (no source code). I tried the same with session library, and it worked. Also, I didn't find database class in system/library dir, is it ok?!
#2

[eluser]Mr. Pickle[/eluser]
Try posting some of your code here.
#3

[eluser]kosko[/eluser]
I have no any extra code inside a project. Only changes I made are setup db connection and included database library in autoload.
#4

[eluser]Clooner[/eluser]
Probably an error in what you have changed. Try enabling the display of errors to find the error!
#5

[eluser]kosko[/eluser]
I already did it, and the same thing happens with or w/o enabled error logging, I get blank page. If I only could get any error, probably I would solve this issue.

Here is what I changed, but I'm not sure it will help :

autoload.php :

$autoload['libraries'] = array('database');


database.php :

$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "";
$db['default']['database'] = "ad";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
#6

[eluser]Clooner[/eluser]
When you say you have error logging enabled you mean what exactly?

Put this in the index.php of the root of your project. to display errors correctly.

error_reporting(E_ALL);
ini_set('display_errors', 1);

What do your webserver log files say when you acces the page?
#7

[eluser]Tom Taila[/eluser]
i know it sounds obvious, but have you tried redownloading the .rar file and extracting it?

this is how my config database file looks:
Code:
$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "";
$db['default']['database'] = "gvg1";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

and this is hwo my auto load looks :
Code:
|
| Prototype:
|
|    $autoload['libraries'] = array('database', 'session', 'xmlrpc');
*/

$autoload['libraries'] = array('database', 'session');

compare mine with yours and see if maybe something is different
#8

[eluser]kosko[/eluser]
Thank you all for helping me, I've finally solved my problem. I debugged CI initialization and found that php mysql modul wasn't loaded properly because there were some 'garbage' from previous php, which I had installed, in system folder.
#9

[eluser]mandazi[/eluser]
[quote author="kosko" date="1274495181"]Thank you all for helping me, I've finally solved my problem. I debugged CI initialization and found that php mysql modul wasn't loaded properly because there were some 'garbage' from previous php, which I had installed, in system folder.[/quote]

I have the same issue with adding 'database' and 'session' to autoload and then the reloaded page is blank. I have php error reporting on and still nothing. Can you explain further of what php mysql module wasn't loading properly for you?
#10

[eluser]mandazi[/eluser]
[quote author="mandazi" date="1310961964"][quote author="kosko" date="1274495181"]Thank you all for helping me, I've finally solved my problem. I debugged CI initialization and found that php mysql modul wasn't loaded properly because there were some 'garbage' from previous php, which I had installed, in system folder.[/quote]

I have the same issue with adding 'database' and 'session' to autoload and then the reloaded page is blank. I have php error reporting on and still nothing. Can you explain further of what php mysql module wasn't loading properly for you?[/quote]

im an idiot. the php mysql extension was commented out in php.ini. that's why.

solved my issue.




Theme © iAndrew 2016 - Forum software by © MyBB