The version of the command-line svn client for OSX is badly out of date — I think it’s 1.1 or something stupid like that. (Apple has done a poor job of keeping command line utils up to date!)
The SCPlugin available via the Tigris.org website is -OK-, but not …
I forgot to mention something in yesterday’s post about configuring Postfix with Dovecot and turning on smtp authentication.
When you’re configuring Squirrelmail, you need to make sure that it does smtp authentication. It doesn’t seem that the version that comes with any way to that that *I* could easily find. …
What a mouthful. Like most other americans who live on a budget, I’m taking a “staycation” this weekend. What better thing to do than to get my mail server migrated to my new VPS? Well, first, I suppose, I should get the mail server all working on the new VPS…
In CentOS, the default Postfix package doesn’t have MySQL support built in. If you’ve got the priorities plugin installed, you’re either going to need to disable it or otherwise work around it so that you get the one from the centosplus repo. Other than that, it’s been made about as easy as it can be… just keep in mind as you’re reading this tutorial that I really loathe administering mail servers and consider it to be a quite onerous chore that’s been made even more onerous by spammers and hackers and script kiddies and what have you.
You’ll need to install: yum install gcc postfix clamav mysql-server mysql-devel spamassassin
dovecot php php-mbstring php-mysql rpm-build. There’s no RPM for Postfixadmin, but it’s available from the project’s site on Sourceforge.
And now the fun begins. This howto assumes that you have a decent level of knowledge and skill setting up services that run on Linux.
And now the fun begins! Today we’re going to really show some of the power of Zend Framework. All the steps that you’ve taken in the previous tutorials will suddenly make sense — you’re going to be set up to authenticate users in a few minutes flat.
If you don’t know basic OOP (Object-Oriented Programming) principles, now would be a good time to go do some reading on them. We’re going to make heavy use of inheritance, as well as overriding. Just keep in mind that PHP is not a strongly typed language.
Let’s get started. For authentication, we’re going to build the form the old fashioned way so that you can get a good example for ‘how it was done’ versus ‘how smoothly it can be done’ with Zend Framework.
Today, let’s take a look at Zend_Db. Zend_Db implements a Table Data Gateway, in which the object is considered to be extended to have the properties of a table, as opposed to a Object Relational Model (ORM) / Data Access Object (DAO) where the object is considered to be a representation of the database object. Philosophy aside, it’s a great tool, and we’re mostly interested in how to use it. It is worth noting that you can use Zend Framework along with the excellent Doctrine ORM… and the syntax is even pretty similar.
The general procedure when setting up Zend_Db is to create a bunch of objects that extend Zend_Db_Table_Abstract. When defining an object, you can define what table it connects to, what the primary key is, and any foreign keys that relate to it. Upon instantiating the object in your code, you can use it to build queries against it’s related table, which returns a collection of row sets for direct use in your applications. Today’s tutorial assumes that you’re very comfortable with looping and other control structures in PHP.
Yesterday we left off with a basic folder structure in a Subversion repository, including the Zend Framework libs. It isn’t really much to look at, and it just doesn’t do anything. Not impressive. Let’s fix that.
Today we’ll be covering the front controller and some basic modules and actions. You still won’t need a database at this point, but you will need to have Apache configured correctly. You’ll also want to have the Zend Framework Reference Guide within easy reach.
Before we get started, make sure that your Apache configuration
Over the next few days, I’ll be covering how to set up your first Zend Framework application using PHP and MySQL.
First, some requirements. You should be comfortable on the command line or with your Subversion client. I’m writing from the point of view of someone who codes on a Linux or Mac machine using vim. You will need to have PHP 5 installed on your server — this will not work unless you do. Second, I would recommend getting a VPS from a host like Futurehosting — for $20/mo, you get root access to your own machine, you can host as many sites or servers and have as many domain names as you want, and you get 350gb a month in transfer — I don’t think I’ve used 1gb of transfer ever, and I do a ton of work with the server. I also Also, we’re going to assume you have access to a Subversion server. That’s just good practice, folks. Subversion hosts are very cheap — I usually use CVSDude.
Today we’re going to cover the folder structure, getting things into subversion, and locating the different files. Tuesday, we’ll cover the bootstrap and getting your index module and error module to show up. Wednesday, we’ll cover Zend_Db_Table_Abstract, Thursday we’ll cover Zend_Form, and Friday we’ll put it all together to get a user registration and login working.
Disclaimer: I’m by no means a whiz kid with Zend Framework. ZF is unique among frameworks in that it gives you a toolset but does not enforce any conventions. The conventions I’m giving here are *my* conventions and may have nothing to do with the way you want to code.
Let’s dive right in.
Man, and I thought my Wordpress upgrade struggles were over.
So, you upgraded to 2.5 a few days ago, and you’re using the Default theme until you have time to customize another one. And you got rid of the old Statspress plugin because after you started getting over 10,000 pageviews a …
You might be wondering what these three things have to do with one another.
The basic gist is that I’m trying to use the Wordpress 2.5 RSS widget to read in my Google Reader ’shared items’ feed. Google Reader will publish your shared items in an Atom RSS feed. For a sample, you can see mine here.
The RSS feed is all fine and dandy. It’s valid, it’s namespaced correctly, and it’s got all but one of the required elements. The problem comes when you try to parse it with Magpie. Inside the “entry”, there’s a “title”. There’s also a “source”. The “source” has a “title” attribute as well.
If you enjoy the content, consider subscribing to the feed(s).
Post a Comment