Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[IIS] Fatal Error: CosmicCMS - Help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Vik" data-source="post: 471017" data-attributes="member: 84388"><p>I thought that myself and I've reset my password twice now and matched from the MYSQL to the Config. I'm sure that's correct.</p><p>[SPOILER="DatabaseService.php"][CODE=php]<?php</p><p>namespace Cosmic\System;</p><p></p><p>use Exception;</p><p>use PDO;</p><p>use \Pecee\Pixie\Connection;</p><p></p><p>class DatabaseService {</p><p></p><p> public static $instance;</p><p> </p><p> public static function connection(){</p><p> </p><p> $dotenv = new \Symfony\Component\Dotenv\Dotenv(true);</p><p> $dotenv->loadEnv(dirname(__DIR__).'/../.env');</p><p> </p><p> $config = [</p><p> 'driver' => getenv('mysql'),</p><p> 'host' => getenv('localhost'),</p><p> 'database' => getenv('hotel'),</p><p> 'username' => getenv('root'),</p><p> 'password' => getenv('redneck123'),</p><p> 'charset' => getenv('uf8'),</p><p> 'collation' => getenv('collation'),</p><p> 'options' => [</p><p> PDO::ATTR_TIMEOUT => 5,</p><p> PDO::ATTR_EMULATE_PREPARES => false,</p><p> ],</p><p> ];</p><p> </p><p> if(!isset(self::$instance)){</p><p> self::$instance = (new \Pecee\Pixie\Connection('mysql', $config))->getQueryBuilder();</p><p> }</p><p> return self::$instance;</p><p> }</p><p>}[/CODE][/SPOILER]</p></blockquote><p></p>
[QUOTE="Vik, post: 471017, member: 84388"] I thought that myself and I've reset my password twice now and matched from the MYSQL to the Config. I'm sure that's correct. [SPOILER="DatabaseService.php"][CODE=php]<?php namespace Cosmic\System; use Exception; use PDO; use \Pecee\Pixie\Connection; class DatabaseService { public static $instance; public static function connection(){ $dotenv = new \Symfony\Component\Dotenv\Dotenv(true); $dotenv->loadEnv(dirname(__DIR__).'/../.env'); $config = [ 'driver' => getenv('mysql'), 'host' => getenv('localhost'), 'database' => getenv('hotel'), 'username' => getenv('root'), 'password' => getenv('redneck123'), 'charset' => getenv('uf8'), 'collation' => getenv('collation'), 'options' => [ PDO::ATTR_TIMEOUT => 5, PDO::ATTR_EMULATE_PREPARES => false, ], ]; if(!isset(self::$instance)){ self::$instance = (new \Pecee\Pixie\Connection('mysql', $config))->getQueryBuilder(); } return self::$instance; } }[/CODE][/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[IIS] Fatal Error: CosmicCMS - Help
Top