CodeIgniter Forums
After moving from one provider to another I get white screen of death - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: After moving from one provider to another I get white screen of death (/showthread.php?tid=53386)



After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]term25[/eluser]
I have moved from my localhost where everything works great to a production server and everything works as on my localhost without problems.

Then I have moved to another provider and problems started.

So, when I went to my homepage and I get a WSOD. I tried to remove the index.html file in the root and it works.

My question is why?

Is this problem of the server. What should they changed so I can leave index.html leave in my root?

I think it is better for security reason to have index.html in the root folder.

Please explain why index.html is causing the problems.

Thanks in advance.


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]Aken[/eluser]
There's no reason to have both index.php and index.html, and definitely no "security benefits".

And it's not a "problem", just a server configuration. http://en.wikipedia.org/wiki/Webserver_directory_index


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]term25[/eluser]
Yeah, you are right, thanks. On the old hosting I have also index.html and it is wokring so maybe they have index.php as priority in their server config. It's strange.

However, I have removed it and now the homepage works, but I have another problem when submitting forms or redirects in general.

I get WSOD when there is a redirect in the method/function. I have tried

redirect('admin', 'refresh');

and also

redirect('admin', 'location', 301);

and

redirect('admin');

but in all cases it still gives me only a white screen of death.

e.g. after loging at:

http://www.example.com/admin

it redirects me correctly to

http://www.example.com/admin/login

so I assume that redirect is OK.

But after submiting a form (and the validation is OK) it do not redirect me at all.

So I assume it might be a problem with submiting forms or something. But at the same time I am logged in so, the sessions are working.

Then I need to type manually http://www.example.com/admin again so I can go to my admin area.


Any idea what can cause this strange problem?

On the previous hosting provider it was working perfectly.


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]Aken[/eluser]
White screen means there's an error, but displaying it is turned off. Search these forums or Google for enabling error display in PHP.


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]term25[/eluser]
Ok after changing to development mode and showing all errors I am getting these errors:


A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /www/doc/www.example.com/home/application/language/english/form_validation_lang.php:1)

Filename: libraries/Session.php

Line Number: 672
A PHP Error was encountered



Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /www/doc/www.example.com/home/application/language/english/form_validation_lang.php:1)

Filename: helpers/url_helper.php

Line Number: 544



What is worng with form_validation_lang.php?


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]Aken[/eluser]
Check for white space or other characters before the opening PHP tag in that form_validation file.


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]term25[/eluser]
There is no whitespace in that file. I have checked it. Nothing before <?php


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]term25[/eluser]
Everything was working great on the first host. I haven't change anything in this file after moving to the new server.


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]Aken[/eluser]
Then try re-uploading it or something. That's where the error is coming from.


After moving from one provider to another I get white screen of death - El Forum - 07-22-2012

[eluser]term25[/eluser]
SOLVED!!!!!!!!!!!!

The #$%^& BOM was the problem. So, for anybody who is using editors like Sublime 2 etc. where you do not directly see this info e.g. UTF-8 without BOM or UTF-8 with BOM don't forget to save it WITHOUT BOM !!!

Anyway, thanks Aken for pointing me the right direction.