Developing multiple symfony2 projects with xampp/eclipse

Discuss installing Symfony 2 here

Moderators: tiagojsag, dcobalt

Developing multiple symfony2 projects with xampp/eclipse

Postby klein » Fri Jan 04, 2013 4:01 pm

hello everybody

im a newbie at web application development and just managed to install a bunch of tools like xampp and eclipse and finally got the symfony demo app running on the local webserver. So far so good, but now id like to get organized to work with mulitple symfony projects at a time, without ending up in a mess (on file system level). For my personal taste, I reckon it would be best, if each project (which, in general, consists of more than just the web app) had its own "root" directory with lots of subdirs, where one of them is the web-app subdir containing the symfony directory structure. However, according to the symfony.com book, symfony is downloaded to web server's root directory to grant the web server access to the application files. Of course, this bugs me, because it would force me to extract each web-app subfolder from its project. In another tutorial i learned that i neednt actually move that folder to the web server's root, but can create a symlink from the web server's root to the project's web-app/web subfolder instead. I tried that and it seems to work great. Yet, meanwhile i read in the symfony.com book that the web server also needs writing permission to the app/logs and app/cache subfolder, which i assume no longer is the case with the symlink solution, because the web server isnt even aware of those directories anymore.

Another question is how to set up things with eclipse? If i want to use eclipse for all my web-apps, but also want each web-app project to live under its project root directory, then id probably create a separate workspace for each project..?

Am i off the track? How do you guys organize your projects?

Thanks for your help!

Cheers, Jürg
klein
Junior Member
 
Posts: 1
Joined: Fri Jan 04, 2013 2:23 pm

Re: Developing multiple symfony2 projects with xampp/eclipse

Postby dalu » Fri Jan 25, 2013 8:55 am

I'm using
Linux (Ubuntu 12.10 because it has php 5.4)
Netbeans (7.3 beta)
Apache with suphp so I can have the projects sitting in my /home/user/Netbeansprojects/projectname

I create the project from the cli with composer,
add existing project to Netbeans
create a virtual host in /etc/apache2/sites-available/
Code: Select all
<VirtualHost *:80>
    ServerName shop.localhost
    ServerAlias www.shop.localhost
    ServerAdmin webmaster@localhost

    DocumentRoot /home/dalu/NetBeansProjects/shop/web/
    <Directory /home/dalu/NetBeansProjects/shop/web/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

actually copy a template vhost and nano -w the new file and ctrl+w ctrl+r replace "shop" with the project name, ctrl+o ctrl+x
edit /etc/hosts
Code: Select all
127.0.1.1       dosgames.localhost drupal.localhost shop.localhost projectname.localhost
and so on

a2ensite projectname
run composer update from netbeans
open http://projectname.localhost/config.php
start fffff toying around

--------

I used to use eclipse and found it a pain in the ... behind to use
I used to have a development setup in windows and a headless virtualbox vm running with webmin/usermin installed to easily create virtualhosts and dns entries but it was too complicated in the long run. (database configuration, syncronization, too much overhead work)
So I switched to linux (removed all the marketplace and cloud crap, installed glxdock(cairo-dock)
If I had a computing cluster I would've used gentoo because it was my 1st linux os back in the day and :) first is always the best, it's where I learned to walk in the linux world, learned so much from it. But yeah I don't want to sit there watching compile messages all day and keep the system uptodate.

I use redmine on my production server to create and plan projects and as a wiki. it's not perfect, but it's good enough.
I don't use testing in my projects, I do it the old fashioned way, much more enjoyable, but I might once I have some spare time to learn about it.

oh and I also used windows and wamp or xamp, I don't remember but ugh windows cli ugh, missing libraries and overall meh. My production server is a debian box so I picked ubuntu (since it's based on debian) and although my debian box runs php 5.3, symfony projects work. actually I've only completed 1 symfony project so far which is live, but yeah.
I'm for hire. 60€/h + vat. 50% up front.
dalu
Member
 
Posts: 53
Joined: Fri Nov 02, 2012 9:47 pm


Return to Installation and setup

Who is online

Users browsing this forum: No registered users and 3 guests