Support

UNiTE, Remote CLI, eXtract Wizard

#28142 UNiTE : ok for all sites, except for one where freezes at "Executing step `Getconfig`"

Posted in ‘UNiTE and Remote CLI’
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

PHP version
n/a
Tool
UNiTE
Tool version
n/a

Latest post by nicholas on Thursday, 20 July 2017 09:13 CDT

woluweb
Hi,

Since yesterday I have played a lot with UNiTE.
It has worked fine on ALL my sites and tests (about 100)... except for 1, where the process freezes at
"Executing step `Getconfig`"

All parameters are correct in the xml file (it works for all the other sites).
I have tried to play with all options ("replace vs insert", ...), but no way.
But the strangest thing is that if I pursue the installation manually (ie if I delete "your stealth .htaccess" and open the directory which has just been created by UNiTE), then the database installs totally normally and the website works fine).

Do you have any clue why
- UNiTE freezes at the database stage ("Getconfig")
- but if I take over manually all goes fine
?

Txs a lot
(if easier/quicker, I can provide you with the jpa)

nicholas
Akeeba Staff
Manager
At this point UNiTE tries to open a database connection. It's possible that your web and CLI PHP configurations are different, meaning that CLI (therefore UNiTE) can't connect to the database. Sort of trying different database settings I don't think there is another way to fix 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!

woluweb
Txs Nicholas.

I have made a new .jpa with only the database so that my tests would be faster.
I have changed all possible parameters in the database connexion in the xml file, but still it does not work.

What is strange is that all the other 50-100 local installations with UNiTE did work fine, no other site could not connect to the database.
Could the contents of the database (like some special tables or so) create that issue ?
Or is it purely an issue with the connexion with the *local* database ? (but still, why did that connexion work for all the other sites then ?)

I am a bit lost :)

nicholas
Akeeba Staff
Manager
I think I may have misunderstood you. If the hand happens after it tells you that it starts running Getconfig but before it tells you it starts running Dbrestore then the problem lies before we try to connect to the database.

First let me explain that in UNiTE 3.x we are delegating the actual restoration process to ANGIE itself. This allows us to support new versions of Joomla!, WordPress etc as well as other CMS without having to make changes to UNiTE itself.

The Getconfig step -when restoring a Joomla! site- is where ANGIE tries to read and parse the configuration.php file off the disk. Doing so requires including the .php file with a require() statement. Normally this is not a problem. The configuration.php file is an inert class declaration. However, if that particular site's configuration.php includes any other PHP statements then these statements could cause the issue. So please take a look at what's included in the configuration.php file.

Working around this issue at the UNiTE level requires either forking a new process or using a custom PHP tokenizer to deconstruct the file. The former requires the pcntl extension and may not be available on all hosts (AFAIK it's not available at all on Windows). The latter typically works fine and we have the code in Akeeba Solo BUT it requires a new version of ANGIE therefore new versions of Akeeba Backup / Akeeba Solo and taking new backups. I'm going to explore both options today.

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!

woluweb
Hi Nicholas,

Txs for investigating :)

Of course, I don't have your knowledge about how it works behind the scenes, but based on what you have just described, I have made the following checks :

1. I went on the original site and opened configuration.php and compared it with another site where UNiTE works
All the variables were identical. The only difference is that the site where UNiTE freezes at "Getinfo" has those three extra variables
public $replyto = '';
public $replytoname = '';
public $shared_session = '0';
I even emptied the "meta" and "offline" variables because there were special characters (in French, é, ï, ', ...). I took a new backup and retried UNiTE on that, but it did not solve the issue.

2. then I went to the local directory created by UNiTE
There I cannot find any "configuration.php" file (as it is generated by Angie I guess).
So there I don't know which file(s) I should check.
The file databases.ini is all on line row... but just like the other sites I have tested it seems
And there are 9 sql files (s01, s02, ...), but that is also the case for other sites

So I don't know what I could check more on my side.
Just tell me if I can do something more.

Otherwise, I can provide you with my .jpa file (database only version, so that is is light).
Maybe it would take you less time to investigate, having the file to test.

(but what I find strange in all this, is the fact that UNiTE freezes, but when I pursue manually the installation on the Directory created by UNiTE, then it all goes fine. Still it is also Angie at work)

nicholas
Akeeba Staff
Manager
There I cannot find any "configuration.php" file (as it is generated by Angie I guess).


That's the problem. The configuration.php file should be backed up. You have excluded it from your backup. The web version of ANGIE works when the file is missing since the check runs through AJAX. If it results in a PHP error the browser can skip through to the next step. This is not the case with UNiTE. You need to take a new backup, including the configuration.php 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!

woluweb
Excellent !
Actually, I had made a new profile "database only" because the regular profile would already get stuck at the GetInfo stage.

But indeed, for some reason the configuration.php was excluded from all profiles on that website !
(it is one of the few websites which I have not created but migrated. So I had not made the configuration myself. As manual Installation does work, I could not even know that configuration.php was needed by UNiTE).

So, good thing !
Now I have created a new/fresh Profile with the default configuration (namely without File exceptions).
And YESSSS now UNiTE is not stuck any more at the GetInfo stage :-)

But still we are not done, as now UNiTE fails at the next stage, with following error message :
Could not open database dump file C:\xampp\htdocs\amazons3\ets7\installation/sql/


I see nothing suspicious/bizarre/strange in the sql directory (see screenshot).
The only thing I find strange in the error message is the mix of \ and / in the path...

Txs for your views :-)

nicholas
Akeeba Staff
Manager
Does your installation/sql/databases.ini file contain an entry for [site]?

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!

woluweb
yep
it reads as follows :

[site.sql]
dbtype = "mysqli"
dbtech = "mysql"
dbname = "XXX"
sqlfile = "site.sql"
dbhost = "XXX.mysql.db"
dbuser = "XXX"
dbpass = "YYY"
prefix = "lefeu2_"
parts = "9"

nicholas
Akeeba Staff
Manager
Sorry, I cannot reproduce this issue. Do check your database settings.

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!