views:

43

answers:

1

I have a php application running on busybox httpd on an ARM-based embedded system. The application is quite slow but I would prefer not to rewrite it in C++. I'm looking for a way to precompile/cache it on ARM but cannot find any of the systems to be available for this architecture.

A: 

I was able to compile APC into as static extension to PHP. The procedure is more or less following (using buildroot):

  • copy apc files to php/ext/apc
  • edit package/php/php.mk file and add --with-apc --enable-apc
  • remove .stamp_configured or similar file, remove configure, run ./buildconf --force
  • due to missing shm functions in uclibc, comment out whole part in apc_mmap.c that calls shm_open. There is a medium-size "if" there that calls shm
  • edit php Makefile and add -lpthread (ugly way)
  • make php from buildroot main dir
  • add apc configuration to php.ini

Good luck!