Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

"No input file specified" - Laravel installation

When I run 127.0.0.1:8000 it says "no input file specified".

My Homestead.yaml code is This is all according to the video tutorial by Hampton Paulk

ip: "10.0.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: /Users/nkvidwan/.ssh/id_rsa.pub

keys:
    - /Users/nkvidwan/.ssh/id_rsa

folders:
    - map: /Users/nkvidwan/Homestead/Projects
      to: /home/vagrant/Code

sites:
    - map: laravel.dev
      to: /home/vagrant/Code/laravel-basics/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

I've had this happen to me once before, but it's a fuzzy memory at this point.

  • are you entering the URL of laravel.dev or 127.0.0.1:8000?
  • did you modify the hosts file to point laravel.dev to 127.0.0.1:8000?
  • did you restart vagrant after these changes?
  • is lavarel-basics the root folder of your project? (I haven't gone through this course yet)

That's all I can think of for now, and I won't be available again until tomorrow evening - I wanted to at least give you a few ideas for now.

Cheers

Before I head to work, here is my yaml - very similar to yours, except that my project's root folder is not the default laravel-basics.

ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/Homestead/id_rsa.pub

keys:
    - ~/.ssh/Homestead/id_rsa

folders:
    - map: ~/Documents/Projects/Homestead/
      to: /home/vagrant/Code

sites:
    - map: homestead.app
      to: /home/vagrant/Code/my-first-app/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

If I change the name of my-first-app without updating the yaml file, I receive the same error message "no input file specified". There are likely other ways to get this error, as it's a problem with Laravel being able to find the project and/or map it correctly to the server.

  • I used your code Robert Richey but it is still not working
  • My laravel is installed in laravel-basics not 'my-first-app'
  • I used laravel.dev:8000 as well as 127.0.0.1:800
  • I also did vagrant reload in the console and also vagrant provision

I used

folders:
    - map: ~/Homestead/Projects
      to: /home/vagrant/Code

Hi Pranay,

I'll start going through the course and try to figure this out. In the mean time, I'll tag Hampton Paulk to see if he can stop by.

2 Answers

Hi Robert Richey. I seemed to have solved my problem !!! My Homestead.yaml folder is under src/stubs/ Her is my Homestead.yaml code

---
ip: "10.0.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: /Users/nkvidwan/.ssh/id_rsa.pub

keys:
    - /Users/nkvidwan/.ssh/id_rsa

folders:
    - map: /Users/nkvidwan/Homestead/Projects
      to: /home/vagrant/Code

sites:
    - map: laravel.dev
      to: /home/vagrant/Code/laravel-basics/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

I went through the laravel homestead documentation and I found that I hadn't done bash init.sh "to create the Homestead.yaml configuration file. The Homestead.yaml file will be placed in your ~/.homestead directory"

I also went to the Homestead/src/stubs directory and did the vagrant up and `vagrant ssh

I had changed to `laravel.dev in my /etc/hosts file

I'm so glad to hear it's finally working and thanks for sharing your solution!

I was able to follow along with the videos without any issue - I'm using Windows 8.1 as my host, while Hampton is using a Mac. I did notice a difference in your yaml file from the one Hampton had us create - Code directory was changed to Sites.

Consider going through the following videos again:

Hi Robert Richey. Thanks for you replies. I deleted everything and redid the whole process, reinstalled virtualbox and vagrant

When I do go to 127.0.0.1:8000 it still gives the same output: No input file specified

After I install laravel and go to the file public, the pwd shown is /home/vagrant/Code/laravel-basics/public

Here is the new yaml file

ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Homestead/Projects
      to: /home/vagrant/Code

sites:
    - map: laravel.dev
      to: /home/vagrant/Code/laravel-basics/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

At this point, it may be worth contacting support. Provide a link to this thread to help them see what all has been tried.

I understand how frustrating this can be. I'll still note that your Code directory should have changed to Sites when following along with the videos.

folders:
    - map: ~/Homestead/Projects
      to: /home/vagrant/Sites

sites:
    - map: laravel.dev
      to: /home/vagrant/Sites/laravel-basics/public

I'm genuinely interested in the solution when you figure this out. I'm subscribed to the thread and will know when a new post is made.

All the best,

Robert