Support

Akeeba Backup for Joomla!

#39516 Comand Line Cronjobs failed

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
4.3.4
PHP version
8.1
Akeeba Backup version
9.7.1 Pro

Latest post by Kartenladerl on Sunday, 24 September 2023 14:30 CDT

Kartenladerl

The cron jobs for Akeeba Backup and Admin Tools fail.

When running manually via the command line, the following message appears:

(uiserver):u57494739:~$ /usr/bin/php8.1-cli /homepages/35/d317320394/htdocs/bt40/cli/joomla.php admintools:scan

In AkeebaBackup.php line 232:

 Failed opening required '/homepages/35/d317320394/htdocs/bt40/administrator/components/com_akeeba/BackupEngine/Factory.php' (include_path='.:/usr/lib/php8.1') 

 

(uiserver):u57494739:~$ /usr/bin/php8.1-cli /homepages/35/d317320394/htdocs/bt40/cli/joomla.php akeeba:backup:take

In AkeebaBackup.php line 232:

 Failed opening required '/homepages/35/d317320394/htdocs/bt40/administrator/components/com_akeeba/BackupEngine/Factory.php' (include_path='.:/usr/lib/php8.1') 

 

No log files are generated.

 

The workaround from Ticket #39476 does not solve the problem!

nicholas
Akeeba Staff
Manager

Open the file plugins/console/akeebabackup/src/Extension/AkeebaBackup.php. If there are less than 210 lines it means that your host is doing something stupid (they have enabled PHP OPcache with a huge caching time, i.e. your server does not "see" updated core Joomla! and third party extensions' .php files). If this is the case, go directly to the last paragraph in this reply.

If you see more than 210 lines then the problem is that Joomla failed to update one of the plugins included with Akeeba Backup, namely the one in the console group which handles the Joomla! CLI integration, without actually telling you anything about it. I have been reporting this issue with Joomla's extensions updater since 2014. Anyway, it's pretty simple to fix. Here's how (please note that all instructions are necessary, even though they seem to not be, and the order you carry them out matters as well):

  1. Delete the folder plugins/console/akeebabackup from your site.
  2. Download Akeeba Backup 9's ZIP file from our Downloads page. This is to make sure that Joomla is trying to install the correct version.
  3. Go to System, Extensions, Install and install the ZIP file you downloaded in the previous step without uninstalling Akeeba Backup before.
  4. Repeat the previous step a second time. Yes, it is necessary; it's what works around the problem in Joomla's integrated extensions updater (which is the same code as the extensions installer we are using here).

Now open the file plugins/console/akeebabackup/src/Extension/AkeebaBackup.php It should have about 129 lines. There should no longer be a line 232 (the one referenced in the error message you sent us). If this is not the case, delete the contents of the tmp folder on your site and retry the numbered instructions above.

If you get the same error, despite the fact that the line referenced in the message no longer exists, please contact your host and ask them to reset the PHP OPcache for your site. They should know what that means and be able to do it for you. This would mean that you have to ask them to do that every time you update Joomla or one of its extensions since the server does not "see" the changes made in the updated Joomla and third party extension files.

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!

Kartenladerl

There were three folders in console.
Once akeeebackup with the correct files and src and services with the old files.
After deleting the src and services folders everything worked again.

 

The ticket is solved.

nicholas
Akeeba Staff
Manager

Please keep in mind you are talking to the person who wrote this code and the literal book on Joomla 4 development.

The console plugin for Akeeba Backup was first written back in November 2020, when Joomla 4 was still in beta. It implements the integration with the Joomla CLI application which was introduced in Joomla 4.

Sine it was written from scratch and its only target is Joomla 4 it uses the new Joomla 4 way of writing plugins. The services folder tells Joomla how to initialise the plugin. The src folder contains the actual code for the plugin. The file plugins/console/akeebabackup/akeebabackup.php is a remnant from Akeeba Backup 8 and, as you can see, it's an empty class; there is no code there.

If you remove the src and services folder you are left with a non-functional plugin. You have deleted both the code which implements the integration with the Joomla CLI application (src) and the file which tells Joomla how to initialise and call that code (services/provider.php). Therefore, your site IS NO LONGER TAKING ANY BACKUPS THROUGH THE CLI APPLICATION.

Please follow the instructions I gave you.

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!

Kartenladerl

The three folders were in the plugins/console folder.
Nothing was deleted in the plugins/console/akeebabackup folder.
Only the plugins/console/services and plugins/console/src folders were deleted.
Since then everything has been working perfectly again.

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!