PHP news to August 13th, 2010.
WordPress is best known as a blogging engine, but new features in recent releases and the ability of plugins to add functionality have made WordPress a viable CMS (Content Management System) for sites.
WordPress 3.0 added ‘custom post types’ which allows a developer to define new types of content in addition to the 5 inbuilt types. No longer will posts or pages need to be twisted into shape by use of custom fields or lots of PHP coding. Don’t let the name ‘custom post types’ have you believe the new content is just an extension to WordPress posts. The more correct title is ‘custom content types’.
PHP news to August 6th, 2010.
- New PHP drivers for for SQL Server released, under an Apache 2.0 license.
- Zend framework 1.10.7 released. Bug fixes including an update for Zend_Service_Twitter, as Twitter moves to OAuth.
- PHPNW conference on October 9 & 10, 2010 in Manchester, UK.
- New PHP Excel extension from Ilia Alshanetsky.
- Call for proposals at OSDC (Open Source Developers Conference) 2010 to be held in Melbourne, Australia from November 24th to 26th, 2010.
For whatever reason there may come a time when you need to change web hosts for a site. Its not a good look for the world see a broken site due to differences between the old and new. So how do you test everything is set up correctly at the new host before updating nameservers?
When you type a site into the browser location bar, a DNS lookup goes on and the typed in domain name is resolved to an IP address and a known location. the requested site is returned to you. So how do you test a domain that is to be hosted at a new location? In the scenario where you do not have a dedicated IP address, the answer is the hosts file on your local PC.
Your local hosts file is checked before any DNS lookup, so adding a domain and the new IP will cause your browser to go to the new location not the old.
So what does a hosts file look like? In the case of Windows XP, something like below, ignoring the comment lines which start with a #. In this case localhost will resolve to the IP address of 127.0.1 which is your local machine.
Hosts files for other OS are much the same. Ubuntu has entries for the local machine name and IPv6 setup in its default hosts file.
127.0.0.1 localhost 127.0.1.1 mymachine.local mymachine # The following lines are desirable for IPv6 capable hosts' ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
Now if you wished to have www.mysite.com resolve to IP address 192.168.1.2 you would add the following line into the hosts file. As simple as that. It’s always a good idea to back up the existing hosts file.
So where is your hosts file? Obviously this varies by operating system. The table below will cover the standard location for common operating systems.
|Win XP, Vista, 7 & 2003 (32 bit)||C:WINDOWSsystem32driversetchosts|
|Windows 64 bit||C:WINDOWSSysWOW64driversetchosts|
|Mac OS X||/private/etc/hosts|
These lookup entries are often cached, so you will need to either restart networking or even reboot your machine for the new IP address to be used.
Once you have finished your move & testing, and updated the real nameservers for your new location, its always best to remove these temporary lines from the hosts file. That way you find the site, the same way everybody else does, and you may find out early if there are any problems.
News to July 30th, 2010. Slow week for new releases.
- ZendCon 2010. November 1 – 4, Santa Clara, CA. Early bird registration until August 28th.
- Zend Unlimited Subscription program for business that need unlimited number of subscriptions to Zend’s software and technical support services
- crVCL PHP Framework, rapid application development framework inspired by JEDI VCL and Java Spring
- RDSFramework, lightweight open source MVC framework
There are no shortage of PHP frameworks, some grow large vibrant communities and a number wither and die over time. A number of the larger frameworks by user base have announced plans for the next steps in their evolution. Specifically we examine the next major versions of Zend Framework, Symfony, CodeIgniter and CakePHP.
When it comes to creating output that will be returned to a user browser from PHP, there are a number of functions & language constructs available to achieve this. This article will examine the use of echo, print & printf.
PHP developer news for week ending July 23rd, 2010.
- PHP 5.2.14 released. Bug & security release and the end of active support for the 5.2 line.
- PHP 5.3.3 released. Over 100 fixes with a number of security enhancements.
- CakePHP 1.3.3 rainbow icing edition released.
- Phalanx PHP Framework. Event driven PHP5.3+ framework.
PHP developer news for week ending July 16th, 2010.
- PHP For Android (PFA). Use your PHP skills on an Android device.
- CouchDB the document-oriented, Non-Relational Database Management Server (NRDBMS) goes 1.0.
- WebMatrix. Microsoft making it easier to install PHP apps on Windows.
- A new book – Pro PHP Refactoring from Apress.
- Swiftlet. Another lightweight MVC style framework for PHP 5.1+. Actually has some documentation.