June 16th, 2005

We had a nice little chat this month. We talked about some job offers that have come in, kcpug’s future, simple content management systems, the need for css and much more. A wrap up and some followup info, all in this month’s pug newsletter.

Job Prospects

JCCC is Hiring! I’ve recently accepted a position at my place of employment, and my old job is needing to be filled. We’re looking for a web application developer with lots of experience, a great attitude, and who is not afraid to do non-developer things. Check out the [url=http://web.jccc.net/hr/jobs/CurrentOpenings.htm]Jobs and Opportunities[/url] of http://jccc.edu for more information.
There were others, but I don’t want to announce them here, unless you want to. You know who you are. 😉

Doug is looking for content management

Doug asked a question like “My clients need a CMS to edit simple websites, but they shouldn’t need to know any html, or anything.”

Helen suggested looking into DreamWeaver templates, as mostly his issue is providing a safty-net from his client’s own…creativity. We all agreed that this would be a good solution for many clients.

The lite section opensourcecms.com was also suggested as a place to look. After the meeting, I found cmsimple and sapid as possible candidates. Sapid looks really, really cool…and appears to be just downright perfect for this. Very clicky/sqishy…although the opensourcecms install is a little horked. Once you are logged in, just append ?mode=edit to the url of any page you want to switch into edit more. The edit button in the toolbar seems to be broken…but again, I’m sure it would work in your own install.

Helen is looking for a single page, easy update solution

The best I could think of was using something like [url=http://www.dynarch.com/projects/htmlarea/]HTMLArea[/url], and let it post to a password-protected php script that would get the html and save the file.

So, say your user’s only saw mypage.php:
mypage.php
[code]

This is my page

include(‘uploaded_page.inc’);

[/code]

Then, write up a simple php script…let’s call it uploader.php. It could draw a form using an html area. It should probably load the uploaded_page.inc file and put it in the html area.
On form submit, write the html-area into uploaded_page.inc.

This should naturally be password protected. You would also want to be careful not to let it write to any other page on your site, etc. But it should be fairly straightforward.

CSS: Any good info?

The topic of CSS came up as well. I’m a huge fan of it, and went on my pre-programmed rant of why it is a good thing. If you are interested, you may want to check on this handful of links:

  • [url=http://www.tanfa.co.uk/css/layouts/flexi-floats-3col.asp]A great 3 column, stretchy layout[/url]
  • [url=http://www.tanfa.co.uk/]tanfa in general is a great css reference.[/url]
  • [url=http://www.alistapart.com/]A list apart[/url]
  • Specificly, their [url=http://www.alistapart.com/articles/slashdot/]re-writing slashdot[/url] article
  • Anything Else?

    I’m sure I have missed a ton of things. Feel free to add anything I missed, or any additional information as a comment.

    See you all next month!!

    2005-April: Form Processing

    As promised, our April discussion will be on form processing. We’ll discuss different techniques available and hopefully find some solutions to the common problems we all face when using forms in our web applications.

    For now, the [url=http://www.shazpro.com/presentations/kcpug_forms/form_presentation.swf]meeting notes are hosted here[/url].

    A [url=http://www.shazpro.com/presentations/kcpug_forms/multipage_register.php]functional example of a multipage form with source code[/url] is also available.

    2005-March : A Look at PRADO

    The presentation for March can be found [url=http://www.kcpug.org/doghouse/2005_mar/prado.swf]here[/url].

    I have lots more code up and running, and looking really slick. I’ll also be showing off some of the more interesting examples they have come up with. So, if you want to see PRADO in action, drop on by the meeting.

    See you there!

    More Dynamic than Dynamic

    In February, we had a great time learning about using Client side JavaScript to asynchronously query your PHP on the Server side (BTW–it’s apparently called [url=http://www.adaptivepath.com/publications/essays/archives/000385.php]Ajax[/url]). If you missed it, not to worry…here is my [url=http://www.kcpug.org/doghouse/2005_feb/20050219.swf]presentation on using XMLHttpRequest and PHP[/url].

    Read on for more articles, example and info!!

    Now, I know that I said that I would have a couple of examples written up for you. And I remember thinking when I said it “OK, Dan. You are really going to do it this time.” Well, here I am. March’s meeting is next week and I still haven’t gotten to play anymore with this very cool stuff.

    I smell a future follow up presentation.

    For those of you who just were dying to see more cool things to do with this technique, I want you to go read [url=http://www.baekdal.com/articles/Usability/XMLHttpRequest-guidelines/]Thomas Baekdal’s XMLHttpRequest Guidelines[/url]. Be sure to read the Ok, now you should have more information, but you want to make things easier. I understand that! Go check out the [url=http://www.modernmethod.com/sajax/]SAJAX project[/url]. The Simple Ajax toolkit will help you “export” custom-written php functions as javascript functions. It’s cool. Go look at it. Just don’t go exporting “mySystemBackdoor()” or something silly. 😉

    Finally, you don’t care about all that. You just saying “Dan, c’mon. I just want something like [url=http://www.google.com/webhp?complete=1]Google Select[/url]!” I know, I know. But if I told you that up front, you never would have read those other articles, right? 😉

    Finally, go check out [url=http://blog.bitflux.ch/wiki/LiveSearch]the LiveSearch project[/url] from BitFlux. You can see it in action on [url=http://blog.bitflux.ch/]their blog[/url]. I think you will agree, this where most of us will want to play…at least until we are sure about all those consequences of using this new tool.

    Happy Coding!

    January 2005 – The Exceptional Exception (Updated)

    In PHP 4, dealing with errors can be a little combersome. But, with PHP 5, we get the power of exceptions…and all the clean code they have to offer.

    You can check out [url=http://www.kcpug.org/doghouse/2005_jan/exceptions_20050115.swf] the slides[/url] from our presentation or the [url=http://www.php.net/exceptions]examples and documentation[/url] on php.net.

    December, 2004 (Savant)

    Another great month! A big thank you to everyone who came by. The turnout was incredible, especially being right in the middle of the holiday season.

    Hope to see you all again in January.

    You may be interested in the slides for the [url=http://kcpug.org/doghouse/2004_dec/savant_20041218.swf]Presentation on PHP Savant[/url].

    Happy holidays!!

    November, 2004

    This month we discussed the next round of changes for the website, lots of new topics for the next year and gave away items from Apress. Helen took plenty of pictures and introduced our first Roaming Book: Google Hacks, from O’Reilly.

    Read on for more!

    Now that the website migration is complete, we set our sites on the future this month.

    Website Changes

    Many of us agree that the categories that group the content on the site are in need of some…updating. The Forums are going to get slimmed down a bit. None of the content will be lost, but just consolidated under fewer categories. Add some comments here if you have some recommendations.

    Main site Topics

    Current Topics
    Affiliates
    Ask the Pug
    Book Reviews
    Developer News
    Future Meetings
    General News
    Meeting News
    Suggestions / Requests
    Updated Topics
    Affiliates
    –Apress
    –O’reilly
    –phpcon, etc.
    Book Reviews
    Tutorials and News
    –Linux
    –Apache
    –MySql
    –PHP
    –etc. (XML, comp-sci theory, etc)
    KCPug Events (Meeting Notes)

    I’m thinking the Events would just be used for Event news, etc. If a tutorial, presentation, etc happens…then it could go into the appropriate Tutorial slot. Again, any ideas would be appreciated.
    One thing I forgot to mention, was I’m thinking about adding a member links section. A place where you can all brag…er, link to all of those sites, resumes, etc that you are associated with.

    Future Topics

    I’ve been thinking up topics again. While PHP 5 is still a lot of fun to talk about, most of our attending members still can’t use it “at work.” Either not enough hosts have moved to it, or we have far too much php 4 code to test before we can move. So, this has influenced out presentation schedule a bit:

    December, 2004

    Savant – Using PHP as a templating engine

    January, 2004

    Introduction to PHP
    I’ve also been receiving quite a few requests for us to start over. In other words, I have heard from many developers in Kansas City who would like to have a nice introduction to PHP. This will be their chance.
    To start off the new year, I’ll put on a special 2hr Introduction class. Because of the length of time, and the concentration of the material, I’d like to look into hosting it in more of a classroom type setting. I’ll check into having this one at the college, JoCo Library, etc. Once I get the place set, I’d like to really push to get the word out…really start our year off with something special.

    February, 2004

    XML Serializer/Unserializer

    March, 2004

    DB DataObjects
    An OO approach to database queries

    April, 2004

    HTML_Quickform

    Additional Topics

    Then, starting in May, maybe it will be a more appropriate time to get back to our Series on PHP 5.

    New Content on the way

    We have received a request for an article or presentation on the following:

    Building Modular Systems: The Design and Implementation of a CMS

    • Concepts of modularity
    • Adding Modules Dynamically (Uploading, unpacking, installing)
    • Designing for PHP 4 vs PHP 5

    Book Reviews

    Pleanty of book reviews are on the way as well:

  • Advanced PHP Programming (O’reilly)
  • Web Database Applications with PHP and MySql 2nd edition (O’reilly)
  • Upgrading to PHP 5 (O’reilly)
  • Pro Apache (Apress)
  • Essential PHP Tools (Apress)

    The Apress Giveaway

    Thanks again to Apress for hooking us up with some new books and T-Shirts.

    Check out the happy winners! Well, actually they turned out to be more like volunteers. Thanks for your help everyone!!

    [img]http://www.kcpug.org/site/uploads/img41a00aaf726b7.jpg[/img]
    [size=x-small][color=000033]Click to enlarge[/color][/size]
    Look forward to their book reviews in the coming months.

  • October Meeting

    This month we discussed the future of the KC PUG. Don’t worry, we aren’t going anywhere…just about to get a whole lot better.

    I’m going to be addressing MANY of the issues we have been having with the website, etc. I’m also going to be adding Content again!!! You like content, right? 😉 Check back soon for more info!!

    And if you havn’t already, please cast your opinion to our poll. Click or Comment….it’s your choice!

    September 2004 Meeting

    It was a great meeting today. So many people showed up–I was very happy to have prepared something. You can download my presentation on Getting Started with PHP5. Please, send on any comments or questions.
    If you are interested, I used OpenOffice.org’s Impress to create the presentation. It has a very handy Export to Shockwave Flash function, which was used to produce the .swf linked above.

    July 2004 Meeting – PHP5 has arrived

    July was a blast! Thank you to everyone who dropped by. We had a great mix of first-timers and return members. Of course, we discussed some of the new features of PHP 5 as well as how to start using it. All detailed in this month’s PUG.
    [i]
    EDITED: 20040107 – Cleaned up the markup to be more xoopish. And added \ marks to the configure example. They simply tell the shell that all of that is really the same command (or line). Note, all of this works with the now current 5.0.3…just so ya know.[/i]
    If you are looking for the definitive source of changes in PHP5, look no further than [url=http://www.php.net/manual/en/migration5.php]The Migration Guide[/url]. In the [url=http://www.php.net/manual/en/]php documentation[/url], you will find a host of new features sprinkled throughout…but who has time to read all of those pages!

    Fear not, their [url=http://www.php.net/manual/en/migration5.php]Migrating from PHP4 to PHP5[/url] document will certainly make for a great evening read. This helpful document will tour you through all the new features and (known) backwards incompatibilities in this amazing release.

    After talking about the exciting new object model for a little while, we discussed to ways to install PHP on your own machine.

    The first, using a Windows Installer called [url=http://www.wampserver.com/en/index.php[/url]WAMP5[/url]. If you are using windows and just want an easy to install setup of PHP5, mysql, mysqladmin and apache…look no further. It installs in no time, and seems to do the trick quite nicely. They even have a PHP4 add-on now, so that you can switch between 4 and 5 with ease.

    Next, we walked through installing PHP5 as a CGI on an existing PHP4 enabled server. This allows me to continue my day job in PHP4, yet gives me a way to start playing with 5. If you are looking to do something similar in windows, you might check out the this [url=http://www.circle.ch/blog/p1387.html]weblog entry[/url] on circle.ch.

    My process was very similar. Now again, this is in linux, and I like to keep the software that I compile seperate from the software that is installed by my Linux distribution. So, your pathnames may vary. 😉

    First, I pulled down the tar ball (php-5.0.0.tar.bz2) from php.net. Then, I went to my build directory and un-tarred it.

    [code]$ tar -xvjf ~/php-5.0.0.tar.bz2[/code]

    Then, I used the configure command to tell the PHP source a little bit about what I want built in, and where I would like it to go.

    [i]You can find more information on [url=http://www.php.net/manual/en/configure.php]php configure options[/url] on php.net.[/i]

    [code]$ cd php-5.0.0
    $ ./configure \
    –enable-force-cgi-redirect \
    –prefix=/opt/php5.0.0-cgi \
    –with-zlib \
    –with-libxml-dir=/usr/ \
    –with-xsl=/usr/ \
    –disable-pear \
    –with-gd \
    –enable-gd-native-ttf \
    –with-freetype-dir=/usr/lib \
    –with-jpeg-dir=/usr/lib \
    –with-png-dir=/usr/lib \
    –with-zlib-dir=/usr/lib \
    –with-gettext \
    –with-curl \
    –with-pspell \
    –with-mysql=/usr/lib/mysql/ \
    –enable-debug \
    –with-pear=/opt/php5.0.0-cgi/php-lib/ \
    –with-config-file-path=/apache/conf/ \
    –with-config-file=/apache/conf/php-5-cgi.ini[/code]
    [code]$ make
    // a minute 14 seconds later…
    $ make install[/code]

    PHP then installs itself…no sweat. You can even run your new php on the command line. If you used the example above, you would run start it like so:

    [code]$ /opt/php-5.0.0-cgi/bin/php[/code]

    All that is left is to add a new vitual host to your apache.conf

    [code]

    ServerAdmin [email protected]
    ServerName php5-demo
    DocumentRoot “/u01/httpd_data/site/php5-demo/htdocs”

    Options None
    AllowOverride all
    Order allow,deny
    Allow from all

    ErrorLog /u01/httpd_data/logs/php5-demo/error_log
    CustomLog /u01/httpd_data/logs/php5-demo/access_log combined
    DirectoryIndex index.php index.html
    ScriptAlias /cgi-bin/ “/opt/php5.0.0-cgi/bin/”
    Action php5-script /cgi-bin/php
    RemoveType .php
    AddHandler php5-script .php .html


    [/code]
    Last but not least, you will need to add an entry for your fake server to your /etc/hosts file.

    [code]127.0.0.1 localhost tachyon www php5-demo[/code]
    Now, just restart your apache and you should be in business.

    Put a little index.php (with a [b][/b] or something in it) in /u01/httpd_data/site/php5-demo/htdocs and open your browser to http://php5-demo. You should be greeted by the PHP 5 information!