Jump to content
Sign in to follow this  
pmichaelis

Installation Error session_start()

Recommended Posts

Hey Everybody,

As I was trying to move an exsisting site form my local dev (xampp) to a production server, the following error appeared:

Error: session_start(): Failed to initialize storage module: user (path: /usr/local/www/services/.../data/tmp) (line 103 of /home/.../html/wire/core/Session.php)

This error message was shown because /install.php still exists. Error has been logged. 

 I searched the forum for help, but the only related topic I could find is this one:

Problems with ProcessWire on Cloud Hosting

https://processwire.com/talk/topic/5089-problems-with-processwire-on-cloud-hosting/

The thread says, that it might have something to do with some isses in the master branch of pw. So I downloaded the dev branch (2.4), and made a fresh install. There are no problems with the requirements, nor with mod_rewrite. In the last installation step, after the admin user creation the error message from above appears again.

Is it usual, that pw creates a tmp/data diretory?

I changed the file permissions for the assets and changed the htaccess, but still there is no change.

Thanks for any hints on that. And thnaks for that lovely CMS

Share this post


Link to post
Share on other sites

Strange,

It seems that there might be a stray install.php file at the root dir of production server?? The explanation of the error message comes from wire/core/shutdown.php with the following logic:

else if($config && is_file($config->paths->root . "install.php")) $why = "/install.php still exists.";

Normally install.php will be removed by the PW installer, but maybe there is something preventing it from doing so. Have to tried adjusting the permissions from within the installer. Or checking if there is an old file 'install.php' that can't be removed for some reason?

Share this post


Link to post
Share on other sites

Hello SiNNuT,

thanks for your quick reply!

I removed the install.php manually after the installation process, but the error still exsists.

Do you mean it might be a good idea to check if there are some old files with the same name (install.php) located anywhere else?

I havo no clue ...

Share this post


Link to post
Share on other sites

Nice catch. This is the first time i read something about session.save_handler being set to anything other than files (this is the PHP default) on this forum. As you noticed this will indeed cause problems and lead to a (for most) quite cryptic error message, and is pretty much a show-stopper.

I'm not sure if this happens a lot, but this could be a worthwhile addition to the http://processwire.com/docs/tutorials/troubleshooting-guide/ . Or maybe even better, add a check for this in the install.php/index.php or wherever Ryan thinks this should take place.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By alanxptm
      Hi, I have already tried in different ways and many times to migrate but I always have issues at the end.
      Here's what I have done so far:
       
      case 1:
      1. Install PW on live server (all normal)
      2. Import local DB into live DB
      3. Front page site seems to work but I cannot login into admin page
      case 2 (I'm currently on this stage):
      1. Copied all files from local to live server
      2. Import local DB into live empty DB
      3. Front page works, but any other page and admin page are 404
       
      In both cases:
      - I have changed config.php info accordingly to live server (DB name, DB user and pwd, userauthsalt code)
      - Uncommented RewriteBase / and RewriteBase /pw/ lines on .htaccess
      - applied owner and group permissions to www-data for PW location
      - applied permissions to folders and files accordingly
      - applied a2enmod rewrite to apache2 on live server and restarted service
       
      I have read some posts (Ryan's too) about migration and it seems to me that I'm doing it fine, don't know what it fails-
      I'm on VMWare machine, Ubuntu Server 18.04, php 7.2, phpMyAdmin 5.0.1
      Hope you can help me, thanks in advance
    • By mushmush45
      Hi, 
      Could anyone advise me on the following system requirements, which I am missing for ProcessWire installation:
      DO (pdo_mysql) is required (for MySQL database)
      Fail: GD 2.0 or newer  Fail: JSON support ZipArchive support was not found. This is recommended, but not required to complete installation.    
    • By franciccio-ITALIANO
      Hi, I must change server provider.
      I don't want rewtrite all page and articles, what must I do?
      I download a database copy on my pc, and now?

      Thanks!!
    • By neosin
      During the install process I can never get to Step 4 for setting up an admin account.
      It creates the database and in the screen it shows it installed the database and imported the SQL
      and under that it shows "Profile Import" but nothing else.
      I have the same result with master & dev branch.
      I looked in the database and do not see a user table of any kind, unless it has some other name than "users"
    • By joeck
      Hi Guys,
      I'm trying to do my first migration to the customers existing server (IIS 10) . I ran the site as a subdirectory on my website for test purposes (everything works fine).
      Following the tutorial of Joss, I tryed the site on a local xampp server to make sure, it also works on a root directory. So far so good, everything works.
      Now I moved the files (from the xampp) to the customers server. The root/index page is shown but for every subpage i get 404 Errors...
      Hence I followed the troubleshooting guide for not working URLs:
      On the first sight, the .htaccess file is not recognized, therefore I contacted the host support. They said, it is recognized but not all modules are supported in the processwire .htaccess file. I did the "öalskjfdoal" test in the .htaccess file and didn't get a 500 Error.... BUT the rewrite rule from the hosts support, to proof the file is read, DID work... The support claims, they do not provide debugging... so basically the .htaccess file is recognized and working, but not throwing any errors (for whatever reason).
      Working rewrite rule (from support):
      RewriteEngine On RewriteBase / RewriteRule ^test\.asp$ index.html [NC,L] RewriteRule ^test\.html$ konzept.html [NC,L] RewriteRule ^test2\.html$ team.html [NC,L] The support said, a couple modules are not supported in the htaccess file, the supported ones are listed here: http://www.helicontech.com/ape/ (I think mod_rewrite is supported)
      As I do not completely understand what exactly is happening in the htaccess file, I'm stuck. I tried all suggestions I found regarding this topic on the forum, but none of them solved the problem.
       
      .htaccess.txt
×
×
  • Create New...