2012-02-16, Thu

Symfony2 "No input file specified."

When getting started with Symfony2 using Apache and fast-cgi for PHP, you may get the following message come up when trying to open up the /app_dev.php/demo URL.

    No input file specified.

This occurs because the url rewrite module isn’t passing along the pathinfo details properly to the fcgi php. Here’s how you can fix it.

  1. Open the relavent php.ini file
  2. Look for the cgi.fix_pathinfo setting.
  3. You’ll most likely find it set to 0.
  4. Change it so that it reads cgi.fix_pathinfo=1
  5. Save the changes. Restart Apache.

Try loading up /app_dev.php/demo/. It should work now.

Isaac Su

tags: apache fastcgi fcgi php symfony2

---

Comment

  1. It works!!! but only in app_dev.php, no with app.php. Why???

    — roversanz · Mar 28, 10:39 AM · #

  2. Ahhh, you saved my life. This cgi.fix_pathinfo thing was my problem. Stupid nginx, comes with a comment that tells you to set it to 0

    — Anon · May 22, 08:52 PM · #

  3. Thanks, my problem is solved now on goDaddy ;)

    — Denes · Oct 26, 03:33 AM · #

Commenting is closed for this article.

---