In order to create a virtual subdomain in PHP, the following conditions must be fulfilled:
– enabled Apache’s Mod_rewrite module
– existing wildcard DNS record
– properly configured .htaccess file
Category: Symfony
Getting the backend routing from frontend application in Symfony and vice versa
Posted on Categories:PHP, MySQL, SymfonyWhen using Symfony frontend application it is sometimes necessary to access other application’s routing to create an internal url that points to that application.
In order for that to be posssible, a method for getting the desired application’s routing is required.
Creating new relations by using jQuery Autocompleter widget in Symfony
Posted on Categories:PHP, MySQL, SymfonyThis post describes how to create new relation by usin jQuery Autocompleter widget in Symfony project.
Recently, I’ve had a situation where I had to create a form for entering a product details, with a dropdown or autocomplete input for selecting product’s brand. If a user entered a non-existing brand, it had to be automatically created and assigned to product that the user was editing.
Using sfFormExtra Captcha on a Symfony based project
Posted on Categories:PHP, MySQL, SymfonyThis post describes how to quickly implement a Captcha on a project that already uses sfFormExtra Plugin. Since sfFormExtra Plugin already has Captcha integrated, it is not necessary to install sfReCaptcha Plugin.
Embedding relations in Symfony
Posted on Category:SymfonyThis quick post describes a necessary step in embedding a relation in a Symfony 1.4 form.
If you have followed Symfony’s official documentation and forums regarding embedding relations in a form, you may have already seen an example of product and productPhoto forms in a single form.
Creating Autocomplete input field for Symfony based web form
Posted on Category:SymfonyThis post describes steps required to create jQuery/AJAX input text field with autocomplete feature using Symfony php framework. It is assumed that you know how to create a web form, and install Symfony plugins, so that part won’t be explained here.
A Symfony plugin sfFormExtraPlugin is required, and, of course, jQuery (I’m using sfJqueryReloadedPlugin).
Generating url using routing from anywhere in Symfony
Posted on Category:SymfonyThis post describes how to generate URL from anywhere in Symfony application. For example, I needed to create URL for forgotten password within an error message for invalid e-mail address. Needless to say, this should be done in user registration form class.
Troubleshooting /sf directory with mod-rewrite on Symfony projects
Posted on Category:SymfonyThis post shows example for setting up /sf directory required for default css and javascript files on Symfony projects. Symfony documentation describes how to create Alias for /sf directory, and on most configurations it works perfectly. Directory and all assets are visible, and usable by your web application.