Hi Laurent.
Thanks for the comments.
I'm aware of WinCache, and in fact have it as one of the adapters, along with APC. The initial idea behind this package was to give APC locking capabilities, while enabling the use of WinCache as an alternative, if it's available.
In other words, PEAR2_Cache_SHM is to APC what PEAR_MDB2 is to MySQLi - an abstraction layer with a few gap fillers.
The problem with *simply* using WinCache (without such a package) is that its lock function crashes PHP when you run it from the command line. I've already submitted a bug report for that too:
https://bugs.php.net/bug.php?id=60819And the problem with using other extensions with locks like Semaphore is that they're UNIX only, and I don't have the means (including, but not limited to, knowledge) to test such a setup.
> BTW, running PHP_CompatInfo with PHP 5.3.9 on your source code gave me fake negative.
Given that I haven't made any tests, your negative may not be a fake one :-D .
> You should exclude NetBeans project configuration from your repository
I like to keep it for the sake of syncing across my two dev PCs. It's not going to be part of the packaged TGZ anyway, so where's the harm :-P ? If other developers want to use other IDEs and store their configuration in the repository, I have no problem with that, as long as they've contributed more than the config itself and all developers using that IDE agree on a configuration.
> Don't forget to test it with mod FASTCGI on IIS or Apache
Funny, you're saying that as if PHPUnit can run from FastCGI... wait... can it? How?
(I have IIS 7.5 on one machine and Apache 2.2 on another one, though running PHP as a module and not FastCGI)
Regards,
Vasil Rangelov
-----Original Message-----
From: Laurent Laville [mailto:
pear@...]
Sent: Saturday, January 21, 2012 1:02 PM
To: Васил Рангелов
Cc:
pear-dev@...
Subject: Re: New package (sort of...) - PEAR2_Cache_SHM
Le 20/01/2012 21:56, Васил Рангелов a écrit :
> Hello.
>
> Previously, I wrote asking about PEAR2_Cache, but since no one said
> anything, I'm assuming there's nothing in the works, correct?
>
> Well, I've made an initial implementation of a shared memory package,
> and would highly appreciate comments on it, as I'm new to these kinds
> of locks and stuff, at least in terms of PHP (my experience starts and
> ends at C#'s lock language construct).
>
> A particular point I'm specifically looking towards... does anyone
> have an idea how to unit test such a package (on Windows too)?
>
> Anyway, the package is currently at
>
https://github.com/boenrobot/Cache_SHM>
> Regards,
> Vasil Rangelov
>
Hello Vasil
I've just have a look on your source code at GitHub, and I want try to help you a little.
I've learnt, with your proposal, that extension wincache exists.
So to try it on Windows, you should :
- visit PECL home page at
http://pecl.php.net/package/WinCache- follow the link
http://www.iis.net/expand/WinCacheForPhp- download either PHP 5.2 or 5.3 no-thread-safe versions by links
WinCache 1.1 for PHP 5.2 - x86
WinCache 1.1 for PHP 5.3 - x86
Windows Exe are self-extracting archive : you can run it or open it with your favorite Zip Client.
There are all you need :
- WinCache Statistics Script "wincache.php"
- DLL
- docs
Don't forget to test it with mod FASTCGI on IIS or Apache
BTW, running PHP_CompatInfo with PHP 5.3.9 on your source code gave me fake negative.
I should have to fix it especially with code that use namespaces.
Another point:
You should exclude NetBeans project configuration from your repository
Perharps add a .gitignore file with nbproject directory
https://github.com/boenrobot/Cache_SHM/tree/master/nbprojectMy first comments
Laurent Laville
--
PEAR Development Mailing List (
http://pear.php.net/)
To unsubscribe, visit:
http://www.php.net/unsub.php