Creating Symfony2 project with netbeans ide 7.2.1

Some notes:

  1. Make sure you set the php right in Netbeans options.
  2. No need to decompress the archive file!
  3. You need php 5.3 and later to run this!

Download symfony2 from:http://symfony.com/download

Linux command: –namespace=”[namespace name]/[bundlename]” –bundle-name=”[bundlename]” –format=”yml” –dir=”src”

Mode rewrite for apache: apt-get a2enmod rewrite.

Don’t forget to edit the /etc/apache2/sites-enabled/000-default file, make sure the AllowOverride is set to “All”.

Configuring php.ini for upload

Well – sometimes you need to upload files bigger then the default 2M.

In php, you have to tweak the php.ini to get this done. The first parameter is upload_max_filesize. This one is usually 2M, and set the lower limit (at this point). However, changing this will not give you the option for, let say 100M. for that to happen, you’ll need yet another parameter. You see, the upload size is one thing, which is part of another thing – the maximum post size, or in php.ini lingo – post_max_size. This one default to 8M, so if you change the first to anything bigger then 8M, you will still have a limit of 8M.

You should probably set the post maximum to a higher value then the upload limit, php does this for a reason, which is that files can be a part from a bigger form with additional data/ files.

Yet another point to remember: you might want to check the memory limit option, in case your site is under a lot of memory intensive actions.

Changing time zone in php.ini

In order to get rid of the pesky warning in php about time zone, you can so one of two things: add call to the date_default_timezone_set on every file header, or, define it in your php.iniĀ  like this: date.timezone = US/Central, where the actual values relates to the server time zone.

Looking for you own time zone? not a problem. here are the php time zones.

And you can still use the date_default_timezone_set if you need to stray from the default timezone.