Advertisement

Error trying to open admin page

Need help with the Administration of your Joomla! 5.x site? This is the spot for you.

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
tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 10:58 am

Hello,

I'm running Joomla 5.2.2 and as of 2 days ago, I've downgraded PHP to a previous version (7.4) to try to fix a bug in a plugin. Later, I returned to PHP 8.1.

Now I'm getting the error on the admin page and on other site pages:
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/portalge/public_html/administrator/index.php on line 2

Forum Post Assitant is returning a 404:

https://portal-gestao.com/fpa-en.php

Can someone please help?

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

Re: Error trying to open admin page

Post by toivo » Mon Dec 09, 2024 11:05 am

Please follow the instructions and post the FPA results into your reply.
Toivo Talikka, Global Moderator

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 11:08 am

@Master

I did that. I've uploaded the fpa-en.php to the root, but still get a 404.

Does this make sense?

User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10437
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Error trying to open admin page

Post by AMurray » Mon Dec 09, 2024 12:17 pm

You possibly need to check the option in your FTP program to do with "preserve timestamp" so it will keep the current time and date of the file. In WinSCP it has that option to "preserve timestamp". Other FTP programs may have the same or similar function.

Refer to https://forumpostassistant.github.io/docs/admin-guide/ - contains informatoin about how to upload and to avoid the auto-delete issue.
Regards - A Murray
General Support Moderator

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 12:24 pm

There is something badly wrong with your installation. For this error message:
/home/portalge/public_html/administrator/index.php on line 2
The entry point is not line 2 so this file must be corrupt. Have a look at it with a text editor. You may need to replace it with the original.

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 12:26 pm

Is there a way to reinstall Joomla?
Would that solve the problem

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 12:37 pm

Try to find out what is wrong first! The fact that fpa-en.php is not working in the root of your site is a worry. Look at the site file structure with a file manager (cPanel or whatever your hosting service provides).

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 3:06 pm

AMurray wrote: Mon Dec 09, 2024 12:17 pm You possibly need to check the option in your FTP program to do with "preserve timestamp" so it will keep the current time and date of the file. In WinSCP it has that option to "preserve timestamp". Other FTP programs may have the same or similar function.

Refer to https://forumpostassistant.github.io/docs/admin-guide/ - contains informatoin about how to upload and to avoid the auto-delete issue.
I'm using CPanel file manager. I see the file there:
Captura de ecrã 2024-12-09 150549.jpg
You do not have the required permissions to view the files attached to this post.

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 3:15 pm

I've replaced /administrator/index.php by the original file and now the admin works again.
Upon trying to open the file locally, Windows 11 is telling me there's a virus or malicious software.
There should be a way to reinstall Joomla to the same version from the Admin Panel.

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 3:30 pm

Still, fpa-en.php is showing a 404.

There's something strange still going on.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 3:45 pm

If admin is now working, try System / Update panel -> Joomla and then Check for Updates. You should see a Reinstall Joomla core files button. But that does not explain why fpa-en.php is not working. Is your OS blocking it?

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 3:51 pm

Tried to reinstall core joomla files, but got this error:
Captura de ecrã 2024-12-09 155028.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 4:01 pm

How much of the Admin interface is now working? I think you need to find out why fpa-en.php is not working. Get it to work and then post its results here.

You may have to take up your problem with Yootheme. The Error page from https://portal-gestao.com/fpa-en.php is generated by Yootheme.

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 4:25 pm

Everything is working on the backend right now.
I'll try to overwrite Joomla files since I'm getting desperate (users too).

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 6:09 pm

PHP is configured to version 8.1 on Cpanel.
But, when running a simple script on the root, like:

<?php
echo 'Versão do PHP: ' . phpversion();
?>


It returns 7.3.33

When trying to open fpa-en.php

I get:

[09-Dec-2024 18:08:27 UTC] PHP Fatal error: Uncaught Error: Call to undefined function str_contains() in /home/portalge/public_html/fpa-en.php:1430
Stack trace:
#0 {main}
thrown in /home/portalge/public_html/fpa-en.php on line 1430

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Error on PHP version

Post by tigger » Mon Dec 09, 2024 6:38 pm

Hello,

On my Joomla 5.2.2 website, I have the following script:

<?php
echo 'Versão do PHP: ' . phpversion();
?>


It returns:
Versão do PHP: 7.3.33

On MultiPHP Manager, the site is configured to use PHP 8.1.

