Support

Akeeba Backup for Joomla!

#13436 Installer write a wrong '/log' path info the new configuration.php after restoring

Posted in ‘Akeeba Backup 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
Akeeba Backup version
n/a

Latest post by nicholas on Wednesday, 05 September 2012 01:53 CDT

user9198
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? YES
Have I searched the tickets before posting? YES
Have I read the documentation before posting (which pages?)? YES
Joomla! version: 2.5.6
MySQL version: (unknown)
Host: (optional, but it helps us help you)
Akeeba Backup version: 3.6.3

Description of the issue:

Configuration.php written by the installer as /log path instead than /logs one

Please, pay a look to your file /installation/includes/output/setup.php file, line 48 where prays:

abi_default_log = '<?php echo addslashes(JPATH_SITE.'/log') ?>';

istead than:

abi_default_log = '<?php echo addslashes(JPATH_SITE.'/logs') ?>';

Hope this helps (and arrives on time to the next 3.6.4 release)

Rgrds,

nicholas
Akeeba Staff
Manager
It's not a bug, it's intentional. On servers powered by Plesk the "logs" directory is an unwritable system directory, used by Plesk to store Apache's log files. This caused issues when restoring sites to Plesk servers. So the default behaviour of Akeeba Backup Installer is to default to the "log" directory. It has been like that since I introduced that option on ABI, about two years ago. So far nobody complained :)

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!

user9198
Ok!... First of all YES It is a Bug! (may be located on other place in your code but it is somewhere...?)

To reproduce the bug just follow those steps:

- Take any one of your backups
- Extract it the *.jpa file with AKExtractWizard to your public folder
- have prepared an empty DB
- Run the default installation, go through DB Restore, and pay attention when arriving to Site Info window
-- Fist pay a look to the bottom of the page and writedown the Log Directory Path mationed at the 'Fini Tuning' area (surerly a /logs path is mentioned there)
- Now comeback to top of this page and 'tick': 'Use the directories under your new site's root'
- Now go back to the bottom of this page 'Fine-tuning' area and see that the new 'Log Directory' has been changed to /log

Have a nice last holliday and, please, try to include its fix on next release!
Cheers!

user9198
Confirmed that patching the file /installation/includes/output/setup.php file at line 48, before to start to restore a backup, from:

abi_default_log = '<?php echo addslashes(JPATH_SITE.'/log') ?>';

to:

abi_default_log = '<?php echo addslashes(JPATH_SITE.'/logs') ?>';

And using: 'Use the directories under your new site's root' during the restoration wizard the the 'logs' path is correctly written as .../logs

Then my FIRST BUG REPORT was correct!

Note that it is just a typo, but that means that ALL booked backups till today are carring the bug and every user that will restore a backup and will use the 'Use the directories under your new site's root' will need to remember that, to avoid to have 'unwritable' ../logs directory (and to pay attention tho that problem at their configuration.php file).

nicholas
Akeeba Staff
Manager
A bug is an unexpected behaviour. As you read in my detailed reply above, it is the expected behaviour for the reasons I mentioned. I never said that this doesn't happen. On the contrary I DID say it DOES happen and that it is EXPECTED. Quoting myself word for word:
It's not a bug, it's intentional. On servers powered by Plesk the "logs" directory is an unwritable system directory, used by Plesk to store Apache's log files. This caused issues when restoring sites to Plesk servers. So the default behaviour of Akeeba Backup Installer is to default to the "log" directory. It has been like that since I introduced that option on ABI, about two years ago. So far nobody complained

Which part of my reply did you not understand? As I said:
1. It's intentional. If it's intentional, it's not a bug
2. Using the "logs" directory screws up the site, the backup and the restoration on Plesk servers. Just try extracting an archive containing a "logs" directory on a Plesk server. Or try using "logs" as your log directory on a Plesk server. It will NOT work. And since I had a lot of people busting my balls about alleged "bugs" (when, in fact, it was Plesk's use of the "logs" directory as a system directory causing their problems) I decided to work around it. It's not a bug.
3. This behaviour seems to be perfectly acceptable as it's been around for several months and nobody complained. On the contrary, when the "logs" directory was being used I had to reply to "bug" reports every other week.

Moreover, let me state that checking the box in Akeeba Backup Installer's interface merely modifies the text in the two boxes for the tmp and log folders. You can always change that manually, as written in the documentation. If a user won't read the documentation, won't look at his screen and thinks that the only way to modify that is editing the configuration.php file post-restoration it's not a bug.

So, for the last time. THIS IS NOT A BUG. IT IS THE EXPECTED BEHAVIOUR. I DELIBERATELY MADE IT TO BE SO. READ THE DOCUMENTATION. MODIFY THE DEFAULT VALUES IF YOU DON'T LIKE THEM. THERE IS NOTHING TO FIX.

This thread is closed.

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!