dboettger's Blog

Archive for the ‘Apple’ Category

APC is a free, open, and robust framework for caching and optimizing PHP intermediate code. — http://pecl.php.net/package/APC

The Installation of APC – Cache is quite easy. I assume you already have the Xcode development tools installed on your system and possibly compiled php on your own.

Just open the Terminal.

sudo pecl install apc

The following question should pop up. Please answer with yes:

Use apxs to set compile flags (if using APC with Apache)? [yes] : yes

After the installation completes, just edit the php.ini under /etc.

nano /etc/php.ini

In the extensions subsection just add following line:



Dear guys,

sorry for not posting for such a long time.
Hope i can give you some new information about pushmail and the iphone.
A lot of people out there are not happy about the iphones imap capabilities, cause the iphone does not support the IDLE command to get the mails in realtime. There is only a opportunity to pull the mails with imap.
A few weeks ago i found a project called z-push, which is implementing a open source version of Activesync.

After i read the statements from their homepage, i was quite impressed and decided to test this nice little kind of software.
Today i downloaded the tar file from sourceforge und unpacked it.
After configuring apache, php and config.php. I tried to enable the pushservice on my Iphone.
I selected exchange in the emailmenu and configured the ip of the server.
It was wonderful my imap server was now able to push the emails to my iphone, but with strange behavior. The emails were always marked as read.
The second thing was, i was not able to move messages into folders.

But i found this solution http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=339&p=1669#p1669

"backend/diffbackend.php" line 275:
function ImportMessageMove($id, $newfolder) {
+ $this->_backend->MoveMessage($this->_folderid, $id, $newfolder);
return true;

Also, this had to be done to avoid the iPhone from setting all messages to read:
"backend/imap.php" line 593:
- $mail = @imap_fetchheader($this->_mbox, $id, FT_PREFETCHTEXT | FT_UID) . @imap_body($this->_mbox, $id, FT_PEEK | FT_UID);
+ $mail = @imap_fetchheader($this->_mbox, $id, FT_UID) . @imap_body($this->_mbox, $id, FT_PEEK | FT_UID);

I hope i was able to help somebody.

Best regards,


A few days ago i had some trouble with my Address Book. The firstname and the lastname of any persons were inverted. The problem began with a sync of a Sony Ericsson K610i. After this sync the firstname of a person has been written in the column lastname and the lastname has been written in the column firstname.

After a few minutes looking for a solution included in the Address Book application i thought there was no option to invert the firstname and the lastname.

I wrote a small applescript and hope if somebody will have the same problem he will be able to use my script. In my case it worked like a charm.

tell application "Address Book"
repeat with this_person in every person
set first_name to first name of this_person as string
set last_name to last name of this_person as string
if not first_name = "missing value" then
set last name of this_person to first_name
delete last name of this_person
end if
if not last_name = "missing value" then
set first name of this_person to last_name
delete first name of this_person
end if
end repeat
end tell