Install Laravel framework on WAMP - laravel-4

I have been trying to install Laravel framework on WAMP.
I been following the steps from http://laravel.com/
and Installing Laravel 4.1 in Windows 7 // Make .phar file globally available to windows command line
When i run the command
composer create-project laravel/laravel --prefer-dist , getting the error message
[RuntimeException]
You must enable the openssl extension to download files via https
But i have enabled openssl in php.ini by removing the comment sign.
Please help

If you are using WAMPServer here is the problem:
WAMPServer's PHP CLI ( Command Line Interface ) i.e. running php.exe from command line uses a different php.ini to the one used by PHP in Apache.
Edit \wamp\bin\php\php5.x.y\php.ini
Activate the extensions you require the PHP CLI to have access to in the usual way i.e. remove the comment ';' from the extension=php_xxxx.dll line.

Wamp uses 2 php.ini
first one that you changed from the Wamp panel and second one that located on Apache folder.
i think on the wamp/bin/apache/bin make sure to enable openssl on both and restart the Wamp.

This worked for me. Hope this helps you.
Install Laravel Framework in Windows *PHP version greater than
5.3.7 is required.
Download Laravel from: https://github.com/laravel/laravel/archive/master.zip.
Extract Laravel into the www folder for WAMP.
Download Composer from: https://getcomposer.org/Composer-Setup.exe
Enable openssl from all php.ini files
Install Composer into the same directory php.exe is located.
Click on WAMP icon->PHP->PHP Extensions and enable: php_openssl, php_curl, php_socket.
Click on wamp icon->Apache->Apache Modules and enable ssl_module
Open cmd.
Change into the directory where you extracted Laravel e.g: cd C:\wamp\www\laravel.
Type the command: composer install.
Installation completed.
Open httpd.conf file
Add these lines after Include "c:/wamp/alias/"*
Listen 8000
DocumentRoot c:/wamp/www/laravel/public
Open Browser and go to localhost:8000

You follow given Only 1 step and install laravel 5 and composer in your machine
[1]Paste this in cmd : composer create-project laravel/laravel
when you run above command it will automatically install composer and laravel
OPTIONAL:
if error your configuration does not allow connection to
http//packages.firegento.com in cmd follow this command :
composer config -g secure-http false

Related

How to install composer globally for laravel app in windows?

I have a question related to composer and laravel. My question is whenever I install the fresh laravel app using command :
composer create-project laravel/laravel blog
Inside my C://xampp/htdocs/ directory and then change path to C://xampp/htdocs/blog/, here I am unable to run the composer command but I had already installed composer from its official website globally in C://xampp/htdocs/ directory. So is there any way to use composer command globally whenever I install fresh laravel app, so that I don't want to install composer in the laravel app directory everytime.
Now I guess they provide direct setting up global installation,
Check here
I did it like this a lot earlier,
Change to the path (or you can add that directory to your path later), and run the installer as mentioned on composer download site to download composer.phar.
Create a new composer.bat file alongside composer.phar.
Using cmd.exe:
run
echo #php "%~dp0composer.phar" %*>composer.bat
Then set it to path environment variable(see this)
Test with a new terminal:
composer -V
Will return
Composer version 1.10.6 2020-05-06 10:28:10
go to composer website and download the exe file, you should have it gloablly if you install it that way.
Good luck ^_^

How to install composer - Missing openssl

I have read How to enable PHP's openssl extension to install Composer? and You must enable the openssl extension to download files via https
They both state that the php file needs to uncomment extension=php_openssl.dll from the php.ini files which live in both these folders:
C:\wamp64\bin\apache\apache2.4.17
C:\wamp64\bin\php\php7.0.0
C:\wamp64\bin\php\php5.6.16 ' I don't think I need to, but did it any way
I've done that, and then restarted the PC.
WAMP is running on my Windows 10 machine
The same error always shows when trying to install Composer
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
What do I need to do to install Composer?
Edit
From C:\PHP (the PHP folder) I started a command prompt and ran php -r "phpinfo();"
In the results, there is the following:
OpenSSL support => disabled (install ext/openssl)
I have followed http://php.net/manual/en/faq.installation.php#faq.installation.addtopath
You have multiple version of PHP installed:
C:\wamp64\bin\php\php7.0.0
C:\wamp64\bin\php\php5.6.16
C:\PHP
The PHP version, which you run on the CLI is based on your environment PATH variable. The first PHP path wins.
run php --ini on the CLI. It will show you which php.ini is included and also the path of PHP
edit this php.ini file and activate the extension=php_openssl.dll
then run php -m to check, if the extension is loaded
then run composer

Composer: The requested PHP extension ext-intl * is missing from your system

I am trying to use composer.json file. but, when I am trying to run command 'composer install' in my path/project/, I am getting an error:
I have already configured my wamp for 'extension=php_intl.dll' and copied all icu*.dll in 'D:\wamp\bin\apache\apache2.2.22\bin' from 'D:\wamp\bin\php\php5.3.13' and it's showing in phpinfo():
without copy icu*.dll also works and showing in phpinfo();
Kindly, let me know if I have intl install on my wamp and composer install on my pc then why I am getting this error. really, it is so annoying.
Here is my details:
OS: windows 7 (64)
PHP: 5.3.13
Apache:2.2.22
Composer: installed by executable file
Pear: installed (latest)
PHPUnit: installed (latest)
My composer.json is as below:
{
"name" : "sebastian/money",
"description" : "Value Object that represents a monetary value (using a currency's smallest unit)",
"keywords" : ["money"],
"homepage" : "http://www.github.com/sebastianbergmann/money",
"license" : "BSD-3-Clause",
"authors" : [{
"name" : "Sebastian Bergmann",
"email" : "sebastian#phpunit.de"
}
],
"require" : {
"php" : ">=5.3.3",
"ext-intl" : "*"
},
"require-dev" : {
"phpunit/phpunit" : "~4.0"
},
"autoload" : {
"classmap" : [
"src/"
]
},
"extra" : {
"branch-alias" : {
"dev-master" : "1.3.x-dev"
}
}
}
Let me know if any other details is required..
Any feedback/help would be highly appreciated.
I encountered this using it in Mac, resolved it by using --ignore-platform-reqs option.
composer install --ignore-platform-reqs
After installing with this method, if the package that defines the requirement attempts to use any functions from the specified PHP extension, it will fail irrevocably.
PHP uses a different php.ini for command line php than for the web/apache php. So you see the intl extension in phpinfo() in the browser, but if you run php -m in the command line you might see that the list of extensions there does not include intl.
You can check using php -i on top of the output it should tell you where the ini file is loaded from. Make sure you enable the intl extension in that ini file and you should be good to go.
For php.ini 5.6 version (check version using php -v)
;extension=php_intl.dll
; remove semicolon
extension=php_intl.dll
For php.ini 7.* version
;extension=intl
; remove semicolon
extension=intl
In linux (Debian Jessie for example):
apt-get install php7.0-intl
will make the job to you due will create a simbolic link to it.
To enable intl extension follow the instructions below.
You need enable extension by uncommenting the following line extension=php_intl.dll in the C:\xampp\php\php.ini file.
Once you uncomment the extension=php_intl.dll, then you must restart apache server using XAMPP control panel.
//about line 998
;extension=php_intl.dll
change as
extension=php_intl.dll
(Note: php.ini file mostly in the following directory C:\xampp\php)
Restart xampp
just remove them
"ext-intl" : "*"
from your composer.json file.
Because sometimes for some helper functions, the IDE complains that the extension is missing from the composer.json file. Immediately press Alt+Enter to add it to the composer. But that doesn't mean that composer will count them in. The composer will complain next time while doing some operations. So that, we should not blindly type Alt+Enter rather than installing them manually in composer by doing composer install <package-name>.
As I think you have entered it manually, you should remove it, then install it in proper procedure composer install <package-name>
Or else you can run composer update to count that added dependencies in.
If You have got this error while running composer install command,
don't worry.
Steps to be followed and requirements:
Step1: Go to server folder such as xampp(or) wampp etc.
Step2: open php folder inside that and go to ext folder.
Step3: If you find a file named as php_intl.dll no problem.
Just go to php.ini file and uncomment the line
From:
;extension=php_intl.dll
To:
extension=php_intl.dll
Step4: restart xampp, thats it
Note: If you don't find any of the file named as
php_intl.dll, then you need to upgrade the PHP version.
(with xampp server)open php.ini in ".\xampp\php"
change ;extension=intl to extension=intl
This is bit old question but I had faced same problem on linux base server while installing magento 2.
When I am firing composer update or composer install command from my magento root dir. Its was firing below error.
Problem 1
- The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
Problem 2
- The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP's mbstring extension.
Problem 3
- Installation request for pelago/emogrifier 0.1.1 -> satisfiable by pelago/emogrifier[v0.1.1].
- pelago/emogrifier v0.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
...
Then, I searched for the available intl & intl extensions, using below commands.
yum list php*intl
yum install php-intl.x86_64
yum list php*mbstring
yum install php-mbstring.x86_64
And it fixed the issue.
In latest XAMPP version;
You need to find only intl(Line no 912)in php.ini file.
Change
;extension=intl
To
extension=intl
I have faced the same issue on my server. And it is mainly happened due to miss-match of php version between server version and your system version. I am using Nginx and checked on all my project configuration files, it uses php8.0 but on my terminal it shows php.8.1. Actually my application needs php8.0. The following steps resolved my issue.
To see all my running php versions
sudo update-alternatives --config php
It shows the following page
Selecting php8.0 for my application. Run the command to see Nginx scripts are ok
sudo nginx -t
Then reload the Nginx
sudo systemctl reload nginx
Finally go to your project directory and update or install your composer
composer update
It has been resolved my issue, I expect same will resolve yours.
In my case, I am using ubuntu, run this command, it will be solved if your system is also ubuntu.
sudo apt-get install php-intl

