PHP Tutorial Laravel 4 Framework Install on Windows

Curtsy: http://www.bogotobogo.com/php/Laravel4/php_laravel4_framework_install_on_Windows.php
php version

The laravel requires php5.3.7+. So, we need to check, php -v:

PHP 5.4.27 (cli) (built: Apr  3 2014 00:56:21)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

It looks OK.

Download laravel from git

We need to download Laravel from: https://github.com/laravel/laravel/archive/master.zip.

Extract laravel

Extract Laravel into the C:\Apache2\htdocs\ which is a DocumentRoot:

Download composer

Download Composer from: https://getcomposer.org/Composer-Setup.exe

Enable openssl

Enable openssl from all php.ini

;extension=php_openssl.dll =>
extension=php_openssl.dll
Install composer

Install Composer into the directory where php.exe is located, C:\php
Composer_setup.png

Enabling PHP Extensions

The following PHP Extensions in C:\php\ext should be enabled: php_curl and php_socket.

Edit C:\php\php.ini file:

extension=php_curl.dll
extension=php_sockets.dll

 

Download and install the framework’s dependencies.

Now, run the composer install command in the root of our manually created project directory (where we extracted Laravel). So, on cmd prompt:

C:\Apache2\htdocs\bogotobogo\Laravel\auth>cd ..
C:\Apache2\htdocs\bogotobogo\Laravel>composer create-project laravel/laravel auth --prefer-dist
Install finished

Here are the directory and file structure under htdocs dir:
hpdocs_dir.png

bogo_dir.png

Laravel_dir.png

auth_dir.png

Let’s see how the browser will do when we type in
http://localhost/bogotobogo/Laravel/auth/public/:
public_dir_final.png

OK, that’s it!

Install phpMyAdmin

We need phpMyAdmin as well.
phpMyAdmin.png

If we want to bypass the login session and directly go into the phpMyAdmin, we need to renameconfig.sample.inc.php to <b.config.inc.php< b=””>and then edit it:

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;
/* Authentication type */

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root_password'; 
$cfg['Servers'][$i]['auth_type'] = 'config';

Now, if we type in localhost/phpMyAdmin, we get this:
phpMyAdmin_direct.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s