public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] eaccelerator messes up virtual webapps
@ 2007-06-30  7:32 Christoph Erdle
  2007-07-01  2:03 ` Kent Fredric
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Erdle @ 2007-06-30  7:32 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

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)



[-- Attachment #2: Signierter Teil der Nachricht --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-user] eaccelerator messes up virtual webapps
  2007-06-30  7:32 [gentoo-user] eaccelerator messes up virtual webapps Christoph Erdle
@ 2007-07-01  2:03 ` Kent Fredric
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Fredric @ 2007-07-01  2:03 UTC (permalink / raw
  To: gentoo-user

On 6/30/07, Christoph Erdle <chris@team-erdle.de> 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 kdrtf@gma.com"[(2*x)..(2*x+1)]}'
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-01  2:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-30  7:32 [gentoo-user] eaccelerator messes up virtual webapps Christoph Erdle
2007-07-01  2:03 ` Kent Fredric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox