Welcome Guest, Not a member yet? Register   Sign In
blank page when use $this->load->database('default');
#1

[eluser]jparent[/eluser]
Hi! I was using CI 1.7.2 under XAMPP and I hadn't got any problem with it. Now I'm using apache 2.2.14 with the lastet version of php 5.3.2

Now, when I put in the model that string: $this->load->database('default');
I only recive a blank page. I think is something on my configuration:

I have apache at: C:\apache2.2.14
I have php at C:\php

My httpd-php.conf is at C:\apache2.2.14\conf\extra

and it's content is:

#load the php main library to avoid dll hell
LoadFile "C:\php\php5ts.dll"

#load the sapi so that apache can use php
LoadModule php5_module "C:\php\php5apache2_2.dll

#set the php.ini location so that you don't have to waste time #guessing where it is
PHPIniDir "C:\php"

#Hook the php file extensions
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

#Directory Index
DirectoryIndex index.php

My database.php file at config have that content:

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

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "xxxx"; //that's the password (secret)
$db['default']['database'] = "yyyyy"; //that's the name of DB (secret)
$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";

I don't touch anything else. All is with default settings. What can be the problem? Thanks!
#2

[eluser]kierownik[/eluser]
I think it should be just $this->load->database();
#3

[eluser]jparent[/eluser]
Nop! I've tried it and the error its the same: blank page. I think is something wrong with apache or php because when I try it in a XAMPP enviroment it works.
#4

[eluser]jparent[/eluser]
I've tried to install "OpenBlog" and it doesn't work too. I think is not CI problem, it's my WAMP enviroment. Anybody could tell me a good about some good tutorial or guide to install properly a WAMP enviroment with
Apache 2.2.14, PHP 5.3.2 and MySQL Server 5.1 Not a XAMPP or APPSERV applicattions please. Thanks!! Smile
#5

[eluser]jparent[/eluser]
Ok Ok Ok!!! I review my php.ini file and I found the problem! Incredible!!! By default at php.ini shor_open_tag is set to ON, when I switch it to OFF it works!!! jejeje I don`t now why... if anybody could explain me it... thanks!!!
#6

[eluser]kierownik[/eluser]
maby you can check $config['rewrite_short_tags'] = FALSE; and set that to true.

do not know anything about those things but you can check it. It is in the config file.
#7

[eluser]Unknown[/eluser]
hi!
I was looking for 3 or 4 hours today because I had the same issue.
Then I found the solution in this forum.
I could solve the problem by activating mysql in php5. I have Ubuntu and I had to install the package "php5-mysql". On a windows platform I guess the moduleload-section for mysql has to be uncommented.
For specific information on mysql and php5 you have to take a look on the internet.
Hope that helps. Actually it solved my "blank-page-problem".
#8

[eluser]Unknown[/eluser]
[quote author="mightyplow" date="1281747513"]hi!
I was looking for 3 or 4 hours today because I had the same issue.
Then I found the solution in this forum.
I could solve the problem by activating mysql in php5. I have Ubuntu and I had to install the package "php5-mysql". On a windows platform I guess the moduleload-section for mysql has to be uncommented.
For specific information on mysql and php5 you have to take a look on the internet.
Hope that helps. Actually it solved my "blank-page-problem".[/quote]

I'm on Elementary OS (Luna) with PHP Version 5.3.10-1ubuntu3.9, Apache 2.2.22 and CodeIgniter 2.1.4 I've installed 'php5-mysql' package and it solved my 'blank-page-problem' too!

Really very thanks @mightyplow!




Theme © iAndrew 2016 - Forum software by © MyBB