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

Joe Ferguson:
Install Homestead into your project
Jun 24, 2015 @ 09:53:42

As the Laravel News site mentions in one of their latest posts, the Laravel Homestead project received an update recently that makes it easier to install per-project rather than the previous "one install for everything" setup.

Over the weekend, Homestead received a new update that allows you to run it on a per project basis. Previously Homestead was designed so that you install it once on your system and share all your sites within the virtual machine. Joe Ferguson created the pull request to help get this feature implemented and he has a full write up on his blog.

This change pulls in the functionality doing all the hard work for you. It copies over needed files and setting up the Homestead vagrant instance directly from inside the project. Joe also describes the command line options you can provide, defining a name and hostname for the new instance. You can find out more about it in the official documentation.

tagged: laravel homestead project perproject command hostname name

Link: http://www.joeferguson.me/install-homestead-into-your-project/

Evert Pot's Blog:
Internationalized domain names, are you ready?
Oct 25, 2010 @ 09:44:13

In a new post to his blog Evert Pot looks at internationalized domain names and where they could cause issues some of the current validation in PHP applications.

Since may 11 TLD's (top-level domain names) have been added. In order for this to work successfully, a lot of applications will have to be fixed. Many email-validation scripts might use [a regular expression] approach [to match most address formats].

Unfortunately, this approach will only continue to work with the normal ASCII-based domain names. He includes a list of several that could break it including ones in Chinese, Korean, Persian, Russian and Arabic. He recommends a very liberal regular expression (one that allows for "punycode" strings) to check the email, find the record and try to find an MX record on that domain.

tagged: internationalized domain name validation email

Link:

Mark Karpeles' Blog:
proctitle: a new step for pinetd
Jan 22, 2009 @ 11:12:17

If you've ever worked with forking processes in PHP, you know things can get a little difficult when you have more than one process going at a time. Identification can become a hassle, especially if you need to kill one off because of performance issues. If you've found yourself in this spot before, you might want to check out this update Mark Karpeles has made to his pinetd project to allow for naming of those forked processes.

Ever wanted to give meaningful names to your processes when you pcntl_fork() with PHP ? proctitle is the extension you’re looking for! Adapted from bug report #29479 and code initially wrote by Midom for Wikipedia, the proctitle extension allows for a process to change its own displayed title in the system’s process list.

The extension (seen in action here) is an interface for making different sorts of daemons, including the ability to give them names. You can check out the project here.

tagged: pinetd proctitle extension daemon tcp udp name process fork

Link:

Doug Hill's Blog:
60 Days : What is it?
Dec 24, 2008 @ 12:33:35

Doug Hill has proposed a new project that he hopes to get the community behind - 60 Days:

60 Days is an idea I had while trying to decide what to do with the domains I have sitting around doing nothing — (well nothing but being a nagging reminder that I'll never have time for every idea that pops into my head, and that domain names cost money to keep).

The goal of the project is to take a domain you're not currently using (and you know you have some out there) and making something - a "real world project" - on it in 60 days. the catch is that, for each domain you use for the effort, it has to be a different PHP framework. Keep an eye out for the January 1 launch date for more details.

tagged: sixty days project effort domain name framework different realworld

Link:

David Otton's Blog:
Stupid PHP Tricks: Illegal Variable Names
Aug 22, 2008 @ 13:47:52

David Otton has shared another of his "stupid PHP tricks" on his blog today. This one looks at illegal variable names that don't match the "can't start with a number" rule the manual points out.

A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*'

Technically, you can get around this in two different ways - variable varaibles and the more complex notation with curly braces. He points to the compact function for proof that they're set.

tagged: variable trick illegal name compact curlybrace

Link:

Amir Saied's Blog:
PEAR bash completion
Jul 28, 2008 @ 12:08:29

Amir Saied recently posted a handy little tool for the PEAR users out there - a bash script that handles tab completion for you.

Lately I've been playing alot with the PEAR CLI. The one annoying thing I noticed the most was its lack of tab completion that I'm used to from the shell. It turns out that this feature is very easy to add, in the bash at least.

It will finish off the PEAR commands for you and expand out the PEAR package names and discovered channels when it finds a match. You can download the package here.

tagged: pear bash commandline completion tab package name channel

Link:

DevShed:
Retrieving Information on Selected Files with a PHP 5 File Uploader
Mar 27, 2008 @ 09:31:04

DevShed has continued their series (here's part one) looking at the use of file uploading in your PHP scripts. They build on that foundation and add in some more useful features this time:

The initial script in the first tutorial of this series lacked some important features, such as the implementation of an effective error handling module and the ability to check the MIME type and size of the file being uploaded. In this second installment of the series, I'm going to improve the logic of the script from the first tutorial to provide it with the capacity to retrieve useful information concerning the entire file uploading process.

They look back at the previous tutorial to remind you of some of the concepts and then move on to show you how to get information about the file (like the MIME type, name and size of the uploaded file). The last page is just the full source code for the cut and pasters out there.

tagged: tutorial php5 file upload information mime name size

Link:

Funcaday.com:
Special Valentines Day Edition (isLove)
Feb 14, 2008 @ 08:49:00

Besides all of the usual Valentines day logo fun from some of the major sites out there, Paul Reinheimer also points out a special little something on the Funcaday.com website:

Want a custom one to share with someone you care about. Fill out the form here. It's a subtle effect though, they'll need to read it. Valid characters for names are just alphabetics and the underscore, sorry.

The custom output is a great little addition to the site - put in person one's name and person two's name and it updates the image to show the new parameters. Ah, geek love...

tagged: valentine islove custom name input

Link:

The Northclick Blog:
Announcing "dropr" - the message queue framework for PHP
Dec 10, 2007 @ 08:48:00

On the Northclick Blog Soenke Ruempler has shared the new name for their message queue software they're developing (see here) - dropr.

Why? When Boris was writing the client angel script he somehow named it "dropr". As we neither got better suggestions nor had any other idea we just decided for this name. Actually the name is a little bit fun because all those stupidR startupRs. But it's nice and somehow our framework drops message into queues.

Check out the project's homepage for more information including installation instructions, methods to download the latest version, some FAQs and a roadmap for where the project's going.

tagged: dropr message queue framework name trac dropr message queue framework name trac

Link:

The Northclick Blog:
Announcing "dropr" - the message queue framework for PHP
Dec 10, 2007 @ 08:48:00

On the Northclick Blog Soenke Ruempler has shared the new name for their message queue software they're developing (see here) - dropr.

Why? When Boris was writing the client angel script he somehow named it "dropr". As we neither got better suggestions nor had any other idea we just decided for this name. Actually the name is a little bit fun because all those stupidR startupRs. But it's nice and somehow our framework drops message into queues.

Check out the project's homepage for more information including installation instructions, methods to download the latest version, some FAQs and a roadmap for where the project's going.

tagged: dropr message queue framework name trac dropr message queue framework name trac

Link: