1

I've installed last version of Joomla (3.9.23) and have encountered a problem.

When I install Joomla with automatic setup all is working correctly.

What I need is to install Joomla by deploying configuration.php directly into the website root. I've manually configured it and deleted the Joomla installation folder. When I try to reach the website, I get a white page with a write error on the top left.

I checked the webserver logs and found this error:

[error] 5457#5457: *3 FastCGI sent in stderr: "PHP message: PHP Warning: session_start(): Failed to read session data: user (path: /var/lib/php/sessions) in /var/www/joomla/libraries/joomla/session/handler/native.php on line 260" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: www.joomla-install.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "15.161.48.12:443"

Joomla folder has this ownership www-data:www-data and permission 755 for folders and 644 for files. Connection to the database has been tested successfully with a php test page.

Anyone know how can I fix this?

2
  • Welcome to JSE, please take our tour. I have edited some of the English of your question; if I have in any way damaged the meaning of your question, please edit it again.
    – mickmackusa
    Nov 30 '20 at 23:42
  • This error also occurs when you have a wrong database password / user / database name. Jan 25 at 18:49
1

Green,

That's a very unorthodox method of configuring your site.

Once you have a system generated configuration.php file from the install, you would be best simply moving that around and adjusting it rather than creating one from scratch.

When you say "automatic install" do you mean via a hosting tool like softaculous in cPanel, or do you mean by uploading the zip file for the Joomla package, then running the installer?

Troubleshooting Comparison

I would suggest doing a diff comparison between the one you've created and the one the installer created as you might be missing something.

Key settings to look at:

  • paths to tmp and log folders
  • database username, password and server

Did you install the site so the database was created?

Not only does the Joomla installer create the configuration.php file, it also populates the initial database of the site. So if you've not run the Joomla installer at some stage before using the manually created configuration.php file, you might have an empty database.

"Failed to read session data" would be caused if there isn't a #_sessions table in the database for it to read from.

PHP modules

I did find a Joomla forum post when looking up the error you've provided, but it was missing a clear solution. One thing that was mentioned was to check the PHP modules needed for Joomla are all there. This is probably not the likely cause, as the auto installer gave you a site that was working.

Hope these help. Otherwise you might need to give an example of your configuration.php file.

5
  • Hello Patrick, I've created an ansible script for deploy the joomla CMS, all is working fine if I do the normal installation by using the joomla web configuration, but my goal is to deploy joomla by configure the configuration.php from variables in ansible role. How this field is generated? public $secret = '' is it a simple MD5 salt?
    – Green
    Dec 2 '20 at 13:23
  • A search on that string shows the same answer a few times... $secret : This is generated when Joomla! is first installed and is not changeable. It is used internally by Joomla! for security purposes. Of course, I then went on to test it to see if it can be changed and what it really does :) It's the salt for the session variables for security. So if you change it mid session, your sessions get invalidated. You should be able to set it with a random 32 character string of numbers and letters. See: joomlashack.com/blog/joomla/… Dec 2 '20 at 22:21
  • Reading back on your original error, I've tried a blank $secret value to see if that triggered the error also. It didn't. Hopefully you've gotten the error to go away, or someone with Joomla + Ansible deployment experience (I had to google Ansible) can assist. Dec 2 '20 at 22:24
  • Did you do manual installation by configure configuration.php by hand?
    – Green
    Dec 3 '20 at 8:27
  • I had just edited the configuration.php on one of my sites, then tested logging in to see whether it broken anything. I'd need to look more at the code base, but I'm fairly sure the $secret value is only used for session variable salting. I've been manually tweaking Joomla installation configuration.php files by hand for 15 years :D Dec 3 '20 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.