Support

Akeeba Backup for Joomla!

#24940 No backups since switch to php7

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 Friday, 15 April 2016 10:41 CDT

dkdb
EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:
Hi Guys

Some time ago I switched to PHP 7 to get all the benefits from that. I also switched to PDO MYSQL in the Joomla backend.
I just noticed today that all backups since then has failed.
When I try to do a backup, I get a failure telling me that there is no Mysql module.
Looking at my webhotels php options (cpanel) I can see that I cannot activate mysql, only mysqli and mysqlind, and of course the PDO.
Is there a way to solve this?

Best regards Kenneth

nicholas
Akeeba Staff
Manager
All you really need to do is make sure you're up to date and switch Joomla!'s database driver to either mysqli or pdomysql. If you use a custom driver with a different name Akeeba Backup doesn't know what to do and switches back to its default setting (plain old "mysql").

FWIW we've switched to PHP 7 two days before Joomla! 3.5 was officially released and we have twice daily backups just fine.

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!

nicholas
Akeeba Staff
Manager
It would be better if I had included what else I have in mind: If this doesn't work for you I do have a suggestion which involves changing a code file.

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!

dkdb
:-)
The Joomla reads MySQL (PDO) in the settings, not sure if that is why it doesn't 'catch' it? If indeed it should read PDOMySQL?
In the 'Advanced Configuration' in the profile it reads 'Native MySQL backup engine'.
What is really weird I think, is that I can run the configuration wizard?

Best regards Kenneth

nicholas
Akeeba Staff
Manager
The database driver name should be pdomysql (lowercase). To make it very explicit, that's how it's declared in configuration.php by Joomla! itself:
public $dbtype = 'pdomysql';

I have confirmed that this works with Joomla! 3.5.1, PHP 7.0 (tried both 7.0.0 and 7.0.4) and Akeeba Backup 4.6.1.

Please note that if you are using a third party extension or a core hack which takes over Joomla!'s database layer and returns a name that contains "mysql" (not "mysqli", not "pdomysql") Akeeba Backup will try to use the old MySQL driver.

So, this leaves us with two possibilities:
  • You have the wrong driver name in configuration.php
  • A 3PD extension or a core hack takes over the database layer and the db driver returns a misleading name


Basically, it's a site configuration issue :/

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!

dkdb
I see, if I look in my config that's how it's defined it's just being shown differently in backend in Joomla Global Configuration.
The log shows
[160415 08:03:03] Failed Smart algorithm on Akeeba\Engine\Core\Domain\Db
It's a bogstandard webhotel running on cpanel, so I doubt they've done any special hacks or anything.

Best regards Kenneth

nicholas
Akeeba Staff
Manager
OK, so far I took your word for what the problem is. Right now I'm pretty sure that what you think is going on isn't what is actually going on. Can you please send me the backup log file so I can see what is actually going on?

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!

dkdb
Not really sure how to reply to that one.
As I said, the logfile just says the above.
I've attached the last 4 of my attempts.

BUT, I've figured out what is causing it, now I just need to figure out how to fix it.
I have two other databases on this host that is being backed up, and it's those it is failing on somehow.
Odd that it doesn't reflect this in the log somehow?

Best regards Kenneth

dkdb
Sorry, had to zip the logfiles...

Best regards Kenneth

nicholas
Akeeba Staff
Manager
The log file you've got is not suitable for debugging.

Go to Components, Akeeba Backup.
Enable the backup profile you are using for your CRON jobs.
Click on Configuration.
Set the Log Level to "All information and debug"
Run the CRON job again
ZIP and attach the new log file.

Thank you in advance!

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!

dkdb
I found the issue, it's the extra DB's I'm backing up. They were using MySQL not MySQLi, completely forgot about those. Sadly the component didn't pinpoint it in the error shown...

Best regards Kenneth

nicholas
Akeeba Staff
Manager
That was the suspicion I had and why I had requested the logs.

By the way, this kind of issue is also caught by ALICE as long as you have –you guessed it– the log level set to All Information and Debug. Moreover the full log does tell you why the failure occurs, i.e. that it cannot connect to the additional database.

When you have a problem use the debug log. There's a reason there's a log, right?

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!