Support

Site Restoration

#39756 Akeeba Kickstart Professional 8.0.3 / Extracting / An unexpected error occurred

Posted in ‘Site restoration’
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
PHP 8.0 (ea-php80)
CMS Type
Joomla!
CMS Version
4.3.4
Backup Tool Version
9.7.1
Kickstart version
8.0.3

Latest post by objectivetop on Tuesday, 07 November 2023 13:52 CST

objectivetop

Hi there. 

I`m trying to move a website from one domain to another. Both websites are located on the same server / same hosting account.

Trying to extract directly results in a "An unexpected error occurred" error. The log file for this event sais:
"[05-Nov-2023 21:17:02 UTC] PHP Fatal error: Uncaught Error: Call to a member function processFilename() on null in /home/netdent/clienti/alexingradinaro/kkk.php:9703
Stack trace:
#0 /home/netdent/clienti/alexingradinaro/kkk.php(6502): AKUnarchiverJPA->readFileHeader()
#1 /home/netdent/clienti/alexingradinaro/kkk.php(5902): AKAbstractUnarchiver->_run()
#2 /home/netdent/clienti/alexingradinaro/kkk.php(20420): AKAbstractPart->tick()
#3 /home/netdent/clienti/alexingradinaro/kkk.php(20622): kickstart_application_web()
#4 {main}
thrown in /home/netdent/clienti/alexingradinaro/kkk.php on line 9703"

If I try to extract via FTP, I get the same error and the log file sais:
"[05-Nov-2023 21:26:16 UTC] PHP Fatal error: Uncaught Error: Call to a member function processFilename() on null in /home/netdent/clienti/alexingradinaro/kkk.php:9703
Stack trace:
#0 /home/netdent/clienti/alexingradinaro/kkk.php(6502): AKUnarchiverJPA->readFileHeader()
#1 /home/netdent/clienti/alexingradinaro/kkk.php(5902): AKAbstractUnarchiver->_run()
#2 /home/netdent/clienti/alexingradinaro/kkk.php(20420): AKAbstractPart->tick()
#3 /home/netdent/clienti/alexingradinaro/kkk.php(20622): kickstart_application_web()
#4 {main}
thrown in /home/netdent/clienti/alexingradinaro/kkk.php on line 9703" /// the same

Any help would be very much appreciated. 

Thank you very much in advance for your time. 
Cosmin

nicholas
Akeeba Staff
Manager

When starting the restoration you can select how to write the file to the server (“Write to files:“). Select the “Directly” option.

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!

objectivetop

Good morning Nicholas.

I have done as instructed. Shortly after initiating the restoration, I got the "Could not open /[siteroot]/robots.txt.dist for writing." error. 

Kind regards
Cosmin

nicholas
Akeeba Staff
Manager

I know it does not look like it, but it's progress!

The error you get means that you have a Permissions Hell situation on your site. This means that the Operating System user you use to connect to your site with FTP / SFTP is different than the user Apache (therefore PHP) runs under. This means that all files and folders are unwritable to PHP. This configuration is incompatible with Joomla! 4.

Please ask your host to rectify this situation. The easiest and recommended way to do that is that they use PHP over FastCGI, usually by using the PHP FastCGI Process Manager, a.k.a. PHP-FPM, service. Configuring a separate PHP-FPM pool per site allows the host to have PHP run as the same user as your account user, i.e. the same user you use to connect to your site with FTP / SFTP. The same owner user should be applied to your web root, if that's not already the case. The owning group for the web root directory can remain Apache's group (typically www-data on Debian-based Linux distributions and nogroup on RedHat-based Linux distributions), allowing Apache to serve static files directly. At this point you'll have a server configuration which is compatible with Joomla! 4 & 5, and you will also be able to use Kickstart just fine.

Please note that even though there are other, easier, ways to get your site restored, the restored site would not work correctly. Joomla! really needs to be able to write to its files. Unlike previous versions (1.x, 2.5, and 3.x) it's not just for extension updates, core updates, and temporary / cache files. In Joomla! 4 and later there's a massively important file, administrator/cache/autoload_psr4.php, which Joomla! must be able to create, delete, and modify, otherwise it won't be able to operate at all with confusing error messages. Therefore, I prefer telling you upfront how to make your server work correctly with Joomla! rather than just “do my job” of telling you how to restore a site, knowing full well that the restored site won't work but it's “not my problem”. I am here to help you achieve your goal of having your site transferred, even though it means dabbling into things that are not related to our software. It's not like you can easily find this information anywhere; it's buried deep into the comments of unrelated pull requests and issues in the Joomla! GitHub project…

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!

objectivetop

Hi Nicholas. 

Thank you very much for all the details. Amazing! 

What intrigues me is that I was able to use Akeeba just fine without FTP not so long ago to restore the J! 3 and J4.3 websites.

What scares me is you are saying that the website is not working correctly, although I can install scripts and all pairs are working fine. It is like an undiscovered condition.

Now, I`ve been in contact with my web host and they say the suggested modifications can only be applied on dedicated  (VPS) servers. For now, I`m on a shared server.

I understand this is beyond support for your component, but is there any other workarounds?

Also, based on your experience, what decent ( good value for money ) host providers are there?

Kind regards
Cosmin 

nicholas
Akeeba Staff
Manager

I recommend reading the Security Information chapter in our documentation where I talk about users, groups, ownership, and how it's all tied together.

Even when you have a setup with conflicting ownership (PHP runs as an Apache module, Apache runs with a different user and group than the one you use and your web root is owned by) you can still make everything writeable by setting the permissions of the web root to 0777. However, this is NOT a secure setup. Any user on the server could conceivably write to your web root, including other sites which might be hacked. This is one of the many reasons why hosting has moved away from this kind of setup. Most hosts nowadays use virtualisation to create a small virtual host with dynamic memory and CPU provisioning, running in complete isolation from other sites on the same physical host.

The virtualisation setup is how Rochen runs their servers since they first appeared in the mid-00s, about the same time Joomla! forked off Mambo. I've been using them for my own sites since then. Full disclosure: Rochen gives us free of charge VPS hosting for our business site, but I am paying their standard price for hosting my own sites. I only recommend hosts which I am comfortable paying for myself for my own sites; I never recommend any hosting company for any other reason, and absolutely not any hosting companies I disagree with their server setup to begin with. Another good host is CloudAccess, albeit their setup is a tad slower for less used sites. I use them for a few test sites. A host I have not tried myself but I've heard good words from my friend and Joomla! co-founder Brian Teeman is ScalaHosting. It's really fast, but less polished around the edges. I know from our support experience that it's a bit rough setting up CRON jobs, but once you set them up they work perfectly well. Finally, there's Amazon Lightsail BUT it's expensive, and you get to do a lot of server management yourself. Going from shared hosting to Lightsail is like going from a BMW 3 Series to a stripped-down Mitsubishi Lancer Evolution with a nitro tank and a roll cage: sure there's a heck of a lot more power, but there's little creature comfort, and a huge margin for screwing yourself up. That's why I don't generally recommend this to the masses.

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!

objectivetop

Thank you very much for al the information, Nicholas.

Kind regards
Cosmin

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!