Pagina Inicial › Forums › HAast (High Availability for Asterisk) › Installation & Upgrade › Internal server error
Tagged: 500, gui, http, https, internet server error
-
AuthorPosts
-
I just installed HAast on Ubuntu 12 with PHP 5.3.10 and Apache 2.2.22. Although HAast is working fine, the HTTP GUI isn’t. I get an Internal Server Error (number 500) when I browse to http://myhost.com/haast
Strangely, nothing shows up in the apache error log! What’s wrong?
There are many causes for a 500 (internal serve) error. The cause will likely not show up in your apache logs because of how PHP is setup. The default PHP configuration is designed to maximize speed (and therefor less logging). If you change your PHP configuration slightly the root cause will show in the apache error log. Please follow these steps:
Locate your php.ini file:
el@apollo:~$ locate php.ini
/etc/php5/apache2/php.iniEdit that file as root:
sudo vi /etc/php5/apache2/php.ini
Find this line in php.ini:
display_errors = Off
Change the above line to this:
display_errors = On
Lower down in the file you’ll see this:
; display_startup_errors
; Default Value: Off
; Development Value: On
; Production Value: Off;error_reporting
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATEDThe semicolons are comments, that means the lines don’t take effect. Change those lines so they look like this:
display_startup_errors = On
; Default Value: Off
; Development Value: On
; Production Value: Offerror_reporting = E_ALL
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATEDWhat this communicates to PHP is that we want to log all these errors. Warning, there will be a large performance hit, so you don’t want this enabled on production because logging takes work and work takes time, time costs money.
Restarting PHP and Apache should apply the change.Next, do what you did to cause the 500 Internal Server error again, and check the log:
tail -f /var/log/apache2/error.log
You should see the 500 error at the end, something like this:
[Wed Dec 11 01:00:40 2024] [error] [client 192.168.11.11] PHP Fatal error:
Call to undefined function Foobar\\byob\\penguin\\alert() in /yourproject/
your_src/symfony/Controller/MessedUpController.php on line 249The cause should then be obvious – or email us the relevant log excerpts and we’ll help you figure it out. If you run a different Linux OS or different version, then the settings may differ slightly but the same basic instructions apply.
-
AuthorPosts
- You must be logged in to reply to this topic.