Laravel no input file specified - php

I am getting the "No input file specified" error when running the app in the browser.
It should provide me with the Laravel home page.
Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: laravel6.test
to: /home/vagrant/Code/laravel6.test/public
hosts file
#
127.0.0.1 localhost
192.168.10.10 laravel6.test[enter image description here][1]

Here's how to fix it you need to have your homestead.yaml file settings correct. If you want to know how its done follow Jeffery Way tutorial on homestead 2.0 https://laracasts.com/lessons/say-hello-to-laravel-homestead-two.
Now to fix "Input not specified" issue you need to ssh into homestead box and type
"serve domain.app /home/vagrant/Code/path/to/public/directory" this will generate a serve script for nginx. You will need to do this everytime you switch projects

Related

Existing project run with Laravel homestead (5.4)

I have installed Laravel homestead it's working fine. my problem is how I map existing project to homestead? my Homestead.yaml file as bellow
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: D:/www/Laravel
to: /home/vagrant/Code/Laravel
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
This project generated from Homestead I have another exist project and how to map homestead.I added following code to Homestead.yaml file but it was not working.
- map: D:/www/MyProject
to: /home/vagrant/Code/MyProject
Please anyone can help me Thank you.
you should edit your folders section to map to you www directory
folders:
- map: D:/www
to: /home/vagrant/Code
this will allow you to store all of your projects within D:/www directory and all of them will be mapped to your VM.
now you can add your Site
you should add this under Sites
- map: my-project.app
to: /home/vagrant/Code/MyProject/public
this assumes that your project is located at D:/www/MyProject
also don't forget to add new domain to your hosts file
192.168.10.10 my-project.app
and run vagrant reload --provision
Try this:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: D:/www/
to: /home/vagrant/Code/
sites:
- map: MyProject.app
to: /home/vagrant/Code/MyProject/public
databases:
- homestead
Make sure that:
1) There is a code folder inside C:/users/{currentuser}/
2) You have MyProject folder in D:/www
3) A virtual hosts file entry:
Vagrant box IP MyProject.app
And at last fire vagrant reload --provision command within C:/users/{currentuser}/Homestead folder

Laravel Homestead "No input file specified"

I installed Laravel with Homestead and tried to start a project that I created. Therefore I adjusted the Homestead.yaml to:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Documents/Development/Source/MFServer/
to: /home/vagrant/Code
sites:
- map: local.medifaktor
to: /home/vagrant/Code/MFServer/public
The path is existing but still I get this error message. Can you give me some advice?
I think this only works when you need to reload the file and there is no other problems.
From Jesús' site: http://www.jesusamieiro.com/no-input-file-specified-using-homestead/
“No input file specified” using Homestead - Posted on 02/06/2016
If you see the message “No input file specified” in the browser (using Homestead as development VM machine), one possible problem is that Homestead doesn’t load the parameters from the config file Homestead.yaml
Try to provision the VM another time, running
$ vagrant reload --provision

Homestead no input file specified for custom PHP project

I'm working with Homestead. Laravel apps are just serving fine, but when I try to setup some custom script, it shows me that No input file specified.
Here is my yaml file.
---
ip: "192.168.30.30"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/Mubin/Sites
to: /home/vagrant/Code
sites:
- map: test.app
to: /home/vagrant/Code/test/public
- map: dev.app
to: /home/vagrant/Code/dev/index.php
databases:
- homestead
I just want to put all my code under dev folder and want to access it from vagrant homestead box
Guide where am I doing wrong?
PS.
I tried to remove index.php from the end, and then nginx throws 403 Forbidden
anyone having the same issue, I found a solution, mocked one may be; but it did work for me.
I added new public folder in my dev folder and place all my other custom PHP scripts put in that.
Directory structure was something like this for me
dev
public
folder1
index.php
folder2
index.php
folder3
index.php
...
and I was able to access it like this
dev.local/folder1/index.php
dev.local/folder2/index.php
dev.local/folder3/index.php
and here is my Homestead.yaml file
---
ip: "192.168.30.30"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/Mubin/Sites
to: /home/vagrant/Code
sites:
- map: test.app
to: /home/vagrant/Code/test/public
- map: dev.local
to: /home/vagrant/Code/dev/public
databases:
- homestead
and in my /etc/hosts file
127.0.0.1 dev.local test.app
Hope this will help someone, someday. :)
I'd set up vagrant for laravel and custom PHP projects. Also, integrated with PHP Storm to work with x-debug. Leave a message if you've any issue.
Happy coding, x-debugging.

How to set the directory properly in homestead-laravel?

I am a newbie in PHP and laravel. I have tried the whole night but problems keep occurring. After I set up the homestead.yaml, I ran vagrant up on the command line. The full content of file is as below(BTW, my OS is os x 10.10):
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/github_rsa.pub
keys:
- ~/.ssh/github_rsa
folders:
- map: "/Users/yobichi"
to: "/home/vagrant/yobichi"
sites:
- map: int2016.app
to: "/home/vagrant/yobichi/public"
databases:
- homestead
everything seems going well, except an issue of database: ==> default: createdb: database creation failed: ERROR: database "homestead" already exists. But when I enter the site address: int2016.app on the browser, an error of 403 forbidden occurs. And I tried to enter the dir of "/home/vagrant/yobichi", it was empty. I wonder how should I set the directory of folders and sites properly so that I can solve the problem? Thank you in advance!
Please try the following set up in your Homestead.yaml. Please also make sure that you have got proper intendation.
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
hostname: int2016
name: int2016
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: "/Users/yobichi/laravel/int2016"
to: "/home/vagrant/yobichi"
sites:
- map: int2016.app
to: "/home/vagrant/yobichi/public"
databases:
- homestead
To create a complete new box you can run vagrant destroy and after that vagrant up again.

Laravel Homestead: This webpage is not available

Newbie to laravel homestead and vagrant and struggling to get my site to load in the browser. Everything looks as though its running, successfully ran vagrant up.
When i type url http://local.bookings.com:8000/ I receive message "This webpage is not available"
I should point out however that I am on Windows 7 and have nothing visibly running in Oracle VM VirtualBox Manager.
Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: c:/Users/me/.ssh/github_rsa.pub
keys:
- c:/Users/me/.ssh/github_rsa
folders:
- map: /Users/me/documents/projects/bookings
to: /home/vagrant/Code
sites:
- map: local.bookings.com
to: /home/vagrant/Code/bookings/public
variables:
- key: APP_ENV
value: local
hosts file
127.0.0.1 local.bookings.com
Edit the host file as
192.168.10.10 local.bookings.com
Hope this will work.
I had this problem, make sure you run homestead up or vagrant up and change the host file to 192.168.10.10 local.bookings.com

Categories