# Installation Problem with DreamFactory beta

**URL:** <https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614>\
**Category:** GitHub Installers\
**Created:** [October 14, 2015, 12:22pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614 "2015-10-14T12:22:05Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Merhawi\_Fissehaye](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Merhawi\_Fissehaye](https://community.dreamfactory.com/u/Merhawi_Fissehaye)\
**Post date:** [October 14, 2015, 12:22pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/1 "2015-10-14T12:22:05Z")

</div>

I downloaded DreamFactory beta from github.  
completed composer install and even done composer update  
then php argisan migrate and then php artisan db:seed  
When I run the app using php artisan serve, it asks me to create a root account. When I submit my admin user details, it takes me to an error page with the following details

```
FatalErrorException in SplashController.php line 51:
Call to undefined method DreamFactory\Core\Components\Registrar::createFirstAdmin()
in SplashController.php line 51
at FatalErrorException->__construct() in HandleExceptions.php line 133
at HandleExceptions->fatalExceptionFromError() in HandleExceptions.php line 118
at HandleExceptions->handleShutdown() in HandleExceptions.php line 0
at SplashController->createFirstUser() in Controller.php line 256
at call_user_func_array:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:256}() in Controller.php line 256
at Controller->callAction() in ControllerDispatcher.php line 164
at ControllerDispatcher->call() in ControllerDispatcher.php line 112
at ControllerDispatcher->Illuminate\Routing\{closure}() in Pipeline.php line 139
at call_user_func:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:139}() in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 103
at call_user_func:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103}() in Pipeline.php line 103
at Pipeline->then() in ControllerDispatcher.php line 114
at ControllerDispatcher->callWithinStack() in ControllerDispatcher.php line 69
at ControllerDispatcher->dispatch() in Route.php line 201
at Route->runWithCustomDispatcher() in Route.php line 134
at Route->run() in Router.php line 704
at Router->Illuminate\Routing\{closure}() in Pipeline.php line 139
at call_user_func:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:139}() in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 103
at call_user_func:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103}() in Pipeline.php line 103
at Pipeline->then() in Router.php line 706
at Router->runRouteWithinStack() in Router.php line 671
at Router->dispatchToRoute() in Router.php line 631
at Router->dispatch() in Kernel.php line 236
at Kernel->Illuminate\Foundation\Http\{closure}() in Pipeline.php line 139
at call_user_func:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:139}() in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}() in HandleCors.php line 43
at HandleCors->handle() in Pipeline.php line 124
at call_user_func_array:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}() in FirstUserCheck.php line 43
at FirstUserCheck->handle() in Pipeline.php line 124
at call_user_func_array:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}() in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle() in Pipeline.php line 124
at call_user_func_array:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}() in StartSession.php line 62
at StartSession->handle() in Pipeline.php line 124
at call_user_func_array:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}() in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle() in Pipeline.php line 124
at call_user_func_array:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}() in EncryptCookies.php line 59
at EncryptCookies->handle() in Pipeline.php line 124
at call_user_func_array:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}() in CheckForMaintenanceMode.php line 42
at CheckForMaintenanceMode->handle() in Pipeline.php line 124
at call_user_func_array:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 103
at call_user_func:{/home/mfissehaye/workspace/projects/dfactory/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103}() in Pipeline.php line 103
at Pipeline->then() in Kernel.php line 122
at Kernel->sendRequestThroughRouter() in Kernel.php line 87
at Kernel->handle() in index.php line 53
in server.php line 21
at {main}() in server.php line 0

```

What is going wrong?

---

<div class="post-metadata">

**Author:** ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)\
**Post date:** [October 14, 2015, 6:35pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/2 "2015-10-14T18:35:17Z")

</div>

I’m not familiar with php artisan serve.  
After you seed the database you should just have to load the site in a web browser. It will walk you through creating the first admin.

You’ll want to check your Apache error logs to see if anything is generated there.  
One problem I see a lot is the Apache process user not having write access to the public and storage directories.

---

<div class="post-metadata">

**Author:** ![Merhawi\_Fissehaye](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Merhawi\_Fissehaye](https://community.dreamfactory.com/u/Merhawi_Fissehaye)\
**Post date:** [October 15, 2015, 9:04am UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/3 "2015-10-15T09:04:01Z")

</div>

Okay thank you @drewpearce. `php artisan serve` is a development server for **Laravel**. I don’t undersrtand the configurations on the **Enable site** section of the [**Install Debian Ubuntu guide**](https://github.com/dreamfactorysoftware/dsp-core/wiki/Install-Debian-Ubuntu). So I chose to just use the php artisan serve command. So please explain the apache configuration instead if you don’t recomment `php artisan serve`

---

<div class="post-metadata">

**Author:** ![Merhawi\_Fissehaye](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Merhawi\_Fissehaye](https://community.dreamfactory.com/u/Merhawi_Fissehaye)\
**Post date:** [October 15, 2015, 9:38am UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/4 "2015-10-15T09:38:51Z")

</div>

I looked into the code and found out that `SplashController` is trying to call the `createFirstAdmin` function on a Registrar object at line number 51. The `Registrar` class doesn’t have that function. The `createFirstAdmin` function is only found in the `User` model inside `vendor/dreamfactory/df-core/src/Models/User.php`. And it is a static function. I tried replacing `$registrar->` with `User::createFirstAdmin` to no success.

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [October 16, 2015, 7:27pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/5 "2015-10-16T19:27:53Z")

</div>

Code changes have been made recently in these areas. Are you on the latest build? Master or develop branch?

---

<div class="post-metadata">

**Author:** ![Merhawi\_Fissehaye](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Merhawi\_Fissehaye](https://community.dreamfactory.com/u/Merhawi_Fissehaye)\
**Post date:** [October 19, 2015, 8:35am UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/6 "2015-10-19T08:35:23Z")

</div>

Thank you @jeffreystables  
I pulled in the changes and faced yet another problem.  
It successfully create the new user. It attempts to go to /dreamfactory/dist, shows an empty page and throws a `RestException - Could not find a service for dreamfactory`. Looking for issues on github, I learned that running `composer install` before setting up `.env` was the problem. So I did exactly the reverse. I setup `.env` before running `composer install`. But that didn’t solve the problem. It still throws the Rest Exception.

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [October 19, 2015, 6:33pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/7 "2015-10-19T18:33:52Z")

</div>

I checked with our engineers on this one. There shouldn’t be a need to edit the code or deviate from the install process to get this working. @aislam helped me review and reiterate the following steps. We tested this several times this morning.

1. `git clone https://github.com/dreamfactorysoftware/dreamfactory.git newInstall`
2. `composer install --no-dev` ( Run this inside `newInstall/` directory. This will also copy `.env-dist` to `.env` and will run `php artisan app:generate` to generate the application key used for data encryption/decryption)
3. Edit `.env` file to enter your database information. (Make sure an empty database exists with proper credentials )
4. Make sure web server can write/read to/from `storage/` and `bootstrap/cache/` directories recursively.
5. Launch the instance from the browser. It should greet you with a welcome and then run the migration/seeder to setup the database, followed by prompting you to create the first admin user.

> Or if the first launch from browser not running the migrate and/or seeder properly then start the process again from beginning and after step 03 do the following…

> …  
> 4. run `php artisan migrate`  
> 5. run `php artisan db:seed`  
> 6. Make sure web server can write/read to/from `storage/` and `bootstrap/cache/` directories recursively.  
> 7. Launch the instance from the browser. It will skip the welcome page and will prompt you to create the first admin user.

Setting the directory permissions right on both `storage/` and `bootstrap/cache/` is critical. This should be done after all command line setup actions and before launching the instance in the browser. Running command-line `php artisan` generates log files owned by the current user (not Apache) and therefore can prevent Apache from being able to write there.

---

<div class="post-metadata">

**Author:** ![Merhawi\_Fissehaye](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Merhawi\_Fissehaye](https://community.dreamfactory.com/u/Merhawi_Fissehaye)\
**Post date:** [October 20, 2015, 2:11pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/8 "2015-10-20T14:11:28Z")

</div>

Thanks @jeffreystables  
I followed the exact same steps. But I am getting the same error.  
The thing is I am using php artisan serve to serve the webpage. Can you test it with this development server and tell me what you found.  
Thank you

---

<div class="post-metadata">

**Author:** ![Merhawi\_Fissehaye](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Merhawi\_Fissehaye](https://community.dreamfactory.com/u/Merhawi_Fissehaye)\
**Post date:** [October 21, 2015, 11:47am UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/9 "2015-10-21T11:47:21Z")

</div>

Thank you @jeffreystables. I was finally able to get everything working using apache. May be there is a problem with the `php artisan serve` command.

Thank you for the continued support

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [October 21, 2015, 1:07pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/10 "2015-10-21T13:07:43Z")

</div>

We haven’t worked with `php artisan serve` before, but we’ll look into it. Glad you were able to get it working the same way we do.

---

<div class="post-metadata">

**Author:** ![aislam](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/aislam/32/421_2.png) [@aislam](https://community.dreamfactory.com/u/aislam)\
**Post date:** [October 22, 2015, 2:05pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/11 "2015-10-22T14:05:37Z")

</div>

`php artisan serve` works now. See the README here [https://github.com/dreamfactorysoftware/dreamfactory/tree/develop](https://github.com/dreamfactorysoftware/dreamfactory/tree/develop) (develop branch)

---

<div class="post-metadata">

**Author:** ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)\
**Post date:** [January 6, 2016, 5:32pm UTC](https://community.dreamfactory.com/t/installation-problem-with-dreamfactory-beta/1614/12 "2016-01-06T17:32:58Z")

</div>


