News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Konstantin Kudryashov:
Autohosts for Symfony projects on Mac
October 18, 2012 @ 10:39:43

Konstantin Kudryashov has posted a helpful hint for any web developer out there that knows the pain of constantly setting up VirtualHosts and local hostnames during their development. His suggestion makes setting them up simple using Apache2's "autohosts" support.

We all know, that web development is not as easy as it sounds and that it involves lot of different and sometimes really complex tools to just run or test stuff. We also know, that bootstrap (setup) of the project could take more time than you want it to. It's not a big deal if you're working on single project full time, but at KnpLabs, i'm bootstraping new sf2 project every 2 weeks. So this manual crafting of virtual host, edition of /etc/hosts and maintaining of those temp hosts everywhere made me really sick. So, at some point i've started to look for an elegant solution. Here is it.

He gives you all the commands, file contents and software you'll need to install (he uses Homebrew) to install dnsmasq and get it configured. The only Symfony-specific part of the process is the last step - getting the latest version of the framework and installing it.

0 comments voice your opinion now!
autohost apache2 configuration virtualhost localhost automate


Arvind Bhardwaj's Blog:
How to Test PHP Emails on Localhost
June 09, 2012 @ 12:02:20

In this quick tutorial Arvind Bhardwaj shows a method for testing your scripts that need to send emails, but on your localhost system.

While developing web applications on localhost you must have always missed the functionality to send mails. As localhost does not support email service, so it has always been a bottleneck for email testing on localhost. But I have found a simple way to test emails on localhost using PHP. I have overridden the default mail() function of PHP to create a text/html file based on the email format. If the email is in html format, an HTML file is created otherwise a text file is created. You can see in this file what exactly is the content sent in your mail. See how does it work.

He shows how to override the mail function with your own custom "mail" function, just in a difference namespace. He includes the sample code to send the email (the "mail" function), a basic HTML template you can use and and example of it in use.

0 comments voice your opinion now!
mail localhost email tutorial testing



Community Events





Don't see your event here?
Let us know!


language voicesoftheelephpant introduction mvc version framework release security composer update opinion library package podcast laravel interview series symfony tool community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework