Support

Admin Tools

#24951 500 internal error after installing admin tools

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Wednesday, 18 May 2016 17:20 CDT

user90172
 I installed Admin Tool following the Install from URL way.
As soon as the installation was completed, it showed a successful installation. I configured the basic protection as it said, and as soon as I saved, the site showed me a 500 internal error page.

I tried following different routes to gain back access to my back-end. I found and followed this troubleshooter "https://www.akeebabackup.com/documentation/troubleshooter/atwafissues.html" I located the main.php file using FTP, and after renaming it I could access the back-end with no problem. But when trying to follow the rest, I found no problem at all from the WAF. No blacklisted IP and nothing on exception log.
So I tried to change again the name in main.php, and the problem returned (this didn't happened if I disabled the plugin of admin tool, I could turn the name back to main.php without problem).

After other research, I found that the problem could be caused by an incomplete installation. So I tried to install it again (after eliminating the directories indicated in the tutorial https://www.akeebabackup.com/documentation/admin-tools/installing.html#installing-from-url), but as soon as the installation ended I was again thrown out of the site and returned to the 500 error page. This time without even showing me if the installation was successful or not.

Trying again to find the main.php file from FTP, and changed it again. But now I can't find an Admin tool in the Component of my back-end.

What can I do to try and solve this?

nicholas
Akeeba Staff
Manager
A white page or a page with a 500 Internal Server Error is, in fact, either a .htaccess issue to a PHP fatal error in disguise.

First, let's see if it is a .htaccess issue. Try renaming the .htaccess file in your site's root to htaccess.bak If there is a .htaccess file in the site's administrator directory, try renaming it as well. If that solves the problem, the issue was with a directive in your .htaccess file. We'd like to recommend you to try removing directives from your .htaccess until you find the one which causes the problem.

If that doesn't help, the error you are receiving is in fact a PHP error in disguise. First, check your server's error logs (not the access logs) immediately after visiting the page which throws the error. There should be an exact description of the PHP fatal error which occurred. Sometimes you can find the error messages in files called error_log or error.log inside the site's root and/or administrator directories. If unsure about the error log location, please consult your host. Most likely the error logs are available in your site's cPanel, Plesk control panel or similar hosting account management facility.

If your host does not give you access to the error logs and you have access to the Joomla! administrator area, please log in to your site's back-end, go to Global Configuration, click on the Server tab and set the Error Reporting to Maximum (Joomla! 1.5) or Development (Joomla! 2.x and later). Try visiting the problem page again.

If you still get a blank page, edit your configuration.php file and put the following code right after the final closing curly brace ( this is what a curly brace looks like --> } ) but before the closing PHP tag (it looks like ?> that is a question mark and a greater-than sign):
ini_set( 'display_errors', true );
error_reporting( E_ALL ); 
Try visiting the problem page again.

If you still get a white page, please remote the two lines from your configuration.php file. Edit the .htaccess file in your site's root. If you don't have a file named .htaccess create a new one. Beware that htaccess.txt is a DIFFERENT FILE and will NOT work! Add the following to the end of the file:
php_flag display_errors On
php_value error_reporting 32767
and retry loading the problem page.

If you still get a white page, remove the two lines from your .htaccess file. Now, create a file called php.ini with the following content:
display_errors=on
error_reporting=E_ALL
and upload it into your site's root and your site's administrator directory. Retry loading the problem page.

IMPORTANT: Sometimes the error won't show. Edit your configuration.php and find the line starting with public $error_reporting and set it to:
public $error_reporting = 'development';

This instructs Joomla! to enable maximum error, warnings and notices verbosity. In 99.9% of cases it will result in the error messages being shown on the browser.

Please note that if you can not understand what the PHP error message means, just copy and paste it here verbatim so that we can take a look and point you to the right direction.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user90172
I have followed everything you said to do, and this is the error I found in the server error logs:

[Mon Apr 18 10:01:10 2016] [warn] [client 89.96.63.212] mod_fcgid: stderr: PHP Warning: mysql_close(): 51 is not a valid MySQL-Link resource in /var/www/vhosts/xxx.xxx.it/httpdocs/administrator/components/com_admintools/engine/Driver/Mysql.php on line 143, referer: http://xxx.xxx.it/administrator/index.php?option=com_admintools&view=waf

I have just changed the site name to xxx.xxx, the rest is all the same. After that I also have this warning:

[Mon Apr 18 10:02:51 2016] [warn] [client 89.96.63.212] mod_fcgid: read data timeout in 60 seconds, referer: http://xxx.xxx.it/administrator/index.php?option=com_plugins&view=plugins
[Mon Apr 18 10:02:51 2016] [error] [client 89.96.63.212] Premature end of script headers: index.php, referer: http://xxx.xxx.it/administrator/index.php?option=com_plugins&view=plugins

I don't know if it could be related or not.

nicholas
Akeeba Staff
Manager
The warning is not an error. It's something that we expect to happen: basically, we're trying to make sure that the database connection is closed before shutting down the PHP file scanner engine.

The other error you get, however, explains everything:

[Mon Apr 18 10:02:51 2016] [error] [client 89.96.63.212] Premature end of script headers: index.php, referer: http://xxx.xxx.it/administrator/index.php?option=com_plugins&view=plugins


Joomla! takes too long to display the Extensions, Plugins page. Presumably you have way too many plugins and / or a very slow server. Try accessing that page as http://www.example.com/administrator/index.php?option=com_plugins&limit=5&limitstart=0 where www.example.com is your site's domain name. This will tell Joomla! to only list 5 plugins which SHOULD allow Joomla! to process and display that page in a reasonable amount of time.

Please keep in mind that none of that is actually linked to Admin Tools in any way. What actually happened is that trying to access the Plugins page takes too long and your server immediately blocks either your entire site or at the very least your IP. This is quite expected on shared hosts: when a visitor causes excessive CPU usage (that's what the timeout means to the server!) the server tries to protect itself by blocking the offending visitor.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!