I've tried to add the following to .htaccess:

AddHandler application/x-httpd-php81 .php


But, by doing this, whenever any page of the site is open a file is downloaded with:

Code: Select all

<?php

/**
 * @package    Joomla.Site
 *
 * @copyright  (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

// NOTE: This file should remain compatible with PHP 5.2 to allow us to run our PHP minimum check and show a friendly error message

// Define the application's minimum supported PHP version as a constant so it can be referenced within the application.
define('JOOMLA_MINIMUM_PHP', '8.1.0');

if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<')) {
    die(
        str_replace(
            '{{phpversion}}',
            JOOMLA_MINIMUM_PHP,
            file_get_contents(dirname(__FILE__) . '/includes/incompatible.html')
        )
    );
}

/**
 * Constant that is checked in included files to prevent direct access.
 * define() is used rather than "const" to not error for PHP 5.2 and lower
 */
define('_JEXEC', 1);

// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
Can anyone help?
Last edited by toivo on Mon Dec 09, 2024 8:33 pm, edited 1 time in total.
Reason: mod note: merged with the current topic

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 7:53 pm

str_contains is a PHP 8 function. Go to System / System Information panel / System Information - several of the tabs there will show which version of PHP Joomla is using. You can configure different versions of PHP for different domains in cPanel. Double check what is configured for your domain. A different versions can be configured for the command line too.

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 7:54 pm

@Hero
My admin is now broken. I have access to FTP files, is there a way I can fix this with FTP?

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 8:04 pm

tigger wrote: Mon Dec 09, 2024 7:54 pmMy admin is now broken. I have access to FTP files, is there a way I can fix this with FTP?
This is not a useful description of what the problem might be. Fix the PHP Version via cPanel first. Test with fpa-en.php. It may be that the wrong PHP version is causing other problems.

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 8:06 pm

On CPanel, PHP is set to version 8.1, as mentioned on my previous post.
How can phpversion() show 7.3.33 on the frontend?

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 8:16 pm

In cPanel, go to the MultiPHP Manager. What does it show against your domain? If in doubt, take a screenshot and post here. Look at configuration.php with a text editor (in cPanel). Is there anything in $live_site;?

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 8:21 pm

From CPanel MultiPHP Manager:
Captura de ecrã 2024-12-09 201932.jpg
From the frontend: https://www.portal-gestao.com/php_info.php
Captura de ecrã 2024-12-09 202035.jpg
In configuration.php:

public $live_site = '';


Btw, I can't delete/edit or change configuration.php permissions.
You do not have the required permissions to view the files attached to this post.

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 8:22 pm

tigger wrote: Mon Dec 09, 2024 8:21 pm From CPanel MultiPHP Manager:

Captura de ecrã 2024-12-09 201932.jpg

From the frontend: https://www.portal-gestao.com/php_info.php

Captura de ecrã 2024-12-09 202035.jpg

In configuration.php:

Code: Select all

public $live_site = '';

Btw, I can't delete/edit or change configuration.php permissions.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 8:36 pm

Look in .htaccess to see if anything is overriding the PHP version. Your admin login page is also returning the red Joomla Sorry, your PHP version is not supported error page.

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 9:01 pm

May I post .htaccss here?

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 9:36 pm

No. You can just rename it for a test - to htacess-old for example. Did you use the htaccess.txt that comes with the latest Joomla version? Or did you you use .htaccess inherited from an earlier installation?

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 9:42 pm

I've just updated htaccess.txt and renamed it to .htaccess

It seems I get the same error.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Error trying to open admin page

Post by ceford » Mon Dec 09, 2024 10:08 pm

Your other site: https://training.portal-gestao.com/ seems to be working fine. So what is different about them? Somewhere, your problem site is being told to use an unsupported version of PHP. Have you asked your service provider for help?

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 10:10 pm

I did, and I also find that intriguing.
Even deleting .htaccess provides the same error message.
Where can it be? This is crazy!

tigger
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Mon Oct 13, 2008 9:10 am

Re: Error trying to open admin page

Post by tigger » Mon Dec 09, 2024 10:16 pm

I've noticed I can change configuration.php on the subdomain (working fine), but I can't do it for the main site.
I.e. I can't change permissions, delete the file, replace it, edit, etc.
I get the error:
FileOp Failure on: /home/portalge/public_html/configuration.php: Operation not permitted

Advertisement

Post Reply

Return to “Administration Joomla! 5.x”