Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have found a question very similar to this, which I thought would solve my problem.

However, after changing my .htaccess file, with index.php on the end of the list, and then index.php as the only entry, I still cannot get index.php to display. Every other page works fine, but I don't know how to fix this. Thanks.

share|improve this question
Check your logs for helpful detail: tail -f /var/log/apache2/error.log – Lars Rohrbach Nov 11 '12 at 5:52
@LarsRohrbach Upon starting Apache2, it says this: "PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/' - /usr/lib/php5/20100525/ cannot open shared object file: No such file or directory in Unknown on line 0." As well as this for when I try to load index.php: "[Sat Nov 10 21:54:04 2012] [error] [client] PHP Parse error: syntax error, unexpected 'version' (T_STRING) in /var/www/index.php on line 1 " – Jacob Larson Nov 11 '12 at 5:56
The contents of index.php itself may be the problem -- you may have a quoting issue on line 1, or perhaps left off the ; at the end. – Lars Rohrbach Nov 11 '12 at 6:18
@LarsRohrbach Ah, that was the issue. I simply copy and paste the basic layout for new sites I make, and I accidentally had an invalid, old screw-up. I feel stupid for not looking there before, so thank you for the help! – Jacob Larson Nov 11 '12 at 6:33
up vote 2 down vote accepted

With a 500 error, you'll always want to start with checking your logs:

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

You commented that the error log indicated:

PHP Parse error: syntax error, unexpected 'version' (T_STRING) in /var/www/index.php on line 1

This indicates that the content of index.php itself is likely the problem. Check line 1 for either a quoting issue of some sort (wrong number of quotes?) or perhaps the ; was left off the end of the line.

share|improve this answer

I think there may be any mistake at .htaccess file

The following resources may help you to resolve the issue

EDIT : I think you also check @Lars Rohrbach comment

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

share|improve this answer
It turns out it was a stupid mistake by me in the document. Thank you for your thoughts! – Jacob Larson Nov 11 '12 at 6:34
Nice as it helped you. Most Welcome :) – Md. Mahbubur R. Aaman Nov 11 '12 at 6:40

Your Answer


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.