Laravel isn't downloading on GIT BASH - php

I am trying to download laravel using GIT BASH, with the prompt
laravel new laravel
This is what it keeps showing me. And Yes! I have composer and its installed in the same directory I tried to download laravel into.

Check that you have added laravel is added to your path so its accessible from anywhere.
To test it try running the command like
path/to/installation/folder/laravel new laravel
If that works then you need to move the installation folder to /usr/local/bin/laravel so that its globally accessible

Related

Git Clone Laravel Website just displays files and directories

I'm still really new to Git version control and Laravel. But I have gotten so far, and I'm not sure now where I am going wrong.
I set up VirtualBox and Vagrant on my local windows machine and installed homestead successfully. I have managed to get my Laravel website (it's only one page at the moment as I learn things) working correctly, it displays the header and the footer and the images load and everything. So that's all good.
So now, I have my Laravel website set up within my virtual vagrant server. On this server, the directory for my website is:
/home/vagrant/Code/sites/public_html
No when I cd to that directory, I ran the following:
git init
get remote add origin https://user#repo/user/publichtml.git
git add *
git commit -m "Initial Commit"
git push -u origin master
(I've substituted user#repo instead of the real URL)
All went through successfully. Great. So now on my live server I ran the following:
cd /home/sites/public_html
git init
git clone https://user#repo/user/publichtml.git
Which again, worked fine. It downloaded all the files into the public_html directory which is great. So then I go to visit the website and this is what I get:
The only explanation for this happening is maybe I need to install something on the server before I clone these files to it. I guess the files in the Laravel folder won't run by themselves? Do I need to install composer and laravel on the server or something? If so, how do I do that, and why don't they run on their own?
I cannot see a .htaccess or index.php in the root directory so I am not sure how it runs anyway.
You should install Laravel using composer instead.
composer create-project laravel/laravel mysite
You should also point the document root on your web server to laravels "/public" folder, making the framework code reside outside of the document root. That's good for security (no one can access any framework code, like your configs etc directly).
You will then find the .htaccess-file in the /public folder.
Please read the Laravel documentation about the different but recommended ways to install Laravel.
Btw, doesn't homestead use Nginx instead of Apache? In that case, .htaccess isn't even used. Please refer to the Laravel documentation again regarding homestead.
You need to redirect traffic to public/index.php instructions for this are webserver dependent.

Azure Websites - new deployment of a PHP app with Composer fails

A deployment of a new PHP app fails with Composer, in the deployment logs, that are located in
D:\home\site\deployments\long-alphanumerical-string\log.log
I see the following:
Could not open input file: D:\home\SiteExtensions\ComposerExtension\Commands\\composer.phar,,0
The same setup works on other environments of the application without any problem.
Check if the Composer extension is added on the Extensions blade
It's possible that your composer installation didn't work well. Check if the mentioned file exists, if it doesn't - get it from https://getcomposer.org/download/ (phar files are at the bottom of the page), upload it via kudu and Redeploy the application.

Installing existant laravel project on wamp for pre-production

I have a existing laravel project that I have been working on for a while now.
I have to put it in a test environnement to show it to my employer.
My problem is that I have no clue how to use my git repo of the project to put it on a fresh installation of wamp server.
1 - I have tried to install it as a whole but failed.
2- Then, I tried creating a fresh copy of Laravel base architecture (that worked) and after, replacing the files I modified on my existing project over on the fresh Laravel project. Turns out, it can not find my login.php page and I am stuck at that point.
So I want to find the easiest way to clone a git repo with an existing Laravel project directly on a wamp server and make it work.
I have been trying for several weeks, please help me.
Thanks
Okay, here are some simple steps to create a copy of your Laravel5 project on another server:
Setup the server (Databases, PHP and so on) and install Composer. If you are local, composer should already be installed
Clone the repository and copy the content to the htdocs or var/www folder, depending on your server system
Now execute composer update to load all dependencies
Last but not least, setup your .env file. Use the .env.example from Laravel5, add your credentials, generate a key with php artisan key:generate
That's it. Now your Laravel5 project should run.

Yii - could not open input file yiic for Yii 2.0

So I downloaded a yii archive then extracted it into my xampp htdocs folder.
I wanted to create a new app but tutorials show to use yiic when creating new webapps. The problem is no yiic is found, and even in the directory, I do not see any yiic file to execute the program.
Should there be a yiic.bat?
I download Yii version 2.0 for the latest framework.
I also tried creating via Yii version 1.6 and the command worked.
The problem is i cant find yiic on 2.0.
Please run init command after installing YII from composer
sudo php init
It will ask for setting the environment, for beginning select "Development"

Symfony2 app/console on a project copy

I have a Symfony2 project setup in /var/www.
Because I want different users working on the same project, I copied this project to their directory and changed the name of the database for example. I did that so they can test their changes on the server rather than installing wamp locally on their machine. Those changes will then be committed via svn/git.
However, the problem I am facing now is:
Because I copied the Symfony2 project to their own directory (e.g. home\mike), the user or I can not execute a php app/console command, because it is still refering to the one in /var/www.
So for example, when I do:
sudo php app/console doctrine:schema:update --force
This command will be executed on /var/www/Symfony rather than on home\mike\Symfony
How can I refer it to his own directory?
Thank you.
At first, try to manually clear cache in your new project path.
Then, check this article, about migrating project: How to override Symfony's Default Directory Structure
Each project has it is own structure and the command.
If you have symfony on www you must have the console file under app

Categories