Install Laravel 4 on Windows 7

Working with laravel Shirt I want to learn new things and it seem a lot of changes already happened. Specially PHP. First time I learn about this lang I see 4.0 version. Today, I see PHP already reach 5.3, 5.4 and so on. I don’t know about OOP in PHP so I decide to learn about OOP by doing it on project.

Laravel is my option after CodeIgniter . As usual, installation is big thing for me and my netbook run on Windos 7 starter.

Steps for Laravel installation on Windows 7 :

Download latest laravel version 

In time of writing I got 4.0.4 version.

Put it on Xampp htdocs directory.

I rename it to laravel after extract its content.

install_laravel_windows7_1

 

Install Git

Git work ‘distribution system control‘ . It will work together with composer.

Download latest version of Git for Windows from here.

Installation is straightforward. A few notes during installation :

– Make sure to choose “Run Git from the Windows Command Prompt” on adjusting your PATH environment section.

Checkout Window style,commit unix-style line endings on Configuring the line ending conversion section.

Install Composer for Windows

Get latest version from here. Install it as usual. Nothing serious here 🙂

Configuration

In this section we just need to check if everything is work.

1. Check php version
C:\Users\pc>php -v

PHP 5.4.7 (cli) (built: Sep 12 2012 23:48:31)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

C:\Users\pc>

2. Check Git version


C:\Users\pc>git --version

git version 1.8.1.msysgit.1

C:\Users\pc>

3. Check composer version
C:\Users\pc>composer --version
Composer version f4baa50a05c62fd29ff1814b8909c0d2f3d37275

C:\Users\pc>

If you see any error message you might need to check your PATH setting.

Type path and click on “Edit the system environment variables

install_laravel_windows7_2

 

 

Click Edit the system environment variables.

install_laravel_windows7_3

 

Click on Edit button after choose path.

install_laravel_windows7_4

 

make sure value of variable value is correct.

install_laravel_windows7_5

 

Related path value for xampp (php), git and composer on my system :

C:\xampp3\php;C:\Program Files\Git\bin;C:\ProgramData\Composer\bin;

If value is correct but you still get error then you need

Install Laravel via composer

c:\xampp3\htdocs\laravel>composer install

Loading composer repositories with package information
Installing dependencies (including require-dev)
– Installing doctrine/lexer (dev-master bc0e1f0)
Loading from cache

– Installing doctrine/annotations (v1.1.1)
Loading from cache

– Installing doctrine/collections (dev-master 3db3ab8)
Loading from cache

– Installing doctrine/cache (dev-master 89493d2)
Downloading: 100%
Downloading: 100%
Downloading: 100%

 

[Composer\Downloader\TransportException]
The “http://nodeload.github.com/doctrine/cache/zip/89493d2c6e1362f581f9de1c
1871cc52eb29c030” file could not be downloaded: failed to open stream: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?

 

install [–prefer-source] [–prefer-dist] [–dry-run] [–dev] [–no-dev] [–no-c
ustom-installers] [–no-scripts] [–no-progress] [-v|vv|vvv|–verbose] [-o|–opt
imize-autoloader]

 

c:\xampp3\htdocs\laravel>

Ups.. looks like I got PHP ssl disabled.

Open php.ini file (in my system its located on c:\xampp3\php\php.ini

install_laravel_windows7_6

Remove ; in front of extension=php_openssl.dll line.

Save file and restart apache.

Retry composer install command and wait.

…………….

……………….

– Installing laravel/framework (4.0.x-dev a18df80)
Downloading: 100%

predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)
monolog/monolog suggests installing mlehner/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
Writing lock file
Generating autoload files
Generating optimized class loader
Compiling common classes

c:\xampp3\htdocs\laravel>

Setting secret key (application key)
c:\xampp3\htdocs\laravel>php artisan key:generate
Application key [b98YU4rKYhXeFnQjeAmaerM6Lr6BgJ5B] set successfully.

c:\xampp3\htdocs\laravel>

Testing 

I think about hello world by visiting http://localhost/public/ but I’m wrong

install_laravel_windows7_7

 

 

Cool welcome page :-).

Picture : Working with laravel Shirt by titeyado

Tags: