Skip to content

Development Environment Setup for Windows

Josh Greig edited this page Jan 10, 2019 · 34 revisions

This article is intended to help people set up new personal computers that use Windows for work on the project.

Fork the project

  1. Navigate to https://github.com/hhaccessibility/hhaccessibility.github.io/
  2. Click the "Fork" button.

Install WAMP.

If you already have XAMPP installed, WAMP shouldn't be necessary since WAMP fills essentially the same role.

  1. Go to the "Download" section on http://www.wampserver.com/en/ and download either the 64 bit or 32 bit version.
  2. Use only default settings wherever possible in the installer to keep things simple and easy to remember. If you're forced to add a non-empty password, keep it really simple like 1234 since the password may be readable by others anyway if you get stuck.

If you run into errors about missing vc dll files, install the Visual Studio runtimes such as http://www.microsoft.com/en-us/download/details.aspx?id=30679. You can find them in the dialog on http://www.wampserver.com/en/ where you downloaded the installer.

This step will be finished when you can run WAMP, see it go red, orange, and finally green.

Upgrade PHP to version 7.1 or later.

  1. Open a terminal and run 'php -v' to see if you have 7.1 or later. If it says 7.1, proceed to the next step. 5.6 is too old.

Check if you have a folder like C:\wamp\bin\php\php7.1.10 with your wamp installation. If you have a directory for 7.1 or later, add it to your PATH environment variable.


If you don't have a directory for php 7.1 or later, download a zip from http://windows.php.net/qa/. Extracting to a subdirectory of C:\wamp\bin\php would be good. Update your PATH environment variable to include your new directory containing php.exe.


This step is complete when you can open a terminal/console window, type 'php -v' and see 7 or later.

Verify that the JSON datatype is supported in your database server

  • If you installed MySQL, check the version. You can run a command like 'mysql -V' to see it.
  • JSON was introduced in MySQL 5.7.8 so if you have an older version, upgrade it. You're encouraged to use the latest version of MySQL.
  • If you installed MariaDB instead of MySQL, install MySQL also and make sure it is at least version 5.7.8.

If you run into a lot of problems getting git installed and working from command line in Windows, the following video will show the steps in more detail for installing git bash. https://www.youtube.com/watch?v=albr1o7Z1nw


Before calling this step complete, you should be able to open a terminal/cmd window and run 'git -v' without seeing an unrecognized command message.

Clone the repository on your laptop. Pick a directory and add your repository. The following command sequence should work.


  1. cd c:/
  2. mkdir accesslocator
  3. cd accesslocator
  4. git clone https://github.com/{your github username}/hhaccessibility.github.io.git

Substitute {your github username} with your github username. The URL should match the one for your fork of the repository. For example, if your username was user123, the command would be: git clone https://github.com/user123/hhaccessibility.github.io.git

Install npm.

  1. Consider if you're using 64 bit windows or not and pick the appropriate installer from https://nodejs.org/en/download/
  2. Verify that you have at least version 8.11.3 using "node -v".

Install gulp.

  1. The following commands should work.

  1. cd c:\accesslocator\hhaccessibility.github.io\app
  2. npm install
  3. npm install -g gulp-cli
  4. npm install gulp

Create Database


  1. Create a MySQL database named hhaccessibility. You can do this using phpmyadmin in a web browser while running WAMP installation or using the mysql command in a terminal.

Install composer.

  1. Download the installer executable from https://getcomposer.org/download/ and run it.
  2. Reopen a command window and test that the "composer" command is recognized.
  3. Run "composer install".
  4. Copy a .env file you should have received in an email to your hhaccessibility.github.io\app directory. You may need to use a terminal/console to rename env to .env after pasting the file due to Explorer not thinking it is valid to create a file named ".env".

Create Database

  1. Create a mysql database called hhaccessibility. You can use mysql command line or phpmyadmin to do this.

Add upstream remote

Run the following command: git remote add upstream https://github.com/hhaccessibility/hhaccessibility.github.io.git

Test that the command worked by trying to get latest on your master branch.

  1. git checkout master
  2. git pull upstream master

Test that everything worked.

  1. cd c:\accesslocator\hhaccessibility.github.io\app
  2. gulp
  3. php artisan serve
  4. Hit CTRL and C or CTRL and x at the same time to stop the server.
  5. php artisan migrate
  6. php artisan db:seed
  7. composer all
    This should run all automated tests and they should all pass.
  8. Open http://localhost:8000 and you should see the website looking similar to it does at https://app.accesslocator.com. The Maps probably won't work but that can be fixed later.

For more detail on what those commands do and mean, consult app\README.md.

Possible errors and solutions

Problem 1:

An error message similar to: file_put_contents(hhaccessibility.github.io/app/bootstrap/cache/services.php): failed to open stream: Permission denied

Solution:

php artisan optimize --force

Problem 2:

You see an error message like: RunTimeException in compiled.php The only supported ciphers are AES-128-CBC and AES-256-CBC

This problem is discussed more at: https://github.com/laravel/framework/issues/9080

Solution:

Double check that you copied the .env file from email as mentioned near the composer install step. Run the following commands:
php artisan key:generate
php artisan config:clear

Problem 3:

Argument 1 passed to Collective\Html\FormBuilder::setSessionStore() must be an instance of Illuminate\Contracts\Session\Session

Solution:

delete ./bootstrap/cache/compiled.php

Problem 4:

An error message similar to: bootstrap/../vendor/autoload.php. Failed to open stream: No such file or directory. The "vendor" folder does not exist.

Solution:

composer update --no-scripts

Clone this wiki locally