<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 14:05:50 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DevShed.com: PHP: Best Methods for Running Scheduled Jobs]]></title>
      <guid>http://www.phpdeveloper.org/news/18152</guid>
      <link>http://www.phpdeveloper.org/news/18152</link>
      <description><![CDATA[<p>
On DevShed.com today there's a new article posted looking at <a href="http://www.devshed.com/c/a/PHP/PHP-Best-Methods-for-Running-Scheduled-Jobs-20103/">methods for running scheduled jobs</a> based on responses to <a href="http://forums.devshed.com/php-development-5/what-is-the-best-method-for-running-scheduled-jobs-in-916361.html">this forum post</a>.
</p>
<blockquote>
I have a webpage form that requires a date and time to be submitted. When it's submitted I need the back-end to run a script at the time and date specified. Have you ever needed to do something like this? 
</blockquote>
<p>Some recommendations already posted include:</p>
<ul>
<li>The UNIX <a href="http://en.wikipedia.org/wiki/At_(Unix)">"at" command</a>
<li>Setting up a queue system to manage the processes (using something similar to <a href="http://gearman.org/">Gearman</a>
<li>Setting up a <a href="http://en.wikipedia.org/wiki/Cron">cron job</a> to handle the periodic execution of the script.
<li>
</ul>]]></description>
      <pubDate>Thu, 28 Jun 2012 11:01:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Working with Dates and Times in PHP and MySQL]]></title>
      <guid>http://www.phpdeveloper.org/news/17608</guid>
      <link>http://www.phpdeveloper.org/news/17608</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial by <i>Sean Hudgston</i> about <a href="http://phpmaster.com/working-with-dates-and-times">working with dates and times</a> via the PHP date functions and how they cooperate with dates/times from a MySQL database.
</p>
<blockquote>
When working in any programming language, dealing with dates and time is often a trivial and simple task. That is, until time zones have to be supported. Fortunately, PHP has one of the most potent set of date/time tools that help you deal with all sorts of time-related issues: Unix timestamps, formatting dates for human consumption, displaying times with time zones, the difference between now and the second Tuesday of next month, etc. In this article I'll introduce you to the basics of PHP's time functions (time(), mktime(), and date()) and their object-oriented counterparts, and then take a look at MySQL dates and show you how to make them play nicely with PHP.
</blockquote>
<p>
His examples include how to get the current Unix time, formatting dates/times, making timestamps and working with the more powerful DateTime objects. On the MySQL front, he shows the result of a normal date select, one using the "unix_timestamp" function and how to shift the result based on the user's timezone.
</p>]]></description>
      <pubDate>Thu, 01 Mar 2012 08:51:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Splitting large MySQL dump files]]></title>
      <guid>http://www.phpdeveloper.org/news/16937</guid>
      <link>http://www.phpdeveloper.org/news/16937</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Sameer Borate</i> includes a handy bit of code you can use to <a href="http://www.codediesel.com/php/splitting-large-mysql-dump-files/">split up a large MySQL dump file</a> into smaller, easier to digest chunks.
