webmailcontrol panelclient area


Grove Blog

Help the symfony community and win prizes

July 1st, 2009

Pascal Borreli came up with a great idea to involve the symfony developer community and advance the development of the framework. The event is called one-day-one-ticket and it will give monthly prizes to the developer that fixes the most bugs in symfony. While it is still a good idea to contribute to the community anyway and get your merit badges, a little extra incentive always helps. The winner will be announced on the first of each month and some of prizes include a symfony book from Fabien Potencier, another one of Doctrine from Jonathan Wage, free hosting credit or Amazon gift certificates (these are from us) and a PHP t-shirt from Iteato.it. We encourage everyone to participate, community involvement is the key to the success of a any project. You can also follow the event on twitter.

Bookmark and Share

New PHP 5.3 VPS image available

June 30th, 2009

If you follow PHP news closely, you probably know that today is an important day. PHP 5.3 has been released, featuring some big new features in development for quite some time. Because we know how important is to take advantage of new features, we configured a new VPS image with PHP 5.3.

If you plan to purchase a VPS hosting plan with PHP 5.3, make sure you select the right version in the order form so our provisioning system selects the right image. If you are a current customer and want to run PHP 5.3, let us know and we will help you upgrade free of charge. Please make sure that your applications are PHP 5.3 ready by reading the upgrade guide.

Additionally, our VPS image includes the following software:

  • CentOS 5.3 & Ubuntu 8.10
  • Apache 2.2
  • MySQL 5.1.35
  • PHP 5.3.0
  • APC 3.1.2
  • memcached & memcache PHP extension
  • symfony 1.2.x (older versions are also available)
  • Zend Framework 1.8.4
  • many more.
Bookmark and Share

PHP 5.3 update

June 26th, 2009

The PHP development team announced that has pushed the release of PHP 5.3 a few more days, now to be released on Tuesday June 30th. Although by the version number it does not *seem* to be a major release, it is. PHP 5.3 packs a good number of new features, some that have been in development for years. Like in any new major release, backwards compatibility is a concern, specially when having new features, reserved words, etc.

Due to this, we are not going to be upgrading our current shared hosting servers, as this could possibly break our existing customers websites and applications. If you are a current customer and want to migrate to PHP 5.3, please submit a ticket so we can work with you.

We will be setting up a new PHP 5.3 server as soon as we have some time to run some tests and make sure everything will run according to plan. If you are looking for a PHP 5.3 VPS (Virtual Private Server), we will have a PHP 5.3 image ready on day one when it gets released. The same applies for dedicated servers. We are committed to support PHP as it grows and we know how important is to provide quality and updated technologies.

Bookmark and Share

An overview of new PHP components from symfony

June 25th, 2009

Many developers and users already know symfony. If you don’t, check it out! It is one of the most popular and useful PHP frameworks that help ease the pain associated with building web-based applications. Many large sites and lots of smaller ones are developed using symfony, including our website and many of our internally developed applications.

One of the nice things about working with symfony is it’s decoupled nature. You can use the full-stack framework or, disable and use only parts of the framework that you need. You can use (or not use at all) different high-quality ORMs (like Propel and Doctrine). Continuing with this philosophy, the symfony project team lead by Fabien Potencier is releasing some of the components that will be powering the next version of symfony. The components are available independently, so developers may use them to suite specific needs in a given project.

Currently, from the published list, only the Yaml component is available for download. The rest will follow soon, and we expect they will have the same high quality of the symfony framework.

The components are:

YAML

Description from the site: Symfony YAML is a PHP library that parses YAML strings and converts them to PHP arrays. It can also converts PHP arrays to YAML strings.

Yaml is already used in symfony to define different configuration aspects of an application. It’s super easy to write and it gets converted to PHP code to acchieve excellent performance. By using this component, you can define the configuration of your application using Yaml even if you don’t use symfony. This is an excellent resource for any developer.

Event Dispatcher

Symfony already features a very powerful events system, which powers over 600 plugins. This has proven to be one of the keys to the success of the framework. We are sure that when this component becomes available it will provide excellent possibilties to enable applications to be extended and will allow developers to expand their systems features by accepting 3rd party plugins.

Dependency Injection

Fabien Potencier has been very active explaining what depency injection is and how it can help with complex development scenarios, linking and interfacing classes. He has also released what we think it is a mini version of the soon to come full component. As he said, the Dependency Injection component will be at the core of the next Symfony framework and we expect this to be a major resource for developers.

Templating

There has been a lot of discussion over the need of a templating engine in Symfony. It is now known that the next version of Symfony will include one, but it will be optional like most of the features of symfony, which is great for those that do need the extra complexity. This component means that there will be yet another option in the templating engine arena, where Smarty is probably the front runner.

Mysterious components

There are two other components listed in the page, without names or descriptions. We are very curious as to what these components will be. Knowing the current quality of the work being released by the Symfony project team, we are sure it will be exciting and we can’t wait to know more about them! If you know anything about them, or want speculate, leave us a comment.

Closing notes

As you can see, these are very exciting times for PHP developers, including those not using symfony. The components are and will be used within other frameworks, like Zend Framework, CakePHP and many others. They can also be used independently in small projects that use no frameworks at all. We are very excited about these developments and look forward for a very bright future of complex, powerful and amazing web based applications powered by these components. We will keep you updated when these components become available to the public.

Bookmark and Share

Symfony 2009 Sourceforge Community Choice Awards

June 24th, 2009

Congratulations to everyone in the community! Symfony has been chosen as a finalist for the 2009 Sourceforge Community Choice Awards in the following categories:

  • Best project !!!!
  • Best tool or utility for developers
  • Best project for enterprise

That’s awesome! No need to say… we saw this one coming :) Symfony is an amazing development platform and this is probably just the tip of the iceberg. This is a well deserved honor to the symfony community, congratulations. Please vote for symfony at : http://sourceforge.net/community/cca09/vote/

Bookmark and Share

Zend Framework 1.8.4 released and available on all ServerGrove hosting accounts

June 23rd, 2009

The Zend Framework development team announced the availability of Zend Framework 1.8.4 (changelog) which features several enhancements and bug fixes.

This release is already available in all our servers for our customers.

For more information about our Zend Framework hosting offering, click here.

Bookmark and Share

Setup guide for installing a symfony project to ServerGrove shared hosting accounts

June 22nd, 2009

One of the things we spend lots of time on, is trying to make application deployment as simple as possible so developers can focus on development. We are developers as well, so when we finish a project, we want to upload it, test it and start on the next project. Keep it simple, move on. Like you, we don’t like to fight with configuration, permissions and whatever other issues may delay our deployment. Most of our in-house projects are developed in symfony, so we have gotten particularly good at fine tuning our servers for this framework (not to mention it’s the best framework in the world).

As a policy, we help all our clients with migration and installation issues. A great majority of our support time is dedicated to this type of service, so the easier it is for people to install their apps, the less time we spend answering tickets. We like to call this: motivation.

While most people seem to be figuring out how to use Maestro and get their apps up and running on our servers without much difficulty, we decided to write this setup guide for setting up symfony applications quickly on ServerGrove shared hosting accounts.

1) Preparation

There are a few steps you can take to make the installation of your application a breeze, and while we try to configure our servers to be as transparent as possible for developers, it is impossible to match everybody’s environment and/or preferences. Here are a few things to keep an eye out for:

a) Make sure all paths are unix-based. Developers running on windows will have their paths with C:\symfony or similar structures. Our servers run on Linux, so you need to use unix-based paths like /usr/local/php/symfony12

b) The Linux filesystem is case-sensitive, so Symfony and symfony will be different names. Make sure your code paths and file names match the names of the files and directories.

c) On shared hosting accounts, your home directory will be in /var/www/vhosts/example.com . Your symfony project files will reside in /var/www/vhosts/example.com/symfony_projects/PROJECT_NAME (replace example.com and PROJECT_NAME with your names, remember, domain names are lowercase and the project names are case-sensitive). Keep these paths and names in mind as you will need to use them in different places to properly configure your project and applications.

2) Paths Configuration

Before you upload your symfony project, you need to configure your project to find the symfony library. All our servers have symfony libraries pre-installed, so you can use the server-wide installation.

a) Use server-wide symfony installation (recommended)
The server-wide libraries are in /usr/local/php/. Here are the paths for the different versions of symfony:
symfony 1.0.x : /usr/local/php/symfony10/lib
symfony 1.1.x : /usr/local/php/symfony11/lib
symfony 1.2.x : /usr/local/php/symfony12/lib

To configure a Symfony 1.0.x project, edit config/config.php and setup the proper paths for the symfony library:

<?php

// symfony directories
$sf_symfony_lib_dir  = '/usr/local/php/symfony10/lib';
$sf_symfony_data_dir = '/usr/local/php/symfony10/data';

To configure a symfony 1.1.x, edit the config/ProjectConfiguration.class.php file:

<?php

require_once '/usr/local/php/symfony11/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
// for compatibility / remove and enable only the plugins you want
$this->enableAllPluginsExcept(array('sfDoctrinePlugin', 'sfCompat10Plugin'));
}
}

To configure a symfony 1.2.x project, edit the config/ProjectConfiguration.class.php file:

<?php

require_once '/usr/local/php/symfony12/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
// for compatibility / remove and enable only the plugins you want
$this->enableAllPluginsExcept(array('sfDoctrinePlugin', 'sfCompat10Plugin'));
}
}

b) Alternatively, you can upload your symfony library. If you do so, make sure you configure your project to have the correct unix paths described in bullet 1.C

3) Database configuration

Your symfony applications will probably use Mysql to load and save data. The Mysql database will be running in localhost. We recommend that you create the database and tables, and load the data before uploading the site. In order to do so:

a) login into the Control Panel with your username and password which you can find in the email with subject “New account information”.

b) once in the control panel, select the domain and go to the Databases section.

c) create the database and then create the user to access the database.

db

db2

d) click on the phpMyAdmin icon, this will open a popup with the admin interface.

e) select the database. Now you can import a SQL file with all the statements to create tables and insert data

db3

Refer to the phpMyAdmin manual for more information on how to use this powerful tool.

4) Transfer files

You already configured your paths, created the database and imported the data. Now you are ready to upload the project files. You will need to use a FTP client to connect to the server. You can find the FTP login information in the email with subject “New account information”.

Once you have connected to the server, go into the symfony_projects directory. Upload your project so all the project files end up in the contained in a directory residing in symfony_projects (ie. symfony_projects/myproject)

5) Configure Apache to use your symfony project web root.

Once you finished upload the files, it is time to configure the Apache web server to use the project web directory as the document root. For this, we recommend that you use our Control Panel extension, Maestro. To learn more about Maestro, go to the release announcement and watch the screencast

maestro

6) Something is wrong…

If something did not go right, we recommend that you look at the different log files that may contain critical information to fix the problem:

a) the Apache error log may contain warnings about Apache configuration error, the file is located in statistics/logs/error_log

b) in our servers, each website has its php error log. This file may contain warnings and fatal errors, you can find this file in statistics/logs/php.log or you can see it online through Maestro’s ajax-based log viewer.

c) if your symfony application is configured to log errors and messages, you can find those in symfony_projects/PROJECT_NAME/log

logviewer

If you are unable to find any errors or locate the problem, feel free to contact us and we will assist you to get your site running as fast as possible.

7) Done!

If you followed these steps, your symfony-based site should be up and running.

We would like to hear from you: Please take some time to tell us how was your installation and setup experience, and specially, if there are any steps that need improvement.

Bookmark and Share

Zend Framework 1.8.3 released and available at ServerGrove

June 10th, 2009

The Zend Framework development team announced the availability of Zend Framework 1.8.3 (changelog) which features several enhancements and bug fixes.

This release is already available in all our servers for our customers.

For more information about our Zend Framework hosting offering, click here.

Bookmark and Share

Running Zend Server on Mac OS X

June 10th, 2009

Zend Technologies recently released a community edition of Zend Server, which provides a full stack of technologies that allows developers to have a LAMP installation ready in a matter of minutes. This is especially significant for developers working on Mac OS X, where Apache and PHP have historically been difficult to install despite the options of MAMP and MacPorts.

Install
The Zend Server CE edition can be downloaded for free from Zend’s website. The Mac OS X installer is around 156MB which includes Apache, MySQL, PHP and a series of tools to manage the installation. The installation went smoothly, placing all the files in the default location (/usr/local/zend).

Once the installation is complete, you are instructed to open an admin interface at http://localhost:10081/ (I had trouble opening the suggested https version). Once loaded, you are asked to set a password.

Interface
The interface is nicely done and features a monitor page (with dashboard, PHP and server info pages, and a log viewer), and a server setup page where you can enable PHP extensions, and Zend Server modules (Debugger, Optimizer and Data Cache come enabled by default).

dashboard

There is a desktop tool to manage Zend Server called ZendController. I had to look for it since the information in the documentation is not correct. I found it in /usr/local/zend/ZendController.app/Contents/MacOS/ZendController

controller

MySQL
MySQL installation is up to date and is located in /usr/local/zend/mysql

You can manage it with the included phpMyAdmin which is accessible at http://localhost:10081/phpmyadmin

Symfony
My next step was to setup Apache to play nice with Symfony. Having symfony already installed, I simply added a server-wide configuration alias so CSS and javascript files are accessible:

 Alias /sf /usr/local/php/symfony12/data/web/


Configuring Virtual Hosts

I then added a few virtual hosts and found myself with a series of forbidden access problems. After trial and error and searching over the web, I found that Apache denies all access outside the default DocumentRoot. This is an easy fix, I located this configuration section for Directory / in httpd.conf and corrected the necessary lines:

Options +FollowSymLinks
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
#    Deny from all

After saving, I restarted Apache with:

sudo /usr/local/zend/bin/apachectl restart

Conclusion
In summary, Zend Server CE for Mac OS X developers is a must have. All software (including a copy of Zend Framework) is up to date, no need to compile PHP for most uses, so you are up and running in no time and ready to code right away.

Bookmark and Share

Saving time using the YUI reset CSS

June 8th, 2009

Before starting to build a website there is a fair amount of groundwork I usually do that will make my life easier down the road. For example, setting margin and padding to 0 on all elements, turning off borders on images and tables, left aligning all text, etc…This is standard procedure in my workflow and often I find myself adjusting this as I move forward. Recently I found a little gem, part of the YUI CSS framework that does all this for me in one swoop. The YUI CSS framework is great, but it has a bunch of stuff I don’t normally use, nor want to have my users download. Fortunately the developers at Yahoo! were smart enough to give this little piece of CSS enough importance to separate it into it’s own file. YUI Reset CSS “…removes and neutralizes the inconsistent default styling of HTML elements, creating a level playing field across A-grade browsers and providing a sound foundation upon which you can explicitly declare your intentions.” Which is exactly what I want to do before starting any project: level the browser playing field.

To include the CSS is fairly simple:

<!-- Source File -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset/reset-min.css">

Now lets take a look at the contents of the css file:


/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.3
*/

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,
form,fieldset,input,p,blockquote,th,td {
          margin:0;
          padding:0;
         }
table {
          border-collapse:collapse;
          border-spacing:0;
          }
fieldset,img {
          border:0;
          }
address,caption,cite,code,dfn,em,strong,th,var{
          font-style:normal;
          font-weight:normal;
          }
ol,ul {
          list-style:none;
         }
caption,th {
          text-align:left;
          }
h1,h2,h3,h4,h5,h6{
          font-size:100%;
           }
q:before,q:after{
          content:'';
          }

While it’s not sexy nor earth shattering, it is unarguably practical.

Bookmark and Share