Archive | September, 2002

Linux: Changing the System Time/Date

Posted on 11 September 2002 by Demian Turner

Changing the system date/time is a typical task for anyone managing a Linux system. Often if you have clients in different timezones the system time/date will need adjusting. The same command date that you use to get the current date/time is also used to set the system clock, provided you are logged in as root 😉


  • date – Displays:  Sun Jun 11 12:56:54 CDT 2002
  • date  – Will set the system date:
    • MM month
    • DD day within month
    • hh hour
    • mm minute
    • CC first two digits of year (optional)
    • YY last two digits of year (optional)
    • ss second (optional)

So an example of this would be:

date 06111256

Quite often it is a good idea to sync the hardware clock to the system time you have just set, this is done by executing the following:

/sbin/hwclock –hctosys

Comments (0)

OOP: Explanation of the Factory Design Pattern

Posted on 10 September 2002 by Demian Turner

from CNET
The factory pattern can help solve your application issues. For example, developers often must reply to users based on each user’s machine, creating multiple hardware issues. The factory pattern can streamline the process. The concept is simple, but the solutions created with the factory pattern are powerful.

Comments (0)

PHPCon 2002 Call for Participation

Posted on 09 September 2002 by Demian Turner

Linux Magazine and PHP Journal present PHPCon 2002, the first US based,
technical conference by and for PHP Developers. No other conference in
the US is placing PHP front and center as the language for solving web
problems. Meet the leaders in the PHP community; from companies running
huge PHP applications to the core developers of PHP 4. Take advantage of
Work in Progress Reports and Birds of a Feather session as opportunities
to meet and mingle with peers, gurus, and greats in a relaxed, congenial

Comments (0)

Backup stragegies for Linux/win32

Posted on 08 September 2002 by Demian Turner

This excellent post off slashdot attracted many users to post in their backup tricks, some really good ideas here including backing up samba partitions, over passwordless ssh, incremental backup trees

A colleague of mine has written a great tutorial on how to use rsync to create automatic “snapshot-style” backups. Nothing is required except for a simple script, although it is thus not necessarily suitable for data-center applications. Please try to be gentle on his server: it is the computer that he mentions in the tutorial. Perhaps try the Google cache.”

Comments (0)

Directory Browsing with Apache

Posted on 07 September 2002 by Demian Turner

You can specify in your httpd.conf which directories on your webserver should be browsable, ie, if there isn’t an index.* file then users will see a list of the files in that directory.

Comments (1)

HTML Date picker

Posted on 07 September 2002 by Demian Turner

If you liked and used the dHTML date picker recently featured
on PHPkitchen, you may be interested in it’s little brother, the HTML date picker.
While not as flashy as its sibling, the HTML version offers the following advantages

  1. it’s 6k instead of 36k
  2. it will work with *any* browser
  3. it’s probably quicker to integrate with PHP projects
  4. it features time including seconds, good for a visually representing a timestamp,
    ie, when an article was submitted

Comments (0)

Use Apache to Ban an IP/Domain

Posted on 07 September 2002 by Demian Turner

Every once in a while you’ll find yourself the victim of unwanted company, beit nuisance users of your forums or an outright spam attack. Last week someone in Russia had the bright idea to fire off a bot on PHPkitchen that sent our bandwidth limit through the roof and ended up costing a pretty penny. Read more to find out how to update your httpd.conf to ban an IP/domain name.

Update your apache config as follows

<Directory "/"> 
order allow,deny 
allow from all

deny from  #bad IP

Comments (0)

MyODBC with Office 2000

Posted on 06 September 2002 by Demian Turner

What\’s the version of MyODBC that works with Office 2000 under Win98?

Version 2.50 and later fails when retrieving the data of the table. You can connect but not retrieve the data of the table.

Comments (1)

Cross-Platform Desktop Apps with PHP-GTK

Posted on 06 September 2002 by Demian Turner

You’ve probably already heard about the PHP-GTK extension that allows you to write client-side gui apps in PHP – no web browser required 😉

Already some impressive examples are available:

  • PHPMole – a modular integrated development environment
  • Agata Report – a graphical client for PostgreSQL, MySQL, and other databases
  • Teak – an IMAP mail client
  • NewzRider – a newsreader (NNTP) client

Check out Andrei Zmievski’s presentation at for a full introduction to GTK and some great screenshots.  Or read this interview to find out more how the extension came about.  Or if you want to jump right in and start coding this tutorial at Zend will start you off with all the basics you need to know.

Comments (0)

PHP: Most Popular Web Language

Posted on 05 September 2002 by Demian Turner

PHP (PHP: Hypertext Preprocessor) is a highly popular open source server-side scripting language used to build dynamic Web sites and e-businesses. In use by more than 500,000 developers worldwide, PHP is taking the Internet by storm. In fact, a recent survey indicates that it has surpassed Microsoft’s Active Server Pages (ASP) for having the greatest number of server installations on the Internet.

Comments (0)



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists