Today, I will be showing you how to setup Symfony 2 in XAMPP environment. This is a real beginners guide, so this post is for beginners, and will be useful to fellas who are new to PHP frameworks, setting up frameworks in XAMPP.
- First thing you need to do is download the latest version of Symfony 2 from the Symfony 2 website. (The most latest version for this moment is 2.7) And also you need to download the most recent version of XAMPP from their website. (The most recent version is 2.4.17). Then install the XAMPP using default settings.
- I hope you have a working version of XAMPP and downloaded Symfony 2 zip file. Create a folder called ‘Symfony‘ inside this path ‘C:\xampp\htdocs‘. (If you haven’t installed under C:\ or installed in different directory, make sure you use that path). Now what you have to do is, extract Symfony 2 zip file in ‘C:\xampp\htdocs\symfony‘ location.
- So, your extracted directory looks like this,
- At the moment, you don’t have to worry about these files and folders. (I am having an thought to start writing a Symfony 2 tutorial soon) But you can always get more information about the folder structure and files from here.
- So this is pretty much it what you have to do for setting up the Symfony 2 in your XAMP. If you go to this link – localhost\symfony\web\app_dev.php, you will see Symfony 2’s welcome screen, which is similar to this,
- But, for some users they won’t see this welcome screen due to a security prevention. To solve this problem, go to ‘web\app_dev.php’ and edit the file. And comment lines from 12 to 18 (the if condition). See below,
- After commenting above line, it should work now 🙂
As I said this a real beginners guide on how to setup Symfony 2 in XAMPP. I am sure you enjoyed this post. Stay tuned for more tutorials in the future. Feel free to explore the power of Symfony 2, if you have any questions, feel free to add it under the comments section below, see you !