I am beginning on Laravel and I have a quick question.
I am going to undertake a small test. I will be developing on Laravel under a Mac with Homestead and a Vagrant box.
My test project is going to be ran on an Ubuntu 16.04 with Php 7.
How can it be ran without Homestead or Vagrant? Is this possible?
You can just use laravel valet
https://laravel.com/docs/5.7/valet
Or php artisan serve
First, download and install lnmp.
Then edit your nginx.conf file, copy the configuration from homestead to the new server.
Finally, reload the nginx and php-fpm service.
Related
i have valet installed and configured on my system.and all i do is go to my browser and do folder-name.test and the project runs.
now,can i run a PHP application which is outside of valet folder with nginx manually?
I have a fresh installed laravel app and when i run php artisan serve it shows me the server information but when i go to that server it gives a cant be reach error. I am not running Vagrant just MAMP but it used to work before. I did tried to install Vagrant in the past and it didn't work that is why i came back to MAMP only. I read something about generating a key with php artisan key:generate which didn't work. Any help is appreciated.
This is the command I am using and the result
$ php artisan serve
Laravel development server started: <http://127.0.0.1:8000>
try to uninstall the antivirus if you have one ,in my case i uninstall avast ,reboot OS and it works for me .
I tried setting up a virtual machine using Homestead box. I followed documentation on Laravel site for setting up Homestead.
When I ran the command vagrant up, it seemed to work in setting a VM. Then it asked to run vagrant provision, which I did.
I can't get pass red text 'You are already using composer version 1.1.3 (stable channel)'. I don't know what to do next.
Update: here is Homestead.yaml file:
Needed to edit the file at
~/.homestead/Homestead.yaml
instead of
~/Homestead/Homestead.yaml
after that reload it as usual
vagrant reload --provision
Add
~/.composer/vendor/bin
to Your PATH on host machine (not inside vm).
After restart terminal You can use homestead command.
I know this might sound really silly, but I'm kinda stuck and need help. I'm trying to use Laravel 5.3 and use Homestead as my IDE. I have previously worked on PHP using NetBeans and XAMPP, but the installation has always been a pain. I have no formal training and have learnt and used basic PHP on my own for my webpages.
I'm running a Windows 8-32Bit OS & here's what I've done so far:
I have downloaded Laravel using Composer.
I have installed Virtual Box & Vagrant.
I have installed Git Bash and ran vagrant box add laravel/homestead (Homestead.yaml was not found in my Homestead folder after running bash init.sh command. I downloaded it from Github and added there).
Set SSH Key.
Ran vagrant up in Homestead folder (the installation was complete).
Issues:
If I just type http://localhost:8000 in my browser, nothing happens. I have to run php artisan serve in the command prompt inside laravel directory and keep the prompt window open for the default Laravel 5 page to open.
If I type http://127.0.0.1:8000 in my browser, nothing happens at all.
So how do I use Homestead then for my development everyday ?
you can try
localhost/project-name/public
if you dont want to run php artisan serve
I am trying to install Laravel for first time. I installed it on my desktop with the following composer command
composer create-project laravel/laravel laravel-app
The command completed successfully without any error but with some messages like
symfony/var-dumper suggests installing ext-symfony_debug ()
symfony/translation suggests installing symfony/config ()
I now did chmod -R 777 larvel-app to make whole folder writable by everyone. I now started php server with following command
cd laravel-app
php artisan serve
and it gave following message
Laravel development server started on http://localhost:8000
When viewed from web browser in address http://localhost:8000, there is nothing, only blank page. When I browse this address, the server seems to quit.
I have following environment:
OSX Mavericks;
MAMP with php 5.4.10 and apache2;
following extensions in php.ini file
extension=imap.so
extension=yaz.so
extension=mcrypt.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so
;;;;;Following are added by me ;;;;no error when starting server
extension=openssl.so
extension=mbstring.so
When I run which php from command line, I get following.
/Applications/MAMP/bin/php/php5.4.10/bin/php
When I tried to run this in mamp ie localhost:8888, it gave 500 internal server error.
Please suggest me, where I might have made mistake.
As a OSX user i strongly recommend you to use Laravel Homestead to develop your applications.
http://laravel.com/docs/5.0/homestead
You only need to install:
Virtualbox
Vagrant
I have my projects in ~/code folder, so everytime i create a new project, i just:
Add project test domain to my local host file (my-project.app pointing to localhost 127.0.0.1)
ssh into the homestead virtualmachine (homestead ssh)
run built in serve command (serve my-project.app /path/to/project/public)
VoilĂ
The most common reason for this is that the web server process does not have write access to the storage folder and its subfolders.
Set the permissions on the storage folder so that the web server can create files.
You don't have to use php serve, mamp does that for you. Make sure you point your directory to public folder. You can also use custom domain for each of your projects.
Also for Mac there is laravel valet. Easy to get started with many php projects.
I think you should move your Laravel Application to
/Applications/MAMP/htdocs/
and then you can access it on
http://localhost:8888/laravel-app