I've set up a development environment in which I have a LAMP stack running on Ubuntu 14.04 LTS (runs on raspberry PI 2 B) and NetBeans on my PC and laptop. The problem starts when Im trying to execute my PHP code using FTP - all files are successfully uploading on the server but the server won't open it. As soon as index.php is uploaded all I'm getting is a blank page and when I remove it everything back to normal (when Im typing ip address Apache shows me the files).

Sorry I know that this issue circulating around this forum for quite a long but I literally went though most of the solution suggested and non of the work.

Here is what I did so far:

  1. Permissions and ownership for /var/www/html/ are set for www-data and the
    local user are set so they all can read,write,execute.

  2. In mods-enabled > dir.conf following line was edited: DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm

Any help on this will be much appreciated.

Thank you


Here are some things you can do to troubleshoot the problem:

  • Restart apache2:

    sudo apache2ctl restart
  • Is the php5 module enabled? Look for php5.conf and php5.load in your mods-enabled directory. If they're not there, check to be sure they're in your mods-available directory, and enable the module with

    sudo a2enmod php5
    sudo apache2ctl restart
  • Put a file named index.php and containing just <?php phpinfo(); ?> into your /var/www/html directory, then browse to your website. Does that file also appear to be a blank page?

  • Make sure the permissions and ownership of the index.php file allow the www-data user read access to the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.