Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to load a website I've development and transferred from windows to ubuntu. I've installed apache2/php5/mysql and I've confirmed that it works by using the default index.html file displaying something like "It Works!". I've also created arbitrary folder containing some php file that I've run in firefox and it was displayed. But when I try to run my projects index.php I get a blank screen. I've consulted mirc about this and they say that it has to do with file permission. I've chcked the file permission on my index.php file and it is owner : rw r , group : r, others : read-only and execute is unchecked.

What am I doing wrong?

share|improve this question

1 Answer 1

Maybe PHP is generating errors and it isn't displaying them. Apparently, this is the default behaviour.

Try checking the log for errors: tail /var/log/apache2/error.log

Change php.ini to make the errors appear in your browser 1- Open the file /etc/php5/apache2/php.ini (or whatever is your php.ini) in your favorite text editor

2- Search for display_errors

3- Set it to On

4- Restart apache

Next time your try to run a php script it will output the errors.

It can also be a problem with error_reporting. Placing error_reporting(E_ALL); in the beggining of your script will make sure (if display_errors = On) that all kinds of errors will get displayed.

share|improve this answer
    
I went to error.log and I get lots of error when it comes to pathing e.g [Thu Nov 22 02:27:27 2012] [error] [client 127.0.0.1] PHP Warning: include_once(): Failed opening 'model/member_db.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 7 How do I prevent this problem? –  user1683645 Nov 22 '12 at 7:24
    
you have to correct your code. Does this file 'model/member_db.php' exist? –  Vítor Manfredini Nov 22 '12 at 14:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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