We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Problem, Installation

Not able to setup/install Perch

Hello, I have an issue. The Perch login for a client website wouldn't work and I realised it might be because the site was running on version 1. I have tried upgrading to version 2 but I am stuck on the setup page. I have entered all the details correctly but when I click the 'next step' button, the page just refreshes and nothing happens. I have seen a similar post here from before and the suggestion was that PHP sessions aren't enabled. I have checked the server's phpinfo and it indicates that these are enabled. Any thoughts, please? Thanks Martin

Martin Dady

Martin Dady 0 points

  • 3 years ago

Check your database credentials on /perch/config/ . Same thing happened to me where it would not advance into the final step.

Thanks Lexi, do you mean the read/write permissions for the folder?

Nope. The actual DB credentials on config.php or config.127-0-0-1.php files.

Okay. I don't know what that means or how to check. I'll do some research.

There's a file called config.production.php in your perch/config/ folder. That file should have your database credentials.

There is no such file and the config.php file is empty. The setup page has not created the database tables.

There you go then. You'll have to create those files config.production.php

<?php
    define('PERCH_DB_USERNAME', 'username'); your DB user
    define('PERCH_DB_PASSWORD', 'password'); // your DB user password
    define('PERCH_DB_SERVER',   "localhost"); // your database server. usually localhost or 127.0.0.1
    define('PERCH_DB_DATABASE', 'db_name'); // your database name
    define('PERCH_DB_PREFIX',   'perch3_'); // your database prefix

After you've done this you'll have to go back to the last step of installation and it'll connect and create the database tables

Thanks for your help, Lexi, but sadly it hasn't worked.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you checked your error log for any errors?

If the page is refreshing, that does sound like either session issues or that there's a server side rewrite rule that isn't correctly excluding the /perch folder.

Thanks. I have just looked at the server log and the last log among dozens of warnings is the following:

428231#0: *4402884 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open(/var/lib/php/session/sess_6mdrrlt0jlp6683js2ir75nbn6, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP message: PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0" while reading upstream Erreur Nginx

What does this mean?

OK. I have backed up the database, created a new database user and password, uploaded Perch having changed the folder name and have got to the setup page and still the same. Any thoughts? Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

open(/var/lib/php/session/sess_6mdrrlt0jlp6683js2ir75nbn6, O_RDWR) failed: No such file or directory

That means that writing to your session failed. You need to talk to your host about this. Show them the error.

Thanks Drew. I will get in touch with the Moroccan web host who only speaks French!

Follow up.

This was a web server issue. They did what they did and it now works. Thanks for advice and help.