« Extending PHP5.3 objects at runtime with lambda functions No xmlrpc to Habari from G1 »

Dynamic PHP requires/includes, APC and Habari

1v$ date
1v$ Thu Jan 1 0:00:00 GMT 1970

This topic has been talked about across teh interwebs quite a bit already, but I’m putting it here for potential googlers to come across it when looking for Habari related posts.

Like a lot of blogging/CMS software, Habari uses PHP dynamic includes and requires for pulling in user-selected themes and plug-ins. This might cause some problems for you if you use the opcode caching extension APC (or one of the other alternatives like Xcache) to speed up PHP apps on your server (by caching the compiled opcode data, so the Zend engine doesn’t have to compile this everytime the script is executed).
Normally opcode caches check to see if the file has been modified, but because dynamic includes/requires use runtime variables to define where a file is pulled from, the caches can become a bit screwed up if you move any files around.

2 ways to solve this are to 1) flush the cache (you can find more about this in your opcode caches documentation, I for one used the default apc.php admin script that comes with APC to log in and flush the data), or 2) update the mtime on the file that’s throwing a fatal error to tell the cache to update for this file.


Edit
Feed for this Entry

0 Responses to Dynamic PHP requires/includes, APC and Habari

    There are currently no comments.

About You

Email address is not published

Add to the Discussion


Subscribe to Feed

Navigation

Asides

  • January 9 - Fixed textitle usage in atom feed

    I’ve started using Textile) for markup in my posts, but it wasn’t getting parsed in my Atom feed..now fixed!

  • January 2 - No xmlrpc to Habari from G1

    The Android Market place doesn’t have any xmlrpc apps to work with Habari, just one that should work but doesn’t as it’s doing something only Wordpress seems to understand. FAIL.

More Posts

Recent Comments

Links

Latest tweet on Twitter

User Login