On x86_64 CentOS 4 systems objects stored to the cache using eaccelerator_put() are never written out to disk, a similar system using an i386 build has no problems.
The problem comes from the calculation of the path in the eaccelerator_md5() function, in the final call to sprintf() the destination and the source arguments are the same, according to the sprintf man page the results of this are undefined. It seems to work as expected on i386 systems, but on x86_64 systems the path prefix in "s" is overwritten. The following patch resolves the issue by removing the overlap.
--- eaccelerator-0.9.5.2.orig/eaccelerator.c 2007-05-17 03:07:31.000000000 +0800
+++ eaccelerator-0.9.5.2/eaccelerator.c 2007-11-06 15:52:32.000000000 +0800
@@ -421,7 +421,7 @@
s[n++] = '/';
}
s[n] = 0;
- snprintf(s, MAXPATHLEN-1, "%s%s%s", s, prefix, md5str);
+ snprintf(&s[n], MAXPATHLEN-1-n, "%s%s", prefix, md5str);
return 1;
#else
zval retval;