PHP 7.4: 'Error: Failed to start application: Failed to start the session'

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
Post Reply
chtrede
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 140
Joined: Tue Aug 28, 2007 9:38 am

PHP 7.4: 'Error: Failed to start application: Failed to start the session'

Post by chtrede » Mon Nov 29, 2021 11:39 am

Hi there,
I moved my Joomla installation 3.10.3 to a new server. On that machine the installation does not run anymore under PHP 7.4, but only under PHP 7.3.
As an error message I get

[code]Warning: session_start(): Failed to read session data: user (path: /var/cpanel/php/sessions/ea-php74) in /home/yyyyyy/public_html/libraries/joomla/session/handler/native.php on line 260
Error: Failed to start application: Failed to start the session[/code]

Any ideas?

Thanks a lot
Last edited by imanickam on Tue Nov 30, 2021 6:19 am, edited 1 time in total.
Reason: Changed the Subject to reflect the issue/question

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23534
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Server moved - Joomla not workind anymore under PHP 7.4

Post by pe7er » Mon Nov 29, 2021 3:36 pm

How did you move your website to another server?
Did you use Akeeba Backup to backup and kickstart to restore it?

It seems that your website is not able to get the session data from the database.
Are your database settings correct (in configuration.php) ?


btw: Using PHP7.3 is not a good idea because on 6 Dec 2021 the support for PHP 7.3 security patches ends, see:
https://www.php.net/supported-versions.php
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

User avatar
abernyte
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4070
Joined: Fri May 15, 2009 2:01 pm
Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड

Re: Server moved - Joomla not workind anymore under PHP 7.4

Post by abernyte » Mon Nov 29, 2021 4:30 pm

Ensure that the mysqli module is enabled in php7.4.
"Those who expect to reap the blessings of freedom must, like men, undergo the fatigue of supporting it." Thomas Paine

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28444
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Server moved - Joomla not workind anymore under PHP 7.4

Post by Per Yngve Berg » Mon Nov 29, 2021 5:33 pm

Make sure the session Path is writeable. As you can see, the path is different for php 7.3 and 7.4

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11345
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: PHP 7.4: 'Error: Failed to start application: Failed to start the session'

Post by sozzled » Mon Nov 29, 2021 5:54 pm

See viewtopic.php?t=982009. The problem can be caused by any number of a dozen reasons. As @abernyte says, it could be caused by not enabling the MySQLi PHP extension (if the file configuration.php specifies mysqli as the database connection method); as @Per says, it could be caused if save.session.path is not defined; as @pe7er says, it could be caused if the configuration.php file settings are misconfigured.

The problem can also be caused if some of the "optional" technical requirements for J! 3.x are not met; errors will result if you are using the database to save sessions and the _sessions table is full.

I have been researching this "'Error: Failed to start application: Failed to start the session" problem over the past three to four weeks in preparing an article. I can't tell you where to find this article—that would be self-promotion and that's against the forum rules—but I've summarised the various common (and some not-so-common) reasons. I am following this topic to see if we've found another cause for the error and, if we have, I will add it to my list. 8)
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)


Post Reply

Return to “Installation Joomla! 3.x”