Installation Error - PHP Warning Import.legacy.php

Need help installing Joomla! 3.x? For all Joomla! 3.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
anubisxvii
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 25, 2021 1:35 am

Installation Error - PHP Warning Import.legacy.php

Post by anubisxvii » Thu Mar 25, 2021 1:45 am

Good Day,
Trying to install Joomla 3.9.23, full stable package. but I'm having an issue with the installation. I can't access the site to complete the install as I get a HTTP 500 Error. Checking the site logs, I get the following error below.

PHP Warning: require_once(/var/www/html/site/libraries/import.legacy.php): failed to open stream: No such file or directory in /var/www/html/site/public/application/framework.php on line 36

PHP Fatal error: require_once(): Failed opening required '/var/www/html/site/libraries/import.legacy.php' (include_path='.:/usr/share/php') in /var/www/html/site/public/application/framework.php on line 36

The error states it can't find a file, but it shouldn't be looking for that file in that location, since it's a directory above where all of the Joomla files are located. Is there some path definition that needs corrected? I double checked the installation directory and they are indeed there it's just that the installer is looking for libraries in the wrong location.

What can I do to correct this?

Ubuntu 20.04
Joomla 3.9.23
PHP 7.4.3

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: Installation Error - PHP Warning Import.legacy.php

Post by Webdongle » Thu Mar 25, 2021 1:48 am

Is it remote or localhost?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17354
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Installation Error - PHP Warning Import.legacy.php

Post by toivo » Thu Mar 25, 2021 2:21 am

The error message is displayed in the installation of Joomla 3.9.23 if the following two conditions are met:
1) the file libraries/import.legacy.php is missing from the Joomla folder, and
2) the sub folder called 'installation' in the Joomla folder has for some unknown reason been renamed 'public'

After the installation package of Joomla has been expanded, no sub folders or files should be renamed or modified.
Toivo Talikka, Global Moderator

anubisxvii
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 25, 2021 1:35 am

Re: Installation Error - PHP Warning Import.legacy.php

Post by anubisxvii » Thu Mar 25, 2021 2:34 am

This is being installed localhost,

Also the installation folder hasn't been renamed. It was expanded to the folder /var/www/html/site/public/

This path has all of the Joomla files, it's just that in /var/www/html/site for import.legacy.php instead of /var/www/html/site/public for import.legacy.php and the libraries folder.

Just want to know why is it looking for this, I checked my Apache2 configuration to ensure that the document root was /var/www/html/site/public and it was. So I'm not sure why it's looking for the files in this location.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17354
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Installation Error - PHP Warning Import.legacy.php

Post by toivo » Thu Mar 25, 2021 4:19 am

anubisxvii wrote:
Thu Mar 25, 2021 2:34 am
Also the installation folder hasn't been renamed. It was expanded to the folder /var/www/html/site/public/
If that were the case, the folder /var/www/html/site/public/installation should still exist. However, it does not exist because the error message is triggered from line 36 of the file application/framework.php. That file framework.php is available from the sub folder 'application' of the folder 'installation' only during the installation process. In this particular instance the file application/framework.php is one level above where it should be.

Suggest that the folder /var/www/html/site/public is cleared, the latest version of Joomla is downloaded from https://downloads.joomla.org, uploaded to /var/www/html/site/public and expanded there so that the installation folder is in the right place.
Toivo Talikka, Global Moderator

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: Installation Error - PHP Warning Import.legacy.php

Post by Webdongle » Thu Mar 25, 2021 4:36 am

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: Installation Error - PHP Warning Import.legacy.php

Post by Webdongle » Thu Mar 25, 2021 4:47 am

toivo wrote:
Thu Mar 25, 2021 2:21 am
The error message is displayed in the installation of Joomla 3.9.23 if the following two conditions are met:
1) the file libraries/import.legacy.php is missing from the Joomla folder, and
2) the sub folder called 'installation' in the Joomla folder has for some unknown reason been renamed 'public'

After the installation package of Joomla has been expanded, no sub folders or files should be renamed or modified.
Ubuntu localhost ... he probably installed as admin (or whatever Ubuntu calls it). But it needs SU Ownership to run. Took me ages to get Joomla to run on my Ubuntu.

#3 of https://docs.joomla.org/Installing_Joom ... bian_Linux is my favourite as it sorts out the ownership.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".


Locked

Return to “Installation Joomla! 3.x”