This just came up on #zftalk, and it appears that the information out there is either incomplete or incorrect, so I thought I’d just put out a simple solution. Here’s a simple way to calculate the difference between two Zend_Date objects (in days):
$jan1 = new Zend_Date('1.12.2009', Zend_Date::DATES);
echo "\nJanuary first: ", $jan1->toString();
$christmas = new Zend_Date('25.12.2009', Zend_Date::DATES);
echo "\nChristmas is on: ", $christmas->toString();
$diff = $christmas->sub($jan1);
echo "\nNumber of days: ", $diff / 60 / 60 / 24;
This post is mostly a reminder to myself, but I thought I’d put it out there just in case other people wanted some help:
If Zend Server is already installed, you need to remove it:
/Applications/ZendServer/bin/zendctl.sh stop/etc/zce.rcps ax|grep -i zend)/usr/local/zend/bin/uninstall.shNow download the latest version of the Zend Server CE Installer and run the installer
Link the CLI binary so you can use PHP from the command line:
sudo ln -s /usr/local/zend/bin/php-cli /usr/bin/phpNow download the latest version of the Zend Framework
Unzip and copy the following files:
library/Zend to /usr/local/zend/share/ZendFramework/library/Zendextras/library/ZendX to /usr/local/zend/share/ZendFramework/library/ZendXbin to /usr/local/zend/share/ZendFramework/binzf command line tool, and the version of the Zend Framework that came with Zend Server is up-to-date, these steps are unnecessaryFinally, link the zf.sh file so you can access it easily:
sudo ln -s /usr/local/zend/share/ZendFramework/bin/zf.sh /usr/bin/zfThat’s it for now. Hope that helps someone else out.
Recent Comments