Re: [PECL-DEV] New chmlib PHP binding

[email protected] ("Gustavo Lopes")
Newsgroups php.pecl.dev
Organization Núcleo de Eng. Biomédica do IST
Message-ID <[email protected]>
On Sat, 14 Aug 2010 14:55:52 +0100, Jesús Espino <[email protected]>  
wrote:

> Thanks.
>
> I think i follow all your suggestions, I have pushed the changes to
> the repository, any other suggestion??

I've noticed you open the file directly, without obeying

1) open_basedir/safe mode restrictions
2) the virtual current directory

If the library you're wrapping supports receiving FILE* pointer, you can  
open the file with PHP's stream functions and cast the stream to FILE*.
If it only accepts paths, you must do the checks and expand the path  
yourself. See e.g. here:

http://lxr.php.net/opengrok/xref/PECL/rar/rararch.c#523

>
> What is the next step to put it in the PECL repository??
>

See here: http://pecl.php.net/account-request.php

-- 
Gustavo Lopes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.