Jump to content

Using previous PW installation as template for the next one


recyclerobot
 Share

Recommended Posts

Hi,

I'm trying to build my own install file to be able to start every new PW install with a fixed number of fields,

So far I've dumped my previous PW database into a .SQL file and included it in the install.sql,

during the install it nicely imports all my database settings into my newly installed database

but I do have a problem with the admin user,

when I try to login I get a

This request was aborted because it appears to be forged.

any ideas how I can fix this or copy a database into a new install profile?

  • Like 1
Link to comment
Share on other sites

look here http://processwire.c...s-to-be-forged/

Did you consider using the profile exporter module for this?

jep, I saw the topic but it's not a chmod 777 problem, I think it has something to do with the salt parameter in the config conflicting with the user already in the DB?

looking into the module, trying to automate it, thanks for the tip! :)

Link to comment
Share on other sites

  • 1 month later...

You can also add this line to /site/config.php if you want to permanently or temporarily disable the CSRF protection that is causing that message:

$config->protectCSRF = false;

I gave this a try on an install I'm currently working on and instead of being told "the request appears to be forged" I just get a blank white page... weird. My server is running LiteSpeed if that makes a difference.

I'd love some help on this as the site has been made live but no one is able to edit it... grrr.

UPDATE:

I quickly enable debug and grabbed the output, its as follows...

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/niagara/public_html/wire/core/Session.php on line 265

UPDATE 2:

Call off the Calvary! I had trailing whitespace in a module I made... I'll admit defeat and leave this here for anyone else who might make this mistake.

  • Like 1
Link to comment
Share on other sites

  • 6 months later...

I followed the above steps but still not working, my webpage is running on 1an1 cloud computing server it works but can't access the admin area, here is what I did to try to solve it:

1.- site/assets,  chmod 777 recursively

2.- $config->protectCSRF = false; added to config.php

Now I try to login and get the same login screen

post-1191-0-05675400-1372754367_thumb.pn

Regards.

Link to comment
Share on other sites

Did you use Profile Exporter? Because I thought it was once it won't export or create session folder. Also it doesn't export users.

So to transfer a site I always use simple DB->DB dumb and files over FTP and done, and I recommend not use Profile exporter. Profile exporter is more for creating profiles to install with a new install, originally built explicit for upgrade from 2.1 to 2.2.

  • Like 2
Link to comment
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
 Share

×
×
  • Create New...