Laravel 4 Installation Problems on WAMP/Windows

First,I use wamp on my Window7.I open php-openssl,and I git pull the laravel from github.com,and then I put laravel on my d:/wamp/www/, I change the c:/windows/system32.But when I open the url
http://localhost/laravel/public
I see this question.
I am a newbie on laravel,and without install on Ubuntu.Where is my wrong, without no pear,or something else? Thank you!
You need to run composer install in a command prompt.
If you do not have composer, download the phar file from their website.
Place the file you just downloaded into the laravel directory.
Then, make sure that the absolute path to php.exe is added to your PATH environment variable.
Then, you can hold down shift, and right click anywhere inside the laravel directory, and open up a command prompt window. Then, run php composer.phar install. The process may take some time, depending on the speed of your internet connection.
Instead of using the above method, you can download the Composer installer for Windows, install it, and just run composer install.
Note that you only need to do this in order to put the Laravel components together. You do not need to run it on a live server.
Please consult the Laravel Docs for installation and other instructions: http://laravel.com/docs
Try This :
Installing Laravel 4 on WAMP
1. Enable OpenSSL
OpenSSL must be enabled in the PHP configuration.
Edit php.ini in your WAMP’s PHP folder, e.g.:
C:\wamp\bin\php\php5.4.12\
Note: This is not the php.ini in C:\wamp\bin\apache\Apache2.4.4\bin.
Find the following line and remove the semicolon save it:
;extension=php_openssl.dll changed to extension=php_openssl.dll
2. Install Composer
(i).Download the Composer Windows installer from getcomposer.org.
(ii). Run the installer.
(iii). When it asks for the location of php.exe, point it to the executable in your WAMP’s PHP folder, e.g.:
C:\wamp\bin\php\php5.4.12\
(iv). Finish the installation.
(v). Open a command-line interface (cmd) and type:
composer
It should return a list of options. If you get an error, restart your computer and try again.
Composer has now been installed and added to your PATH environment variable. This means you can run it from any directory using the command-line interface.
Now we need to install Composer. This is a dependency manager that will download the latest release of Laravel and specific versions of Laravel’s dependencies, such as Doctrine and Symfony.
3.Install Laravel
Now that Composer has been installed, Composer can download and install Laravel onto your system.
(i). Open a command-line interface (cmd).
(ii). Go to the directory in which you want to install Laravel. This is usually your development directory. In this tutorial, we’ll use C:\wamp\www\laravel
(iii). Instruct Composer to install Laravel into a project directory. we use project name myproject.
composer create-project laravel/laravel myproject --prefer-dist
Note: This will install Laravel in a subdirectory myproject of the current working directory.
Three type of installation to be completed
Now your project was running directory like
C:\wamp\www\laravel\myproject\public\
After completed put tick mark and increase the point....
Do php composer.phar dump-autoload or php artisan dump-autoload

Laravel 4 - Composer Error

I have some problems with composer and Laravel 4.
First I downloaded the laravel-master zip file.
But after starting the install command of Composer I get this error:
Screenshot
What am I doing wrong?
You need to enable the OpenSSL extension for your PHP installation. In your php.ini file (in C:\xampp\php) uncomment the following line:
extension=php_openssl.dll
Just remove the ; in front of it.
Once you've saved your changes, restart Apache, and it should work.

Resources