</p>
<blockquote>
One of the frustrating things with working with MySQL is of importing large sql dump files. Either you get a 'max execution time exceeded' error from PHP or a 'Max_allowed_packet_size' from MySQL. In a recent task I needed to import a table of around a million records on a remote host, which quickly became an exercise in frustration due to various limitations on the server. SSH was of no help as changing the configuration files was restricted to the root user. My last resort was to split the huge 'INSERT' statements into smaller size files. 
</blockquote>
<p>
His script needs a little extra time to run (he sets max execute to 600 seconds) and takes the SQL file in line by line, splitting them back out to over files based on a "count" value - "dump-split-*". Depending on the size of your files, using something like this might not be an option. You might need something more like the <a href="http://kb.iu.edu/data/afar.html">command line "split" feature</a> to keep it outside of PHP's memory management all together.
</p>]]></description>
      <pubDate>Mon, 03 Oct 2011 08:44:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Hannes Magnusson's Blog: Unix manual pages for PHP functions]]></title>
      <guid>http://www.phpdeveloper.org/news/13780</guid>
      <link>http://www.phpdeveloper.org/news/13780</link>
      <description><![CDATA[<p>
<i>Hannes Magnusson</i> has <a href="http://bjori.blogspot.com/2010/01/unix-manual-pages-for-php-functions.html">a new post</a> today about an interesting feature of the PHP documentation some might not have known existed - manual pages (man) for PHP functions/methods for unix systems.
</p>
<blockquote>
For a while I had vim configured to run reflection when I hit "<a href="http://vimdoc.sourceforge.net/htmldoc/various.html#K">K</a>", but after the PHP documentation team released unix manual pages for PHP I now get the manual page in all its glory; function description, parameter descriptions, return values, examples, notes, see also and everything you are used to see from the online manual. Its awesome.
</blockquote>
<p>
These manual pages aren't installed by default, so you'll have to grab the download from the PEAR channel for the PHP documentation (doc.php.net/pman). If you're wanting to use it in VIM, you'll also need to change the <a href="http://vimdoc.sourceforge.net/htmldoc/options.html#%27keywordprg%27">keywordprg</a> setting to "pman".
</p>]]></description>
      <pubDate>Tue, 05 Jan 2010 11:06:06 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Unix Epoch and PHP's calendar system]]></title>
      <guid>http://www.phpdeveloper.org/news/13524</guid>
      <link>http://www.phpdeveloper.org/news/13524</link>
      <description><![CDATA[<p>
Based on <a href="http://news.php.net/php.doc.cvs/5325">a fix</a> for a <a href="http://bugs.php.net/bug.php?edit=1&id=50155">recent bug</a>, <i>Derick Rethans</i> wanted to <a href="http://derickrethans.nl/unix_epoch_and_phps_calendar_system.php">clear up something</a> about the Unix Epoc's definition and how it relates to the UTC time zone.
</p>
<blockquote>
While right now it is proper to define the Unix Epoch at "1970-01-01 00:00:00 UTC", UTC wasn't actually defined until 1972. So it would be more correct to define the Unix Epoch as "the number of seconds elapsed since midnight <a href="http://dictionary.reference.com/browse/proleptic">proleptic</a> Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds." (from Wikipedia).
</blockquote>
<p>
He talks about <a href="http://en.wikipedia.org/wiki/ISO_8601#Years">the calendar PHP uses internally</a> and how dates predating it's use don't make much sense either (as well as the modified version PHP uses that includes "year zero").
</p>]]></description>
      <pubDate>Thu, 12 Nov 2009 10:44:51 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Interactive CLI password prompt in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12440</guid>
      <link>http://www.phpdeveloper.org/news/12440</link>
      <description><![CDATA[<p>
On the SitePoint PHP blog today <i>Troels Knak-Nielsen</i> has <a href="http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/">a quick tip</a> for those looking for a way to have their command-line PHP scripts be more interactive.
</p>
<blockquote>
Just a quick tip, since I spent a good hour figuring this out recently. PHP has no native way of doing an interactive password prompt, when running as CLI. You can however use bash for the task.
</blockquote>
<p>
His <a href="http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/">method</a> (for both Windows and Unix systems) uses <a href="http://php.net/shell_exec">shell_exec</a> command to run a VB Script/bash command that handles the password prompt for the PHP script. The result is then passed back into a variable and returned back to the calling application.
</p>]]></description>
      <pubDate>Fri, 01 May 2009 09:34:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Leap Seconds and What To Do With Them]]></title>
      <guid>http://www.phpdeveloper.org/news/11658</guid>
      <link>http://www.phpdeveloper.org/news/11658</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> one of the go-to guys for working with time in PHP has made <A href="http://derickrethans.nl/leap_seconds_and_what_to_do_with_them.php">this new post</a> about something 2008 picked up along the way to 2009 - a leap second.
</p>
<blockquote>
The start of this new year started with some buzz about a leap second being introduced between Dec 31st 2008, 23:59:59 and Jan 1st 2009, 00:00:00. I've had people ask where this <a href="http://en.wikipedia.org/wiki/Leap_second">leap second</a> actually comes from, and whether you need to worry about it in your applications. To understand leap seconds means, unfortunately, understanding how time is actually kept. 
</blockquote>
<p>
He ponints out one of the major problems - how time is kept. With variants of Universal Time, it makes it hard to track down what's "right". He breaks out the difference between other time storage methods and the unix time that PHP can use (that counts the number of seconds since Jan 1st 1970) and how the leap second was handled for each.
</p>]]></description>
      <pubDate>Thu, 01 Jan 2009 20:56:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: BitMasks: Emulate Unix Permissions in PHP (Quickly)]]></title>
      <guid>http://www.phpdeveloper.org/news/5995</guid>
      <link>http://www.phpdeveloper.org/news/5995</link>
      <description><![CDATA[<p>
Permissions in Unix-based systems have become one of the standard models for development all over the world. They're simple to learn and use while being extremely powerful at the same time. In <a href="http://www.phpbuilder.com/columns/eric_potvin20060809.php3">this new article</a> (as contributed by <i>Eric Potvin</i>) from PHPBuilder.com today, they bring this power to the realm of PHP with bitmasks.
</p>
<blockquote>
Bitmasking is a very useful method to emulate Unix-style file permissions (read/write/execute for example). What's nice about a PHP implementation is that you can configure your own bitmasks and use them for any kind of permissions in your scripts and applications. The implementation is relatively simple as well.
</blockquote>
<p>
They <a href="http://www.phpbuilder.com/columns/eric_potvin20060809.php3">start by defining</a> a few of the permission levels (add/delete/denied) in PHP constants before showing the bitMask() function you can use to check a user's permissions. They also include some simple pseudo-code to show how it's used. For more information, check out the <a href="http://www.gen-x-design.com/archives/bitmasks-emulate-unix-permissions-in-php">complete article here</a>.
</p>]]></description>
      <pubDate>Wed, 09 Aug 2006 16:01:53 -0500</pubDate>
    </item>
  </channel>
</rss>
