I thought I would document the process here until my new mongo powered blog is working.
So far so good - I installed the mongoDb with no problem and went through the start-up guide on the mongoDb site.
Next I installed the php half of the equation - MongoDB database driver for php.
Unfortunately I didn't have pecl installed on my new MacBook Pro - Curses A Road Block!
Running the commands:
curl http://pear.php.net/go-pear.phar > go-pear.php
php -d detect_unicode=0 go-pear.phar
got me the pear/pecl packages I needed.Now I just ran:
pecl install mongo
and boom I had the drivers installed. All that was left was to update the php.ini file and restart Apache.
As a final step I created 2 pages.
postCreator.php - a page with a form that allows the user to create a new blog entry and insert it (blog it) into their collection. The page creates mongo records that consist of a few fields (username, timestamp, title, text, label, etc.)
view.php - a page which displays the blog entries.
So thats where I've gotten to. All matters of formatting and style sheets have to be worked out. As well as a commenting system and lots of other issues. Still, I'm impressed by how quickly I was able to get up and running with mongoDb.
Cheers,
TheSortedProgrammer
No comments:
Post a Comment