eAccelerator “eaccelerator.filter=” syntax

October 28, 2006 - 16:22
eAccelerator “eaccelerator.filter=” syntax
Posts: 3
Joined: 2006-10-27

eAccelerator “eaccelerator.filter=” syntax problem.

Web Server:
Intel P3, 1Ghz, 512Mb
OS Win XP Pro sp2
Abyss X2 ver 2.3.2 web server
MySQL ver 5.0
PHP ver 5.1.6
eAccelerator095_5.1.6.dll
(Was using eAcceleratorRC1_5.1.6.dll with the same results)

I have a problem with BBclone ( http://bbclone.de ) web server statistics program when using eAccelerator. BBclone rewrites its access.php file with each web access and eAccelerator’s caching of this file causes access.php to become corrupt occasionally, approximately once to twice a week. The timing of the access.php rewrite and eAccelerator’s caching would seem to be the problem.

Below is the entry from eAccelerator’s log file when the problem occurred:
EACCELERATOR: Warning: "Server_Stats/var/access.php" is cached but it's mtime is in the future.
EACCELERATOR re-cached: "C:\Web Servers\Main Server\Server_Stats\var\access.php"

The root of this web server is at "C:\Web Servers\Main Server\”

I am having a problem with the syntax for eAccelerator “eaccelerator.filter=” to exclude the \Server_Stats directory from the eAccelerator cache and hope someone could help me out.

I have tried the following:
eaccelerator.filter=”!\Server_Stats*” and the \Server_Stats directory continued to get cached.

As a test I tried:
eaccelerator.filter=”\Server_Stats*” and only the \Server_Stats directory was cached. Looks like the syntax for include is ok but I can’t figure out how to exclude the directory.



October 30, 2006 - 18:34
Posts: 411
Joined: 2006-01-02

Try the following:
eaccelerator.filter=”!\Server_Stats\*.php”
or
eaccelerator.filter=”!\Server_Stats\*.*”
or
eaccelerator.filter=”!\Server_Stats\*”

Also not sure how well EA handles sub-folders, so if the previous example doesn't work try the same 3 with your exact path (upto the file):
eaccelerator.filter=”!\Server_Stats\var\*.php”
or
eaccelerator.filter=”!\Server_Stats\var\*.*”
or
eaccelerator.filter=”!\Server_Stats\var\*”

If none of these work try then without the the first "\":
example: eaccelerator.filter=”!Server_Stats\var\*”

If none of these example work you can alway name the files you do not want cached .phpX
and use the filter "!*.phpX" (just make sure you map .php4 so it is also handled by PHP).

You could also just go with: "!access.php"

Let us know what worked.



October 31, 2006 - 08:25
Posts: 3
Joined: 2006-10-27

Tried your recommendations and some more combinations of my own but nothing worked.

The interesting thing is that with "!access.php" the file “\Server_Stats\var\ access.php” continues to be included in the cache.

I searched around with Google but could not find any similar problems.

Any chance the compile of the DLL (Windows version) is not interpreting the “!” properly? Just a shot in the dark.



November 2, 2006 - 21:02
Posts: 411
Joined: 2006-01-02

I just tested this article again (using ea 0.9.4) and it works.
eaccelerator.filter example

Adding to the appropriate php.ini file, the following directive:
eaccelerator.filter="!*earch.module"

makes eAccelerator not cache search.module.

Don't forget to restart the web server for the directive to be active and use the eAccelerator Control Panel to check what's in its cache.



November 3, 2006 - 12:53
Posts: 3
Joined: 2006-10-27

I got eAccelerator to exclude access.php with your help.

The following two filters work:
eaccelerator.filter="!*ccess.php"
eaccelerator.filter="!*access.php" (I am using this one)

The only problem is all file names ending with access.php will be exclude, not a problem for me but would be nice to be able to exclude only the exact file name.

The following filters will NOT work:
eaccelerator.filter="!access.php"
eaccelerator.filter="!\Server_Stats\var\access.php"
eaccelerator.filter="!\*erver_Stats\var\access.php"
eaccelerator.filter="!*erver_Stats\var\access.php"
eaccelerator.filter="!*\Server_Stats\var\access.php"
eaccelerator.filter="!Server_Stats\var\*ccess.php"
eaccelerator.filter="!\Server_Stats\var\*ccess.php"

Thanks for your help,
Bill
Lion’s Head, ON. Canada

PS:
Any time frame for a Windows eAcceleratore.dll for PHP 5.2.0?



November 4, 2006 - 15:20
Posts: 411
Joined: 2006-01-02

Excellent.

Another idea: In PHP "\" is an escape character.
Try the same filters but replace "\" with either "\\" OR "/"

So something like:
eaccelerator.filter="!\\Server_Stats\\var\\access.php"
eaccelerator.filter="!/Server_Stats/var/access.php"
OR (since I'm not sure how full Windows paths appear to ea):
eaccelerator.filter="!*\\Server_Stats\\var\\access.php"
eaccelerator.filter="!*/Server_Stats/var/access.php"

Let us know if that works.
Also just released a new version EA for PHP 5.2.0.

Cheers,
Chris