Jump to content

Command line installer

Hari KT

Recommended Posts


I was trying to build a command line installer for processwire . The script basically uses the install.php .

case 0: 
case 1: 
case 2: 
case 4: 
case 5: 

What I am having trouble is at step 5 where it tries to create the user account. 

It throws an exception

Error: Exception: You do not have permission to execute this module - ProcessPageView (in /var/www/pwtest/hello/wire/core/Modules.php line 875)


require 'index.php';

is called. Is there something special to make the `index.php` throwing without an error ?

Thank you

Link to comment
Share on other sites

@Kongondo sure. I will update here.

Quick things : 

* The ok() , err() methods were changed to log to PSR-3 logger.

* All the $_POST values were changed to accept from the method. Eg dbSaveConfig($post) .

$installer = new Installer($psr3logger);

As it is not using global values like `$_POST` and `$_SERVER` all values are passed to methods. Hope this helps!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...