3

i have php 5.3.1 installed on apache2 in ubuntu 12.04 server . my site was working fine untill last week when i found some of the files were missing and website was not showing.I uploaded site again on server and now when i browse any php pages it shows a blank page and also when i try to see the source code in browser for the blank page it dosnt show any source code.the html files are all showing up.

i dont think it is the server or appache2 probelm as i have other site with php on the same server working fine. i checked with php files they are alrite.checked with the htacces.txt and that is same as the other working site on the same server. can anyone here help what the problem could be.

thanks

Rida

5
  • 2
    could you include the following code in the beginning of your scripts: error_reporting(E_ALL|E_STRICT); ini_set('display_errors', true); Commented Nov 25, 2013 at 0:10
  • 2
    White Screen Of Death usually means a server error. Look at your server error logs Commented Nov 25, 2013 at 0:10
  • @Matthew tip, at your "index.php". You could also add "echo 'test';exit;" after, to know if is the right file and if nothing after is automatically redirecting to another page Commented Nov 25, 2013 at 0:11
  • ye old symlinks not being followed... Commented Mar 5, 2018 at 0:50
  • also, possible that FastCGI is not configured properly.plz refer itsupportwale.com/blog/… Commented Nov 13, 2022 at 10:05

7 Answers 7

4

Check error logs in /var/log/apache2/error.log

Sign up to request clarification or add additional context in comments.

6 Comments

Hi i checked the error .log but cant make anything out of it.
Could you post at least the last 10 lines?
[Sun Nov 24 23:28:17 2013] [error] an unknown filter was not added: includes [Sun Nov 24 23:28:17 2013] [error] an unknown filter was not added: includes [Sun Nov 24 23:28:37 2013] [error] an unknown filter was not added: includes [Sun Nov 24 23:28:37 2013] [error] an unknown filter was not added: includes [Sun Nov 24 23:28:37 2013] [error] an unknown filter was not added: includes
That's the problem! In your htaccess add: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps and remove any SetOutputFilter PHP SetInputFilter PHP :)
where can I find that folder /var/log ? I really don't know werhe to look, I don't understand how nobody else doesn't understand this.
|
3

I got the same problem while installing a third party LAMP application and the cause was missing php5-mysql package.

Hope this helps others.

2 Comments

+1 this fixed my issue as the package did not ship with mysql for some reason
My problem too. oerdnj's answer helped me get it installed here: askubuntu.com/questions/774197/…
2

Sometime this white screen may occur because of the php page that is included by include() and include_once() functions, which may have some error or any syntax error that are not reported by the php server.

This happens because the included php page are executed first before the actual php page and if any error that is present in the included file occurs that suppresses the error catching then further php codes are not executed and a blank page is displayed.

  • First try to find that which dependent file has the problem by // toggling each include() or includ_once() one at a time.
  • After the culprit dependent file is found try to check it for the errors.

Comments

0

In my case this happened when I un-installed Zend using its uninstall.sh, I then needed to edit the Apache config /etc/apache2/sites-enabled/000-default.conf to remove any references to Zend Server. I did restart Apache, but restarting the whole machine helped to revive PHP bindings.

Comments

0

In my case I find out that the include_once() function which I put on the top of the page was the problem . I red the answer by Gaurav Kispotta , that is where I got the tip . so if you have the same problem first comment that out , maybe even the entire code depending on that include .

Comments

0

You should never ever use require_once or include_once.

It will burst your server memory.

Just go with include or require.

Comments

-4

php is a server side language so viewing source from browser will not yield any result if the whole codes are surrounded by php tags. Download the files from the server using an ftp client and try to open in an editor to see if there are still codes in it.

1 Comment

It seems to be more a tip than a question answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.