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 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/msql.so' - /usr/lib/php5/20100525/msql.so: 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 127.0.0.1] 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
add comment

2 Answers

up vote 1 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
add comment

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 :) –  Mahbubur R Aaman Nov 11 '12 at 6:40
add comment

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.