I recently setup an external program to handle my URL rewrites. The program itself works pretty well, and so do the rewrite directives in apache. The problem is that I recently made changes to my external program. I know I have to restart apache for this to take effect, and so I did. Apache now seems to have reloaded my external program and everything works fine... until, about 12-24 hours later, it seems to use the old version of my program again! It's as if the old version is stuck in some sort of cache or memory. Is this a known issue or bug? Here are some details:
Apache:
Server version: Apache/2.0.52
Server built: Oct 29 2008 09:20:05
(I'm using the redhat enterprise 3 approved package).
The mod_rewrite directives:
under httpd.conf:
RewriteMap urlrewriter prg:/xxxxxx/scripts/urlrewriter.php
under .htaccess in the web directory:
RewriteEngine On
RewriteRule ^([A-Za-z0-9_-]+).html$ ${urlrewriter:$0}
The external program is written in PHP, and the first line calls /usr/bin/php. Again I'm using the redhat package for php:
PHP 5.2.9 (cli) (built: Feb 27 2009 14:38:59)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Again, the program isn't with processing my code and giving out URLs. The problem seems to be that when I update the external program and restart apache, apache seems to run the update code for a while, but then for some reason reverts back to code before my update... even though I'm just overwriting the external program file... It's as if it the old code is stuck in memory or something.
Can someone please advise?
Thanks,
Sridhar