Symfony 1 - MVC - How does it work?

In this tutorial I will show you how the symfony framework works with the MVC pattern. Each application, for example the frontend, has one or several modules. Each module has one or several Controllers and Views. The first Controller of a module is in the actions directory and the actions.class.php file that can be found there: symfony > apps > frontend > modules > moduleName > actions > actions.class.php The Views in the templates directory and they are suffixed by the Success word, except for the _form file. ...

July 17, 2011

MySQL - Installation - On Windows

I made a tutorial with examples for the installation of Apache HTTP, PHP, MySQL, phpMyAdmin and some virtual host explanations, for Windows. You can find this tutorial by following this link: Enjoy

July 13, 2011

Eclipse - Explorer - Removing all .svn folders

You maybe wondering how to remove .svn folders from your Eclipse explorer. In this tutorial we will see how to hide .svn directories. Open your Eclipse. Click the project name in the explorer. Right click it. Then: Properties > Resource > Resource Filters Click the Add button on the right. Select: Exclude all Folders and All children (recursive) Then write in the input: .svn Click OK. Click Apply. Click OK. ...

July 11, 2011

Symfony 1 - Error - SQL and Doctrine with the command line

In this page, I’m gathering all errors that I will find while playing with Symfony and SQL requests. And of course I will bring some explanations to resolve these errors. It will be sliced by an example of each error and with its own solution. So, let’s start it because a problem has always a solution! Example 1 For example you typed this in your command line: $ php symfony doctrine:build --all --no-confirmation ; php symfony doctrine:data-load And you have this error: ...

July 10, 2011

Symfony 1 - Doctrine - Set up a new database

In this tutorial we will see how to set up a database with Symfony 1 and doctrine examples. Let’s start by writing some code in the schema.sql file. We will create the Hello project with this hello database. # config/doctrine/schema.yml HelloCategory: actAs: { Timestampable: ~ } columns: name: { type: string(255), notnull: true, unique: true } HelloBook: actAs: { Timestampable: ~ } columns: category_id: { type: integer, notnull: true } email: { type: string(255), notnull: true } expires_at: { type: timestamp, notnull: true } relations: HelloCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: HelloBooks } We continue by typing a command line for connecting to the database. The name of your project will be also the name of the database: ...

July 9, 2011

Symfony 1 - Set up - A new project

In this tutorial of Symfony 1, we will set up a project from scratch. Let’s start it by downloading the project that you can find on the official web page of Symfony: http://www.symfony-project.org/installation This tutorial will use the 1.4.12 version. Once done, come back there. Just before starting, do not forget that for Windows, you have to use a SLASH (/) and for GNU/Linux a BACKSLAH () for you PATH. And of course, replace yourProjectName by yours. ...

July 9, 2011

Apache - HTTP - Installation

I made a tutorial with examples for the installation of Apache HTTP, PHP, MySQL, phpMyAdmin and some virtual host explanations, for Windows. You can find this tutorial by following this link: Enjoy

July 6, 2011

Apache - HTTP - Errors

If all your web installation was working fine and you do not know why now nothing is working anymore, with a beautiful error such as: “Could not connect to localhost”, let’s try this solution. First of all, try to stop your Apache HTTP server manually. Left click on it on your tray icon in your taskbar: Apache 2.2 > Stop If nothing happens, this is because your server is still running in an infinite loop. So do not panic and wait around one minute. Normally the server would stop. So restart it with left click and: ...

June 28, 2011

phpMyAdmin - Installation - On Windows

I made a tutorial with examples for the installation of Apache HTTP, PHP, MySQL, phpMyAdmin and some virtual host explanations, for Windows. You can find this tutorial by following this link: Enjoy

June 21, 2011

Zend - Framework 1.11 - Using the zf command line tool

An easy way to create a new Controller is by doing this with the command line. On Windows, open a new terminal (SHIFT + right click on your project directory) and write this: $ TheProjectDirectory> CompletePathUntil\ZendFramework-1.11.7\bin\zf.bat create controller Menu It will create: A controller in /application/controller/MenuController.php An indexAction in the MenuController file A view script in /view/scripts/menu/index.phtml An update for the project file: .zfproject.xml All that in a single line. ...

June 21, 2011