 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: From Zero to Cloud Setting up an EC2 Sandbox, Part 3
by Chris Cornutt September 22, 2011 @ 08:42:22
SitePoint's PHPMaster has a new post today, the third part of a series helping you get your application from "zero to cloud" on an Amazon EC2 setup. In this latest post they wrap things up by showing how to set up the full lamp stack on the remote server. Here's part one and two that lead up to this latest part.
This is the final article in a three part series focused on setting up EC2 as a sandbox for application developers. I assume you have an AWS account with Amazon; if you don't, please read Part 1 to learn how easy it is to sign up. I also assume you have configured your development environment and installed an AMI; if you haven't, please read Part 2. In this installment, we'll learn how to install Apache, MySQL and PHP in our running AMI, and then clone the AMI to make our own.
Included in the post are all the commands you'll need to get the packages installed for PHP, MySQL, Apache 2, PEAR and the PHP command line binary. With all of that installed, they show you how to create an AMI (Amazon Machine Image) to make it easier to scale in the future.
voice your opinion now!
tutorial amazon aws image machine scale ec2 instance
David Behler's Blog: Dev-Box Virtual Machines for Developers
by Chris Cornutt March 08, 2011 @ 09:17:14
David Behler has provided a complete guide to helping you get a development virtual machine instance up and running quickly complete with Apache, PHP, MySQL and Samba shares to access your files.
I know that no server is like the other and you might still run into some problems due to different library versions and so on, but you gotta admit that two Linux servers have way more in common than a Linux and a Windows server. So in this post I'll tell you how to setup your own VM with all the libs you need. Even if you haven't worked with Linux before, you should be able to follow this tutorial/example easily.
He uses an image from thoughtpolice as the base and walks you through every step of the way. He shows you how to log in as root, update all packages and start installing the software you'll need (all via apt-get). There's even a sample Samba configuration file you can use to get started. The end result of all of this setup can be found in this image too.
voice your opinion now!
virtualmachine virtual instance thoughtpolice ubuntu linux setup image developer
Brian Swan' Blog: Determining Azure Drive Letter with PHP
by Chris Cornutt October 29, 2010 @ 12:34:01
In a quick new post to his blog today Brian Swan shows you how to find a drive letter in Azure through PHP (for a Windows Azure Drive).
Today, I'll start by taking a look at Windows Azure Drives. Specifically, I'll explain how to programmatically determine the driver letter for a Windows Azure Drive. (I'll assume you've read the getting started post I wrote a couple of weeks ago.) Simply put, a Windows Azure drive acts as a local NTFS volume that is mounted on the server's file system and that is accessible to code running in a role. The data written to a Windows Azure drive is stored in a page blob defined within the Windows Azure Blob service, and cached on the local file system.
He shows how he's set up his instance with two drives and how, with a bit of PHP code, he could grab the value from the "X_DRIVES" environment variable, split it out and loop to find the drive you're looking for. His example code puts a simple text file on the drive and then reads it back out.
voice your opinion now!
drive letter windows azure instance xdrives environment
Jens Schauder's Blog: One Database for Every Developer
by Chris Cornutt August 24, 2010 @ 13:08:26
Jens Schauder has an interesting suggestion about the development environment for your projects - one database per developer.
How many databases run in your teams development environment? One for the complete team? I have seen many places like that, but please tell me: Why? You aren't working on a shared files system aren't you? How is a developer supposed to change the structure of that database without interrupting the work of the other developers? And just in case you haven't noticed: Pretty much every RDBMS vendor offers free versions of their database which can run on a developer machine.
He suggests that every developer needs their own isolated database instance where they can run rampant through the data and only cause any real issues (or correct major ones) without having to worry about the impact on others. Keeping them in sync is a whole different story, but can be helped with something like fixture data.
voice your opinion now!
database developer opinion isolation instance
Christian Weiske's Blog: Generating CHM files w/Wine on Linux & a bit about PEAR's PhD trasition
by Chris Cornutt February 27, 2009 @ 12:55:01
Christian Weiske has posted a guide to generate CHM files dynamically in in a Wine instance on a machine running some form of Linux.
The only way to generate .chm files is to use Microsoft's HTML Help Compiler hhc.exe from the HTML Help Workshop. It can be downloaded free of charge from their website. While the workshop tool is a GUI application, hhc.exe can run completely without any windowing environment on a server - ideal for an headless web server like pear.php.net. I already got it running on my Linux desktop at home using Wine, so I chose to go the same way on the server.
He actually starts out the post with a brief history of some of the work that's been done on the PhD tool to incorporate things like screenshots and image support as well as improvements to character set handling.
As far as installing the Help Complier, he offers two helpful tips on things to watch for - the need for X forwarding to display the windows for the installation and a need to install some extra DLL files to correct this bug with Wine.
voice your opinion now!
wine linux phd transition server microsoft windows instance tip history
Jani Hartikainen's Blog: Food for thought utilizing models in MVC
by Chris Cornutt December 08, 2008 @ 10:26:15
Jani Hartikainen has posted some food for thought to his blog today concerning models in a typical Model-View-Controller (MVC) setup.
"What is a model" and "Is Zend_Db_Table a model" seem to be asked once in a while on #zftalk. Frameworks say they have a full model available, thus they are MVC frameworks ORM libraries say they generate models. It seems the ActiveRecord pattern has become somewhat synonymous with model.
He points to a post from Padraic Brady on the subject and talks about how one might put it into practice. He admits to making a controller action just to get data from the database into a view, but offers a "more correct" alternative - a view helpers that creates a model instance your view scripts can use directly without the controller in between.
voice your opinion now!
mvc modelviewcontroller database access view helper instance
PHPImpact Blog: Static Factories vs Public Constructors
by Chris Cornutt July 18, 2008 @ 12:58:31
On the PHP::Impact blog Federico Cargnelutti has posted a comparison of using static factory methods to create an instance of a class versus making an object, calling the constructor.
Normally, creating an instance of a class is done by calling new, which calls the constructor. Static factory provides a static method that returns an instance of the class. So, you are using static factory instead of the constructor. Providing a static factory method instead of a public constructor has both advantages and disadvantages.
He includes some of the advantages of the factory method and others for the normal call to create an object. He also mentions some comments made by Dagfinn Reiersol in a blog post about public constructors.
voice your opinion now!
static factory designpattern constructor object instance
Greg Beaver's Blog: PHP namespaces become much better (Derick take note)
by Chris Cornutt June 23, 2008 @ 11:19:27
Greg Beaver, noting some issues that Derick Rethans had pointed out about namespace support for upcoming PHP versions, has posted about a patch he submitted to solve the problem simply.
The issue Derick pointed out:
In PHP 5.3 this would alias the class Interval in the namespace PEAR::Date to the class Interval. For now, this code would work just fine. However, if PHP would introduce a class "Interval" at some point in the future (and PHP can do this as it owns the global namespace) then the above code would suddenly stop working.
Greg's patch makes it possible to "override" the internal class if need be, making it so that code currently working wouldn't break. All it takes is to "use" is like you normally would and and the magic happens behind the scenes.
voice your opinion now!
namespace override internal class instance patch php5
PHP in Action: Public constructors considered harmful
by Chris Cornutt May 05, 2008 @ 10:21:33
According to the PHP in Action blog, public constructors can be hazardous to your (application's) health and should be replaced.
Everybody who writes object-oriented code knows about constructors. You need them so the program knows how to instantiate objects, right? And you especially need them when a lot of things have to be done while instantiating an object. [...] So why would I be skeptical of public constructors?
The solution, as he sees it, is to make a "constructor" that's actually called statically with parameters that returns an instance of the class it's in as well as performing the action. He argues that this can help make the code much more readable for some types of method calls.
voice your opinion now!
public constructor harmful replace private instance
|
Community Events
Don't see your event here? Let us know!
|