This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Getting Started -> Quick Tour w/o Vendors = Dead End

About symfony tutorials, symfony book and API documentation.

Getting Started -> Quick Tour w/o Vendors = Dead End

by SEO Mofo » Tue Jun 14, 2011 12:02 am

First of all, I'd like to thank everyone who has contributed to the Symfony book and documentation. The resources they've provided to this community are simply incredible, and the quality is second to none. To show my appreciation, I'm submitting a thorough explanation of a bug/stumbling block I just discovered while trying to install Symfony for the first time. :D

The purpose of this post is to point out a source of confusion in the Quick Tour sequence. There is some conflicting/unclear wording that ultimately turned my Quick Tour into a Debugging Tour. ;)

Here is the timeline of events and decisions, as I experienced them:

  • Started here.
  • Acknowledged the server requirements (already had them installed).
  • Came to this paragraph:
    • Ready? Let's start by downloading the "Symfony2 Standard Edition", a Symfony distribution that is preconfigured for the most common use cases and also contains some code that demonstrates how to use Symfony2 (get the archive with the vendors included to get started even faster).
  • Didn't know what vendors was referring to (as this was my first experience with Symfony), but clicked on the download page link anyway, assuming that it would become clear as soon as I saw the download page.
  • From the download page, I see the text that says:
    • If you have Git installed on your machine, download the version without the vendors.
  • I have Git installed on my machine (which is running on Windows 7), so I downloaded the version without vendors and then returned to the previous page.
  • Unpacked the .tgz under my (local) server's root, per the instructions, and proceeded to http://localhost/Symfony/web/config.php
  • Got an error message about my php.ini file (I didn't have a timezone defined), so I edited the file, restarted PHP, and refreshed the config.php page--which resolved the error and allowed me to proceed.
  • Returned to the Quick Tour to find out what the next step was. As a side note, this sentence was slightly confusing:
    • You might also tweak your configuration by following any given recommendations.
    • (The thing that made it confusing was the ambiguity of the word configuration, which could have been referring to php.ini or Symfony's config. Not a big deal, but personally I would change the wording so it's better-aligned with the options presented by the config.php page.)
  • Clicked the link that said Configure your Symfony Application online--got a 500 Internal Server Error page.
  • Clicked the link that said Bypass configuration and go to the Welcome page--got a 500 Internal Server Error page.
  • Quick Tour dead-ends. :cry:

I checked my php.ini file to see if I had made a typo or something--nope. I checked the .htaccess file to see if it required a remote server--nope. I finally checked the PHP error log and found this:

  • Code: Select all
    [13-Jun-2011 13:46:50] PHP Warning:  require_once(C:\zend\Apache2\htdocs\Symfony\app/../vendor/swiftmailer/lib/classes/Swift.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\zend\Apache2\htdocs\Symfony\app\autoload.php on line 31
  • Code: Select all
    [13-Jun-2011 13:46:50] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'C:\zend\Apache2\htdocs\Symfony\app/../vendor/swiftmailer/lib/classes/Swift.php' (include_path='.;C:\zend\ZendServer\share\ZendFramework\library') in C:\zend\Apache2\htdocs\Symfony\app\autoload.php on line 31

Since I didn't have the /vendor directory installed, obviously the required include file couldn't be loaded, which resulted in the fatal error. I returned to the download page, grabbed the version with vendors, installed it, and the errors were gone. :D~:-D~:grin:

I'm not sure where/how Git was supposed to resolve the vendor dependency (or why the instructions implied that downloading the vendor directory was optional), but it never happened. Maybe the instructions are assuming that I'm on a Linux machine? I don't see how that would make a difference, but it's the only thing I can think of that would make my use case unusual.

Anyway, I hope this information is useful. Thanks again for the great work!

-Darren Slatten
SEO Mofo
Junior Member
Posts: 1
Joined: Mon Jun 13, 2011 9:15 pm