Nimbus Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 4:46 PM, XFallSeane said: Hi, Did you correctly fill in the information in application / App / preferences.php? Expand Hello xD I believe so. I am doing everything locally first to get it working. Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 4:56 PM, Nimbus said: Hello xD I believe so. I am doing everything locally first to get it working. Expand And in local not working ? The error is problem to connect your local database. Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 It auto brings up dashboard now everytime Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 When u click to "Applications" what is displayed? Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 You have to create a folder with the cms files in it, that's what you did, right? Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 5:08 PM, XFallSeane said: You have to create a folder with the cms files in it, that's what you did, right? Expand Yes I did Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 On Windows rather use Laragon it is simpler enlargement Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 5:15 PM, XFallSeane said: On Windows rather use Laragon it is simpler enlargement Expand What do you mean by this? Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 Laragon software for a web server and a local database simply and quickly (simple and efficient) Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 6:30 PM, XFallSeane said: Laragon software for a web server and a local database simply and quickly (simple and efficient) Expand Gotcha! I downloaded Laragon but I'm not sure entirely what needs to be done. It's setup is quite different than XAMPP and I used that because there was a english guide that I could follow easily. Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 Laragon is simply create a folder in the folder www. Restarting laragon. On your browser access to site from http://foldername.test I now recommend version 2 of the cms (by me) Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 6:58 PM, XFallSeane said: Laragon is simply create a folder in the folder www. Restarting laragon. On your browser access to site from http://foldername.test I now recommend version 2 of the cms (by me) Expand Ok I got that figured out and received the same error as in XAMPP Fatal error: Uncaught PDOException: Could not connect to database (test_rpg). in C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Driver\RPDO.php:440 Stack trace: #0 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Driver\RPDO.php(161): RedBeanPHP\Driver\RPDO->connect() #1 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Driver\RPDO.php(464): RedBeanPHP\Driver\RPDO->runQuery('SELECT * FROM c...', Array) #2 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Adapter\DBAdapter.php(118): RedBeanPHP\Driver\RPDO->GetAll('SELECT * FROM c...', Array) #3 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Facade.php(158): RedBeanPHP\Adapter\DBAdapter->get('SELECT * FROM c...', Array) #4 C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Facade.php(1226): RedBeanPHP\Facade::query('get', 'SELECT * FROM c...', Array) #5 C:\laragon\www\BSC\public\index.php(63): RedBeanPHP\Facade::getAll('SELECT * FROM c...') #6 {main} thrown in C:\laragon\www\BSC\vendor\gabordemooij\redbean\RedBeanPHP\Driver\RPDO.php on line 440 Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 Can you share me preferences.php file pls ? Database test_rpg exist ? Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 7:19 PM, XFallSeane said: Can you share me preferences.php file pls ? Database test_rpg exist ? Expand preferences.php <?php declare(strict_types=1); namespace App; /** * This class contains the preferences for the application. * * @package App */ class Preferences { /** * @var string */ private $rootPath; private $themeName; private $baseURL; private $apiUsername; private $apiPassword; private $apiServer; private $apiToken; private $cmsSettings; private $dbIp = "127.0.0.1"; private $dbUser = "root"; private $dbPassword = ""; private $dbPort = "5400"; private $dbName = "BSC"; /** * Preferences constructor. * * @param string $rootPath */ public function __construct(string $rootPath) { $this->rootPath = $rootPath; } /** * @return string */ public function getRootPath(): string { return $this->rootPath; } /** * @return string */ public function getThemeName(): string { return $this->themeName; } /** * @return string */ public function setThemeName($themeName) { $this->themeName = $themeName; } /** * @return string */ public function getDbIp(): string { return $this->dbIp; } /** * @return string */ public function getDbUser(): string { return $this->dbUser; } /** * @return string */ public function getDbPassword(): string { return $this->dbPassword; } /** * @return string */ public function getDbPort(): string { return $this->dbPort; } /** * @return string */ public function getDbName(): string { return $this->dbName; } /* Config API */ /** * @return string */ public function getApiUser(): string { return $this->apiUsername; } public function setApiUser($username) { $this->apiUsername = $username; } /** * @return string */ public function getApiPassword(): string { return $this->apiPassword; } public function setApiPassword($password) { $this->apiPassword = $password; } /** * @return string */ public function getApiServer(): string { return $this->apiServer; } public function setApiServer($server) { $this->apiServer = $server; } /** * @return string */ public function getApiToken() { return $this->apiToken; } public function setApiToken($token) { $this->apiToken = $token; } /** * @return array */ public function getCmsSettings() { return $this->cmsSettings; } public function setCmsSettings($settings) { $this->cmsSettings = $settings; } public function getApiData() { // API login $postData = array( 'grant_type' => "password", 'username' => $this->getApiUser(), 'password' => hash('sha256', $this->getApiPassword()) ); return $postData; } /** * @return string */ public function getBaseURL(): string { return $this->baseURL; } public function setBaseURL($server) { $this->baseURL = $server; } /* Function API */ public function APIcall_POST($server, $postData, $access_token, $calltype) { $ch = curl_init('http://' . $server . $calltype); curl_setopt_array($ch, array( CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'authorization:Bearer ' . $access_token, // "authorization:Bearer", et non pas "authorization: Bearer" 'Content-Type:application/json' // "Content-Type:application/json", et non pas "Content-Type: application/json" ) , CURLOPT_POSTFIELDS => json_encode($postData) )); $response = curl_exec($ch); if ($response === false) { return (curl_error($ch)); } $responseData = json_decode($response, true); return $responseData; } // Permet de rΓ©cupΓ©rer des donnΓ©es depuis la BDD via l'API : liste des joueurs, etc public function APIcall_GET($server, $access_token, $calltype) { $ch = curl_init('http://' . $server . $calltype); curl_setopt_array($ch, array( CURLOPT_HTTPGET => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'authorization:Bearer ' . $access_token, // "authorization:Bearer", et non pas "authorization: Bearer" 'Content-Type:application/json' // "Content-Type:application/json", et non pas "Content-Type: application/json" ) , )); $response = curl_exec($ch); if ($response === false) { return (curl_error($ch)); } $responseData = json_decode($response, true); return $responseData; } Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 do you have the BSC database created in phpmyadmin? Preferably use lowercase words for databases. Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 7:32 PM, XFallSeane said: do you have the BSC database created in phpmyadmin? Preferably use lowercase words for databases. Expand I had it done in XAMPP but I can't figure out how to import databases on Laragon. Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 If u want tomorrow I send you a private message with installation directions for phpmyadmin Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 9:31 PM, XFallSeane said: If u want tomorrow I send you a private message with installation directions for phpmyadmin Expand I think I'm getting somewhere xD Link to comment Share on other sites More sharing options...
XFallSeane Posted April 21, 2021 Share Posted April 21, 2021 On 4/21/2021 at 9:35 PM, Nimbus said: I think I'm getting somewhere xD Expand If you have managed to put the database, in the table cms_settings changes the value of base_URL by the local URL of your site. Now with this base u can update to v1.1 and 2.0 (my new version) Link to comment Share on other sites More sharing options...
Nimbus Posted April 21, 2021 Share Posted April 21, 2021 Getting this error now. Fatal error: Uncaught Error: Class 'App\Preferences' not found in C:\laragon\www\BSC\application\App\ContainerFactory.php:23 Stack trace: #0 C:\laragon\www\BSC\public\index.php(40): App\ContainerFactory::create('C:\\laragon\\www\\...') #1 {main} thrown in C:\laragon\www\BSC\application\App\ContainerFactory.php on line 23 Link to comment Share on other sites More sharing options...
XFallSeane Posted April 22, 2021 Share Posted April 22, 2021 On 4/21/2021 at 11:09 PM, Nimbus said: Getting this error now. Fatal error: Uncaught Error: Class 'App\Preferences' not found in C:\laragon\www\BSC\application\App\ContainerFactory.php:23 Stack trace: #0 C:\laragon\www\BSC\public\index.php(40): App\ContainerFactory::create('C:\\laragon\\www\\...') #1 {main} thrown in C:\laragon\www\BSC\application\App\ContainerFactory.php on line 23 Expand I answered you in private in case but for the others which follow I recommend you to use the new Unleashed version (in my signature) for all new CMS installations. 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