Re: fix inode/device usage for win32, take #1

[email protected] (Pierre Joye) Sun, 18 Oct 2009 20:57:57 +0200
Newsgroups php.apc.dev
Message-ID <[email protected]>
hi,

The patch seems to be incomplete. The test case from the bug report
fails with apc.stat=3D0, on the 2nd request, with:

Warning: require_once(G:\apps\Apache2\Zend\Application.php)
[function.require-once]: failed to open stream: No such file or
directory in G:\apps\Apache2\htdocs\16860\index.php on line 5

Fatal error: require_once() [function.require]: Failed opening
required 'G:\apps\Apache2\Zend\Application.php'
(include_path=3D'G:/apps/Apache2/htdocs/16860;.') in
G:\apps\Apache2\htdocs\16860\index.php on line 5

Every 1st request works, it only fails for every request after the
very 1st one (entries added).

It does not even try to do a apc_cache_find_slot for this file in the
2nd+ request. I do not know enough about APC at this stage to provide
a quick diagnostic. I can work again on that after 5.3.1RC2 (tomorrow
evening).

Any advices welcome :)

Cheers,

On Sat, Oct 17, 2009 at 8:15 PM, Pierre Joye <[email protected]> wrote:
> hi,
>
> This is a first attempt (draft) to fix the pecl bug #16860
> (http://pecl.php.net/bugs/bug.php?id=3D16860).
>
> Here are the changes I made so far:
>
> - add apc_ino_t and apc_dev_t
> =A0- native ino_t/dev_t on non windows platform
> =A0- unsigned int64 on windows
>
> - use string for the inode and device key (cache info and iterator)
> - device uses now the volume serial number (part of the file information)
> - inode uses now the file id (part of the file information)
> - add zend_file_handle support to apc_cache_make_file_key to avoid (no
> need to open/stat a file already opened)
> =A0- to do: have to add fstat on unix
> =A0- getfileinfofromhandle (stat-like) is used on windows
>
> I have tested it using fcgi and apache 2.2 on windows and everything
> seems to work as it should. However I like to test it further and fix
> any side effects before to apply it. Thomas Peterson also tested it
> using apache and CLI with the test cases provided in the report.
>
> Comments and suggestions welcome :)
>
> Cheers,
> --
> Pierre
>
> http://blog.thepimp.net | http://www.libgd.org
>



--=20
Pierre

http://blog.thepimp.net | http://www.libgd.org