0

I've successfully installed LAMP and created some virtual hosts. Everything is working fine except index.php files.

When I try access them, browser returns 500 Error, regardless of their content. All other PHP files are working fine, index.html files can be opened without any errors. Please, help me to resolve this problem. I guess something wrong with server configuration, but I didn't find what exactly.

7
  • Please add the fullpath to where your index.php file is located and also the output of the shell command ls -l /fullpath/to/index.php . Press ctrl+alt+t to open a terminal. Also add the content of the index.php file you are trying.
    – lpanebr
    Nov 21, 2011 at 22:55
  • Try open a shell and type php foo.php and php -l foo.php. You may also check your settings with the script <?php phpinfo(); ?>.
    – Anonymous
    Nov 21, 2011 at 23:14
  • The fullpath of my index file is: /home/stas/projects/dreamsblock/index.php
    – Stas
    Nov 22, 2011 at 0:16
  • Here is the result of ls - l command: -rw------- 1 stas stas 241 2011-11-21 13:31
    – Stas
    Nov 22, 2011 at 0:18
  • The contents of index.php file is simply: <?php echo 'test'; ?>. I checked the settings with phpinfo(); but they seems ok. Could you suggest me what exact setting I should check?
    – Stas
    Nov 22, 2011 at 0:23

2 Answers 2

2

I've solved this issue. The problem was with CHMOD of my virtual host directory. I set chmod value to 755 and it began to work :)). Sorry for bothering with such stupid question.

1

I think you should check Apache error log:

tail -f /var/log/apache2/error.log

That would give you some hints

Not the answer you're looking for? Browse other questions tagged .