How to diagnose and repair a common error with Joomla websites: “Failed to start application: Failed to start the session”
Taming the Joomla session handler
Common causes for the “failed to start session” error in Joomla
… and some not-so-common causes
I think it’s fair to say that one of the most baffling problems people encounter with Joomla! is when they get an unexpected fatal error that reads “Failed to start application: Failed to start the session”. The Joomla! forum is rife with examples of this problem and, unfortunately, many people do not get always get answers that solve their problem.
My website, stopped working all in a sudden. I uploaded an article and it was working for a week and then, without any further changes, I get this message: “Error: Failed to start application: Failed to start the session”. I even cannot login to my Joomla backend!forum user, Joomla Forum, 13-Sep-2020
I won’t go into technical details about what a sessionhttps://www.quora.com/What-are-internet-sessions is but it’s important; you can’t work with internet websites without some kind of session management. Sessions are used to make sure that you get what you want and you don’t get something that someone else wants if they happen to be accessing the same page that you are accessing. Sessions are a way of keeping your interaction with a website separate from other people who may be interacting with the website.
Joomla uses sessions. The details about Joomla sessions are stored on the server. There are several ways that website owners can configure Joomla to handle session management but the two most common methods are to store the session data in the database or to store the session data on a temporary file. We will examine both methods in this article. We will also look at some of the common causes for why people get these “failed to start the session” errors.
Taming the Joomla session handler
How Joomla manages sessions is defined in System » Global Configuration » System » Session (click the image on the right of this page to see what this looks like). There are [at least] two options for the field Session Handler: Database | FilesystemIn J! 3.x, the two options are labelled Database | PHP. The default setting is Database.
Again, without going into the technical detailsFurther reading see https://github.com/joomla/joomla-cms/issues/19585, since arrival of PHP 7.0 the generally accepted consensus is that it’s more efficient to allow PHP to manage sessions instead of using the database. Therefore, it is strongly recommended that people should change setting for Session Handler = Filesystem.
While on the subject of using the database to manage sessions, be aware that the number of sessions can become quite large and can eventually cause the _session table to become full.see “The table ‘#__session’ is full” Error in Joomla
Common causes for the “failed to start session” error in Joomla
What the experts have to say
This particular error can’t necessarily be blamed on Joomla. It often has something to do with a misconfiguration in your configuration.php file, a problem with your PHP version or with your database itself.source: How to fix Joomla error: failed to start application: error starting the session. In this case, on the one hand the expert offers help with fixing the problem with Joomla while, on the other hand, they take a swipe at Joomla by commenting that they “don’t like it”. It is certainly true that the error can be attributed to a range of these factors but anyone encountering the error needs to eliminate each factor separately. In general, however, most of these problems occur from causes that are the website owner’s responsibilities to control.
What the rest of us have to say … it could be any one of a dozen reasons
A quick search shows over a hundred discussions on this forum having the subject “Error: Failed to start application: Failed to start the session”. I won’t post the links to all the 106 discussions that I found, but here are twelve recent examples:
1. https://forum.joomla.org/viewtopic.php?t=976884
2. https://forum.joomla.org/viewtopic.php?t=981538
3. https://forum.joomla.org/viewtopic.php?t=977108
4. https://forum.joomla.org/viewtopic.php?t=977980
5. https://forum.joomla.org/viewtopic.php?t=972331
6. https://forum.joomla.org/viewtopic.php?t=957472
7. https://forum.joomla.org/viewtopic.php?t=967847
8. https://forum.joomla.org/viewtopic.php?t=976043
9. https://forum.joomla.org/viewtopic.php?t=961602
10. https://forum.joomla.org/viewtopic.php?t=978786
11. https://forum.joomla.org/viewtopic.php?t=971265
12. https://forum.joomla.org/viewtopic.php?t=978059sozzled, Joomla Forum, 13-Sep-2020
Searching discussion forums is always a good idea. The same kinds of questions are often asked many times—the symptoms may be the same but the causes are different—and it really helps if you use the actual error message text when you do your research.
Make sure that your version of PHP can connect to the database.
The documents Optional Technical Requirements for J! 3.x or Optional Technical Requirements for J! 4.x (whichever applies to your particular circumstances) are slightly mis-titled. If Joomla has no way of connecting to the database then nothing is going to work; the “optional ingredient” is how to make that connection.
I changed [the session handler] from “database” to “none” [and] the front end [displays] Error: Failed to start application: Could not connect to MySQL server.forum user, Joomla Forum, 14-Aug-2020
In this particular case, the user had changed to PHP 7.3 but had not installed the PHP MySQLi extension. Joomla could not connect to the database server and the user could not login or do anything. Joomla has a limited number of database connection methods and not all of them work with all versions of Joomla.
Unusual causes for the error
Tinkering with the configuration setting to change the SQL user password
I’m wracking my brains trying to figure this out. I’ve just copied my website from a Ubuntu 14.04 server to an 18.04 instance and can’t connect. The error is “Warning: session_start(): Failed to read session data: user (path: /var/lib/php/sessions) in ../libraries/joomla/session/handler/native.php on line 260
Error: Failed to start application: Failed to start the session.”
The problem appears to be database configuration (at least). The above directory is accessible and writable … and I can log into the database as the dbuser in the configuration.php file, using the password specified there, and can see all the tables. But I’m clearly missing something … any ideas gratefully received !
… [LATER] … I was an idiot. I'd updated the password in the configuration file and must have had a dodgy keyboard as one of the characters was duplicated so in fact the password wasn't correct … and I must have looked at it a thousand times!forum user, Joomla Forum, 13-Sep-2020
I’m not quite sure what the lesson is here, whether it’s to make sure that you keep your keyboard clean or whether there’s a case to be made to change the configuration.php file by hand when copying a website from one server to another. We’ve probably all made silly little mistakes like this in our lives and we’ve had to eat a lot of humble pie when we stomp into a discussion forum without doing a bit more research. I thought I’d share this rather unusual case of mistakenly blaming the culprit.
Oh no, my disk is full
Some webhosting providers offer “unlimited” hosting space and some don’t. When you read “unlimited hosting space” be aware that there may be other limitations (e.g. a quota on the number of inodes allowed for your accountsee https://forum.joomla.org/viewtopic.php?f=48&t=988626).
One of the most puzzling cases I was involved with recently involved solving the mysterious “failed to start the session” error as well as trying to diagnose why the person could not use the Forum Post AssistantTo obtain a list of software you are running on your website, I recommend the Forum Post Assistant tool. reporting tool.
My website is yielding an error:
“Error: Failed to start application: Failed to start the session”
I uploaded and tried to use the fpa-en.php but it just yielded the same result.forum user, Joomla Forum, 25-Oct-2021
Equipped only with some vague information about “server issues”, unsubstantiated suspicions that the website had recently been compromised and further complications involving content filtering policy at the user’s workplace prevented us accessing a range of websites that I routinely visit to obtain information, we spent several hours over the next few days discussing the matter. My suspicion was that there were, indeed, “server issues” that were not obvious.
A few days later the real cause of the problem was revealed:
My website is working now. It appears I had 200GB in my trash folder which needed to be removed.forum user, Joomla Forum, 25-Oct-2021
It doesn’t matter whether people use the database or the file system to handle session information: the data has to be written somewhere. If that storage area is full to capacity then things won’t work. Remember to empty the trash before you put your website to bed at night.