Hari KT Posted February 19, 2015 Share Posted February 19, 2015 Hi, I was trying to build a command line installer for processwire . The script basically uses the install.php . case 0: $this->initProfile(); break; case 1: $this->compatibilityCheck(); break; case 2: $this->dbConfig(); break; case 4: $this->dbSaveConfig(); break; case 5: require("./index.php"); $this->adminAccountSave($wire); break; 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) when 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 More sharing options...
Hari KT Posted February 19, 2015 Author Share Posted February 19, 2015 Yey, I was able to fix it . Thanks guys! Link to comment Share on other sites More sharing options...
kongondo Posted February 19, 2015 Share Posted February 19, 2015 Maybe document how you made this + solved your issue to help the next guy 4 Link to comment Share on other sites More sharing options...
Hari KT Posted February 20, 2015 Author Share Posted February 20, 2015 @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); $installer-> $installer->dbSaveConfig($post); As it is not using global values like `$_POST` and `$_SERVER` all values are passed to methods. Hope this helps! 1 Link to comment Share on other sites More sharing options...
Richard Jedlička Posted March 21, 2015 Share Posted March 21, 2015 Hi, can you please share the installer somewhere? I'm really interested. Thanks Link to comment Share on other sites More sharing options...
Hari KT Posted March 22, 2015 Author Share Posted March 22, 2015 @Richard , Sorry for I could not share for it is not yet open-sourced . Link to comment Share on other sites More sharing options...
Richard Jedlička Posted March 22, 2015 Share Posted March 22, 2015 Ah, ok. So, I'll try to do my own solution. 1 Link to comment Share on other sites More sharing options...
Hari KT Posted March 30, 2015 Author Share Posted March 30, 2015 I will be sending a PR to wireshell . Hope we can improve something https://processwire.com/talk/topic/9494-experimental-wireshell-an-extendable-processwire-command-line-interface/ 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now