Welcome Guest, Not a member yet? Register   Sign In
Mysqli Database autoload makes screen blank on linux host
#1

[eluser]Deepan[/eluser]
Hello

I wrote a simple controller which accesses database
Using codeigniter 1.6.3
autoloading database library in the autoload.php
with configuration
$db[‘default’][‘dbdriver’] = “mysql”;
on windows.

Everything works fine but when i upload the whole thing to my host (linux based) everything goes blank. Error reporting enabled. No PHP errors , no Codeigniter logs and no trace of anything. Screen goes blank for all controllers.


Any ideas ?

Thanks in advance
Deepan
#2

[eluser]George Ornbo[/eluser]
Sounds like a good scenario for step by step debugging

* Can you run PHP on the server?
* Is MySQL running?
* What point is the script failing at - comment out lines / add echos into the code to isolate the fail point

Bit difficult to say from afar why the blank screen is happening but with a bit of debugging should be straight forward
#3

[eluser]Deepan[/eluser]
Hi ,
Thanks for reply.In server mysql is running and I accessed using the linux command prompt.
When I am commenting the active record part(ie. databse code) pages working fine.And if I am removed the $autoload['libraries'] = array('database'); in autoload.php Its showing the error "Message: Undefined property: UserModel::$db"

Thanks
Deepan
#4

[eluser]lmv4321[/eluser]
Can you post the code from your initial controller?
#5

[eluser]Deepan[/eluser]
I got the issue causing blank screen.Actually the mysql in installed in the linux server and i can run the mysql from linux comment prompt.But it not assosiated to the php in the apache.

I run the php code <? echo phpinfo()?> and found mysql installation not associated with php Confusedmirk: .

Thanks all for your replys

Deepan
#6

[eluser]abszint[/eluser]
I had this problem 2 times:

first time i did not have php5-mysql installed. fix: sudo apt-get install php5-mysql php5-mysqli

second time the log dir was not writable. fix: chmod 777 -R system/logs




Theme © iAndrew 2016 - Forum software by © MyBB