On 6/30/07, Christoph Erdle <[EMAIL PROTECTED]> wrote:
Hi,

I encountered a really annoying behavior of eccelerator.

On my server I run several installs of wordpress using gentoo's
webapp-config, all up to the same version. When the cache is empty
all works as expected, it caches the called php pages. BUT when I
access a different install of wordpress I get the sites that were
cached for the installation i accessed before.

In the log of eaccelerator I see that the hits are for the wrong
locations on the file system, it seems that eaccelerator only caches
an checksum of the files accessed but not their actual path. E.g. all
index.php for all wordpress installs are the same, as they are
installed via webapp-config, and the cache hits for the first one
accessed.

Are there any possibilities getting eaccelerator to run on a vhost
environment?

Any help appreciated,
Steelynose

--
Solidarität ist die Zärtlichkeit der Völker. (Ernesto Che Guevara)



You could just mass modify the php scripts so the checksums don't fire the same.

If you get desperate for answers :

----------------------------------------------------------------------
#!/usr/bin/ruby
#
#
#
#   turns ?> in all files in the current directory with .php
#   to  /*random:BYTESHERE:*/?>
#   we replace the closing tag instead of the opening cos the opening might
#   be <?php instead and we dont want to break stuff
#
def randomBytes()
        bchars = %w{1 2 3 4 5 6 7 8 9 A B C D E F}
        bcount = bchars.length
        output = ""
        10.times{ |z|
                output << bchars[(rand * bcount-1).round]
        }
        return output
end



# Foreach PHP File
Dir::glob("**/*.php"){ |x|
        # if already backed up, do nothing
        unless FileTest::exists?("#{x}.bak")
                output = []
                #backup
                `cp "#{x}" "#{x}.bak"`
                #read file
                input  =File.new("#{x}", "r" )
                input.each_line{ |line|
                        output.push(line.gsub(/\?\>/, "/*random:" + randomBytes() + 
":*/?>" ))
                }
                input.close;
                #write file
                replace = File.new("#{x}","w")
                output.each{ |x|
                        replace.puts(x);
                }
                replace.close
        end

}
-------------------------------------------------------------------------------------

--
Kent
ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x|
print "enNOSPicAMreil [EMAIL PROTECTED]"[(2*x)..(2*x+1)]}'
--
[EMAIL PROTECTED] mailing list

Reply via email to