Fans of College League and NFL teams should visit free bingo game to bet for top football players. Enjoy the fun of online gambling from our jouer au poker sans inscription site. Take your chance and test your luck to play the gambling games at the sites and enjoy. If you were a novice player, www.71degrees.com/online-poker absolutely free at our website would be the best thing to do.
Jul 06
Digg
Stumbleupon
Technorati
Delicious

Play with me in symfony2 game

Hi to all who can’t live without symfony :)

I’ve finally decided today to install symfony2 under Windows7 and see what the beast it is. Also it’s interesting to see its status, I really can’t believe s2 can be ready until end of year.

So I’ve decided to go with simplest “sandbox” way and after unzipping verify my environment by using this script (as proposed in quick start manual):

http://localhost/sandbox/web/check.php

It turned out that I missed a few things

1. my PHP version is 5.2.6 (I had to install 5.3.2 so it’s good chance to finally look into namespaces and other goodies which it provides)
2. date.timezone = EU (I had to enter manually timezone in php.ini as it was commented out by default)
3. uncomment extension_dir = “ext” (this is commented by default) and uncomment these lines as well:
extension=php_pdo_mysql.dll
extension=php_xsl.dll

Once it’s done I’m good to go with example script:

http://localhost/sandbox/web/index_dev.php/hello/SymfonyLab

Oops.. the following error appears:

Fatal error: Uncaught exception ‘InvalidArgumentException’ with message ‘[WARNING 1549] failed to load external entity “file:///C:usr/www/sandbox/src/vendor/symfony/src/Symfony/Components/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd” (in n/a – line 0, column 0) [WARNING 3084] Element ‘{http://www.w3.org/2001/XMLSchema}import’: Failed to locate a schema at location ‘file:///C:usr/www/sandbox/src/vendor/symfony/src/Symfony/Components/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd’. Skipping the import. (in in_memory_buffer – line 8, column 0) [ERROR 1845] Element ‘{http://www.symfony-project.org/schema/dic/services}container’: No matching global declaration available for the validation root. (in file:///C:/usr/www/sandbox/src/vendor/symfony/src/Symfony/Foundation/Resources/config/services.xml – line 5, column 0)’ in C:\usr\www\sandbox\src\vendor\symfony\src\Symfony\Components\DependencyInjection\Loader\XmlFileLoader.php:283 Stack trace: #0 C:\usr\www\sandbox\src\vendor\symfony\src\Symfony in C:\usr\www\sandbox\src\vendor\symfony\src\Symfony\Components\DependencyInjection\Loader\XmlFileLoader.php on line 283

That was like the red stop sign to me but “no fear for the beer” :)
My friend google says that there is already solution (it is discussed here).

So the actual patch is provided here (it says patch going to be included into next symfony2 release):

http://github.com/fabpot/symfony/commit/269651235ae830fe8d93800f3fc70c6142b8bbc4

Next attempt to run http://localhost/sandbox/web/index_dev.php/hello/SymfonyLab is failed again:

Uncaught exception ‘ErrorException’ with message ‘Warning: date() [function.date]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/Helsinki’ for ’3.0/DST’ instead in C:\usr\www\sandbox\src\vendor\zend\library\Zend\Log\Logger.php line 255′ in C:\usr\www\sandbox\src\vendor\symfony\src\Symfony\Foundation\bootstrap.php:302 Stack trace: #0 [internal function]: Symfony\Foundation\Debug\ErrorHandler->handle(2, ‘date()

That’s easier to resolve as I used wrong timezone “EU” and had to replace with e.g. Europe/Helsinki.
Wuala, it works now!

New symfony2 manual is starting here. So if you like to play games like that one (fix and run) – it has definitely enough space for playing :)

In general it was very interesting also to read custom symfony2-related documentations on their “learn” page http://symfony-reloaded.org/learn.
I realized that symfony2 is actually very different. I’m also did not really find any mention about using of splitting application into modules which seems to be strange. I’d upset if they remove that part of symfony architecture. Oh symfony 1.0.x I’m missing you sooo much :(


Author: symfonian

3 Comments

Henrik Bjornskov
July 7, 2010

Theres no modules in Symfony2, they have been replaced by Bundles which contains Controllers etc :)

At first the Symfony2 change will seem like a big thing but when you actually get to dive into it you are going to love it.

Kenneth van Rumste
July 8, 2010

It can be a pain in the ass to install sometimes, but the bundles system that was implemented seemed very clear to me when Fabien explained it on Symfony Live 2010.
It’s very logic, and I believe that if you read the correct documentation on how to use it, you could get convinced of it too.
have fun! :-)

Symfony2 has a very important use for applications like any games and for splitting application into modules.

Comments RSS TrackBack Identifier URI

Leave a comment