?
avatar joecurtis
joecurtis
4 Jun 2020

When trying to install 4.0 beta 1 on both a Raspberry pi 3 running buster and also a Fedora 23
installation on a separate machine I get the following error as soon as I try to open the site using the extracted files from https://github.com/joomla/joomla-cms/releases/download/4.0.0-beta/Joomla_4.0.0-beta1-Beta-Full_Package.tar.bz2.

Oops! An Error Occurred
The server returned a "500 Whoops, looks like something went wrong.".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

Expected result

Actual result

System information (as much as possible)

Additional comments

avatar joecurtis joecurtis - open - 4 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Jun 2020
avatar skurvish
skurvish - comment - 4 Jun 2020

@joecurtis take a look at this ticket, it may help: #29424


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29425.

avatar richard67
richard67 - comment - 4 Jun 2020

@joecurtis Please make sure your PHP meets the technical requirements https://downloads.joomla.org/technical-requirements and has a sufficient max_execution_time and memory_limit.

avatar richard67
richard67 - comment - 4 Jun 2020

P.S. ... and the updated requirements for Joomla 4 you can find here: https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4.

avatar dgrammatiko
dgrammatiko - comment - 4 Jun 2020

@richard67 that's not a Joomla error. Probably a misconfigured Apache/Nginx - PHP/PHP-FPM

avatar richard67
richard67 - comment - 4 Jun 2020

@dgrammatiko Agree. Just wanted to point to a few docs, maybe some php module is missing. Will give it a bit time and then close it.

avatar dgrammatiko
dgrammatiko - comment - 4 Jun 2020

maybe some php module is missing.

IIRC we did spend some time to get the initial checks right, eg even a PHP4 will echo some nice html instead of some cryptic text. If there are cases that the current code isn't covering then there should be an effort to get some code for those.
Anyways this one here is not a case that Joomla can handle, eg if you're running php-fpm and the socket is not found I think you get this 500 error by Apache/Nginx/IIS. Joomla never executed a single line in this case neither there is something that can do about it.

Anyways my 2p

avatar dgrammatiko
dgrammatiko - comment - 4 Jun 2020

@joecurtis please do a simple check: remove the Joomla content.
Add a single index.php with content

<?php
echo phpinfo();

Try to access your site. Do you see the PHP version + other PHP info?
If not you need to fix your Apache/NginX/PHP

avatar richard67
richard67 - comment - 4 Jun 2020

IRC we did spend some time to get the initial checks right

@dgrammatiko Right. How could I forget that?

avatar joecurtis
joecurtis - comment - 4 Jun 2020

I have Joomla 3.9.19 running successfully on another RPI under NGINX with the same parameter set up.

All permissions are set to 777 ( temporarily ) and my PHP test program reports as follows

Does PHP work?
Yes, it does. Your server has PHP Version 7.3.14-1~deb10u1

Current GD status:

GD support: YES
GD Version: 2.2.5
FreeType Support: yes
FreeType Linkage: with freetype
GIF Read Support: yes
GIF Create Support: yes
JPEG Support: yes
PNG Support: yes
WBMP Support: yes
XPM Support: yes
XBM Support: yes
WebP Support: yes
BMP Support: yes
JIS-mapped Japanese Font Support: no
avatar dgrammatiko
dgrammatiko - comment - 4 Jun 2020

@joecurtis and you subdomain that you try to load Joomla 4 echo's correctly the PHP info?
That's weird. I will try this on the weekend on a raspberry

avatar Fedik
Fedik - comment - 4 Jun 2020

this is joomla error, I mean the error comes from joomla global exception handler,
to see full stack trace need to enable a debug mode or set error_reaporting to maximum in configuration.php,

but I do not know how to do it for installation :)

avatar joecurtis
joecurtis - comment - 4 Jun 2020

Yes. The PHP info is also listed on my test program I just didn't bother to reproduce it.
Interestingly I have joomla 3.x sites running on my fedora machine which operates under apache2. Its just the Joomla 4.0 installation that is giving the trouble.

avatar richard67
richard67 - comment - 4 Jun 2020

@Fedik I always was missing a debug mode for installation.

avatar Fedik
Fedik - comment - 4 Jun 2020

hmhm, try add this at end of installation/includes/framework.php

$errorHandler->setExceptionHandler(
	[
		new \Symfony\Component\ErrorHandler\ErrorHandler(null, true),
		'renderException'
	]
);

this should enable full stack trace instead of Oops! An Error Occurred

avatar brianteeman
brianteeman - comment - 4 Jun 2020

To enable debug mode in the installation
edit the file localise.xml located in the \installation folder and change
<debug>0</debug>
to
<debug>1</debug>

avatar joecurtis
joecurtis - comment - 4 Jun 2020

