News Feed
Jobs Feed
Sections




News Archive
feed this:

SitePoint PHP Blog:
How To Synchronize Your PHP and MySQL Timezones
April 20, 2011 @ 11:52:50

In a new post to the SitePoint PHP blog today Craig Buckler looks at a method for synchronizing your time between your PHP application and it's MySQL backend to make date handling a bit easier - no messy code-based timezone changes needed.

Many developers solve the problem by shifting all date/time responsibility to PHP. They may also convert dates to Unix timestamp integers for simpler handling, although you should be wary of the Y2K38 Bug.

They show a handy tip so you won't have to worry quite so much that relies on setting a "TIMEZONE" constant you can use to set the default timezone and a "time_zone" offset that can be used each time you make the connection to your database (or, alternatively, in a cron that keeps things up to date without interfering with performance).

0 comments voice your opinion now!
timezone sync mysql database offset


Juozas Kaziukenas's Blog:
Using Phing to sync files with shared hosting
March 02, 2009 @ 13:41:12

Juozas Kaziukenas has a new post to his blog today looking at using Phing to keep files in sync on a shared hosting, FTP only kind of environment.

Today I was trying to use [Phing] in shared hosting server, but as you will see, Phing can't do a lot of it's functionality without direct access to server (over shh for example). [...] Things get worse, when you try to sync files in shared hosting environment, where only FTP is available. [...] Code in the hole some months ago posted solution which uses Net_FTP (FTP functionality wrapper) package to upload files to server. I decided to try given solution, so I modified it to download source code from SVN first and then upload them.

His Phing configuration sets up the application, defining the source directory, the files to push, the FTP connection to make and pushes the files over out of an svn export. He has a slightly different solution (no code/config for this one) that would grab the last revision value from the remote server and only push out the files have have changed since then.

2 comments voice your opinion now!
phing sync files shared hosting ftp subversion svn source configuration


Joshua Eichorn's Blog:
Pear Mirror
March 28, 2007 @ 10:19:00

Joshua Eichorn has posted a quick note about a new addition to the PEAR functionality (with some help from Greg Beaver) - hosting a mirror of the main PEAR channel.

At the moment were only mirroring installer data not the entire website but its a start. Things are still in the testing phase, but the mirror is usable, just run: pear config-set preferred_mirror us.pear.php.net

The update runs every four hours, so thing might be a little out of sync sometimes, but if you're just looking to keep things up-to-date, that's more than enough.

0 comments voice your opinion now!
pear mirror hosting channel sync update pear mirror hosting channel sync update



Community Events









Don't see your event here?
Let us know!


event opinion language framework tool interview composer example unittest object code community development testing api functional release zendframework2 podcast introduction

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework