Support

Pre-sales

#26571 .htaccess issue

Posted in ‘Pre-sales and Account Questions’
This is a public ticket

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

Latest post by nicholas on Saturday, 19 November 2016 11:11 CST

user91700
 Greetings,

I used the .htaccess maker to replace my old .htaccess file. After completing this, my recently upgraded to Akeeba Backup Professional 5.2.4 (2016-10-28) and recently upgraded Akeeba admin tools pro alternatively give a 500 errors. The issue occurs on one or the other. I can restart Apache and then I can access the other. They alternate giving a 500 error. I can restart apache and gain access to the one giving the 500 error but then cannot access the one that was functional. I cannot access both applications without restarting apache between each access. Thank you for your assistance.

nicholas
Akeeba Staff
Manager
Hello Tresa,

Akeeba Backup and Admin Tools are exclusively backend extensions which run through Joomla. They are not affected by .htaccess in any way which could cause a 500 error. It seems that you either have a partial update, a broken Apache or PHP installation or any combination of the above.

First try installing Akeeba Backup twice in a row, without uninstalling it before or in between. This will make sure that all Akeeba Backup files are properly updated and installed.

Then try installing Admin Tools twice in a row, without uninstalling it before or in between. This will make sure that all Admin Tools files are properly installed.

If you still have issues you may want to check if the .htaccess file is causing problems. Try replacing its contents with the contents of Joomla's stock htaccess.txt file. If that worked please follow the .htaccess Maker troubleshooting instructions. See the big red warning box in the documentation of this feature.

However, if replacing the .htaccess file didn't make any difference your diagnosis of the problem is incorrect. A white page or a page with a 500 Internal Server Error is, in fact, a PHP error in disguise. We have to determine whether it is a legitimate error or your PHP installation is broken.

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 Development. 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.

If you still get a white page, delete the php.ini files your created. At this point we can tell you that the problem is either a misbehaving code cache or a buggy or corrupt version of PHP installed on the server which crashes for random reasons. Ask your host to make sure that all code caches (like the now defunct eAccelerator or the still maintained APC, Zend Opcache, XCache and WinCache modules) are disabled. If that worked and the code cache in use is eAccelerator please move to a different host: eAccelerator is defunct for over 4 years and MUST NOT be used in production. If it was any other code cache please ask your host to tell you how to clear the code cache before re-enabling it.

If a code cache wasn't the case we're left with just one possibility: a buggy or corrupt version of PHP installed on the server which crashes for random reasons. We can't help with that. If the host cannot help with this (e.g. updating and/or recompiling PHP on their server) the only possible solution is moving to a better host.

Please note that in case you got a PHP error at any of the steps above, 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!

user91700
Wow! I am very impressed with your answer and such a well constructed response to my issue.

Here is what my apache log is showing:

[Sat Nov 19 06:25:05.921028 2016] [ssl:warn] [pid 4895] AH01909: lpxis:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 19 06:25:05.921805 2016] [mpm_prefork:notice] [pid 4895] AH00163: Apache/2.4.10 (Debian) OpenSSL/1.0.1t configured -- resuming normal operations
[Sat Nov 19 06:25:05.921819 2016] [core:notice] [pid 4895] AH00094: Command line: '/usr/sbin/apache2'
[Sat Nov 19 16:17:11.720552 2016] [:error] [pid 10221] [client 10.11.245.29:64127] PHP Fatal error: Cannot redeclare class Akeeba\\Engine\\Autoloader in /var/www/joomla/administrator/components/com_akeeba/BackupEngine/Autoloader.php on line 22, referer: https://lpxis/administrator/index.php?option=com_admintools
[Sat Nov 19 16:17:56.623239 2016] [:error] [pid 14175] [client 10.11.245.29:64137] PHP Fatal error: Cannot redeclare class Akeeba\\Engine\\Autoloader in /var/www/joomla/administrator/components/com_akeeba/BackupEngine/Autoloader.php on line 22, referer: https://lpxis/administrator/index.php?option=com_installer&view=warnings
[Sat Nov 19 16:23:50.069845 2016] [mpm_prefork:notice] [pid 4895] AH00169: caught SIGTERM, shutting down
[Sat Nov 19 16:24:00.645904 2016] [ssl:warn] [pid 14500] AH01909: lpxis:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 19 16:24:00.707304 2016] [ssl:warn] [pid 14501] AH01909: lpxis:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 19 16:24:00.712483 2016] [mpm_prefork:notice] [pid 14501] AH00163: Apache/2.4.10 (Debian) OpenSSL/1.0.1t configured -- resuming normal operations
[Sat Nov 19 16:24:00.712515 2016] [core:notice] [pid 14501] AH00094: Command line: '/usr/sbin/apache2'
[S<br /> Sat Nov 19 16:24:27.976720 2016] [:error] [pid 14509] [client 10.11.245.29:64298] PHP Fatal error: Cannot redeclare class Akeeba\\Engine\\Autoloader in /var/www/joomla/administrator/components/com_akeeba/BackupEngine/Autoloader.php on line 22, referer: https://lpxis/administrator/index.php?option=com_admintools
[Sat Nov 19 16:24:30.387233 2016] [:error] [pid 14530] [client 10.11.245.29:64300] PHP Fatal error: Cannot redeclare class Akeeba\\Engine\\Autoloader in /var/www/joomla/administrator/components/com_akeeba/BackupEngine/Autoloader.php on line 22
[Sat Nov 19 16:24:50.164928 2016] [:error] [pid 14505] [client 10.11.245.29:64311] PHP Fatal error: Cannot redeclare class Akeeba\\Engine\\Autoloader in /var/www/joomla/administrator/components/com_akeeba/BackupEngine/Autoloader.php on line 22, referer: https://lpxis/administrator/index.php?option=com_projectfork
[Sat Nov 19 16:36:27.575287 2016] [:error] [pid 14505] [client 10.11.245.29:64385] PHP Fatal error: Cannot redeclare class Akeeba\\Engine\\Autoloader in /var/www/joomla/administrator/components/com_akeeba/BackupEngine/Autoloader.php on line 22, referer: https://lpxis/administrator/index.php?option=com_projectfork
Last 20 lines of Only show lines with text Refresh

Does this more clearly help identify the issue? Please advise. Thank you!

nicholas
Akeeba Staff
Manager
Hello Tresa,

I am now sure that it's a code cache issue on your server. Here's the part of my previous reply that's relevant:

Ask your host to make sure that all code caches (like the now defunct eAccelerator or the still maintained APC, Zend Opcache, XCache and WinCache modules) are disabled. If that worked and the code cache in use is eAccelerator please move to a different host: eAccelerator is defunct for over 4 years and MUST NOT be used in production.


Please do contact your host about it.

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!

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!