Tried that and the result is:-
Error
Call to undefined function simplexml_load_file()

in /var/www/blackwood/libraries/src/Language/LanguageHelper.php (line 682)
{
throw new \RuntimeException('File not found or not readable');
}
// Try to load the file
$xml = simplexml_load_file($path);
if (!$xml)
{
return;
}

There appears to be a number of locations with a similar problem

avatar richard67
richard67 - comment - 4 Jun 2020

To enable debug mode in the installation
edit the file localise.xml located in the \installation folder and change
<debug>0</debug>
to
<debug>1</debug>

Thanks @brianteeman ... I hope I'll not forget it until I need it next time.

avatar dgrammatiko
dgrammatiko - comment - 4 Jun 2020

If that's the case then this is foobar:

// Check for XML support.
$option = new \stdClass;
$option->label = Text::_('INSTL_XML_SUPPORT');
$option->state = extension_loaded('xml');
$option->notice = $option->state ? null : Text::_('INSTL_NOTICE_XML_SUPPORT');
$options[] = $option;

avatar richard67
richard67 - comment - 4 Jun 2020

@dgrammatiko Maybe it needs to be "\simplexml_load_file" instead of "simplexml_load_file"?

avatar richard67
richard67 - comment - 4 Jun 2020

@joecurtis What happens if you change following line
https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Language/LanguageHelper.php#L682
from

$xml = simplexml_load_file($path);

to

$xml = \simplexml_load_file($path);

?

avatar joecurtis
joecurtis - comment - 4 Jun 2020

same result.
Symfony\Component\ErrorHandler\Error\ UndefinedFunctionError
in /var/www/blackwood/libraries/src/Language/LanguageHelper.php (line 682)

        {
            throw new \RuntimeException('File not found or not readable');
        }
        // Try to load the file
        $xml = \simplexml_load_file($path);
        if (!$xml)
        {
            return;
        }
avatar infograf768
infograf768 - comment - 4 Jun 2020

To enable debug mode in the installation
edit the file localise.xml located in the \installation folder and change

Nope.

This concerns only debug language

avatar Fedik
Fedik - comment - 4 Jun 2020

Call to undefined function simplexml_load_file()

that sounds like you do not have php-xml extension

avatar dgrammatiko
dgrammatiko - comment - 4 Jun 2020

that sounds like you do not have php-xml extension

@Fedik read my comment above: #29425 (comment)

Probably something is not correct there, this should raise a warning not crash hard.

avatar joecurtis
joecurtis - comment - 4 Jun 2020

@Fedik I didn't have php-xml but have now installed it and also remove the \ from simplexml_load_file. That appears to remove that error but it goes on to the next one

 

Symfony\Component\ErrorHandler\Error\FatalError: Compile Error: require(): Failed opening required '/var/www/blackwood/administrator/cache/autoload_psr4.php' (include_path='.:/usr/share/php') at /var/www/blackwood/libraries/namespacemap.php:93

avatar Fedik
Fedik - comment - 4 Jun 2020

@dgrammatiko maybe there incorrect extension name, or that code just ignored somehow

@joecurtis that maybe something with read/write access, hard to say.
The file cache/autoload_psr4.php will be generated if not exists

avatar dgrammatiko
dgrammatiko - comment - 4 Jun 2020

@joecurtis (Magic Quotes GPC, MB String Overload = off)
(Zlib Compression Support, XML Support, INI Parser Support, JSON Support, MB Language = Default)
All these needs to be installed. Maybe a few more, these are from the J3.x requirements https://downloads.joomla.org/technical-requirements

or that code just ignored somehow

That's what I was trying to point out. This code should fail the installation gracefully not with cryptic messages...

avatar infograf768 infograf768 - change - 4 Jun 2020
Title
Can't start installation on linux
[4.0] Can't start installation on linux
avatar infograf768 infograf768 - edited - 4 Jun 2020
avatar joecurtis
joecurtis - comment - 4 Jun 2020

As I have Installed and am running Joomla 3.x on both the RPI and Fedora platforms and the technical-requirements only cover 3.x then I would have thought that the necessary extensions were present or not as required. I will, however, check and retry,

avatar Fedik
Fedik - comment - 6 Jun 2020

After debugging I found the installer require php-xml extension to be available to start, so ChecksModel.php even cannot start if XML not available.

This because of InstallerApplication tries to detect a language

{
$options['language'] = LanguageHelper::detectLanguage();
if (empty($options['language']))

It looks like we should check for php-xml availability on boot up.
@wilsonge any idea?

avatar Quy Quy - change - 20 Dec 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-12-20 14:40:40
Closed_By Quy
avatar Quy Quy - close - 20 Dec 2020
avatar Quy
Quy - comment - 20 Dec 2020

Please test PR #31735

Add a Comment

Login with GitHub to post a comment