1

I get the HTTP Error 500 (Internal Server Error) error with Chrome when trying to open a simple PHP file.

I have installed Apache and PHP correctly as instructed in this article. Including the PHP specific part of it.

I get this error when I try going to the URL http://localhost/~eduan/php_info.php, I made sure and this file has correct syntax and everything, here's it's contents:

<?php
php_info();
?>

It contains nothing else and nothing less.

I also have a test install of Statamic under http://localhost/~eduan/statamic, and that works and doesn't. It loads correctly, but all the styles and stuff of it is missing, meaning (from what I understand) that it couldn't load the theme which is done with PHP if I'm not mistaken.

That's all, any help is greatly appreciated!

2

The real command is phpinfo() (without the underscore).

| improve this answer | |
  • Oops. OK that fixes that. What about the Statamic part of it though? – greduan Apr 28 '13 at 20:22
  • I don't know what statamic is. A bare style is usually the result of a CSS stylesheet not loaded: 87% of times this is due to a misconfiguration in the web application (AKA statamic). In any case it is not PHP related. – ntd Apr 28 '13 at 20:28
  • @ntd You'd be surprised. I've seen at least one "custom" CRM job that used php to generate CSS. Don't ask me for details, I worked long and hard to repress them... – Shadur Mar 15 '17 at 9:56
  • @Shadur Oh yeah, I have also used PHP for generating dynamic images. If you have full access to the webserver configuration you can use PHP for generating pretty much anything served. – ntd Mar 27 '17 at 6:58
2

Check your most error log, it is probably located in /var/log/apache2/error.log or /var/log/httpd/error.log (or similar). It'll probably point you to the problem that @Eduan describes in the other answer.

It is good practice to always check the error logs first, there often is valuable information in them.

| improve this answer | |

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.