Hi,
/usr/share/php is provided by PHP and included in include_dir defaut value.
So this seems a good place to store "class" file.
But I think we need a Guidelines
1/ to not allow direct use of /usr/share/php
=> use a sub-folder
Ex : - php-oauth use /usr/share/php/oauth => ok - php-xmpphp use /usr/share/php/xmpphp => ok
See reviews : - php-hkit Review https://bugzilla.redhat.com/show_bug.cgi?id=505358 approved but use /usr/share/php
- php-PHPMailer Review pending https://bugzilla.redhat.com/show_bug.cgi?id=505356
- php-captchaphp Review pending https://bugzilla.redhat.com/show_bug.cgi?id=505354
2/ to not allow install for Web application
A web application must install under /usr/share/<appname>
php-laconica seems to be a web-app installed under /usr/share/php
Comments before I propose a draft ?
Regards
On 19/06/09 06:51, Remi Collet wrote:
Hi,
/usr/share/php is provided by PHP and included in include_dir defaut value.
So this seems a good place to store "class" file.
But I think we need a Guidelines
1/ to not allow direct use of /usr/share/php
=> use a sub-folder
Ex :
- php-oauth use /usr/share/php/oauth => ok
- php-xmpphp use /usr/share/php/xmpphp => ok
See reviews :
- php-hkit
Review https://bugzilla.redhat.com/show_bug.cgi?id=505358 approved but use /usr/share/php
- php-PHPMailer
Review pending https://bugzilla.redhat.com/show_bug.cgi?id=505356
- php-captchaphp
Review pending https://bugzilla.redhat.com/show_bug.cgi?id=505354
2/ to not allow install for Web application
A web application must install under /usr/share/<appname>
php-laconica seems to be a web-app installed under /usr/share/php
Comments before I propose a draft ?
Agreed on both points.
Also take SELinux considerations into account; a similar thread got started on fedora-devel-list recently:
https://www.redhat.com/archives/fedora-devel-list/2009-June/msg01350.html
Paul.
On 06/18/2009 10:51 PM, Remi Collet wrote:
Hi,
/usr/share/php is provided by PHP and included in include_dir defaut value.
So this seems a good place to store "class" file.
But I think we need a Guidelines
1/ to not allow direct use of /usr/share/php
=> use a sub-folder
Ex :
- php-oauth use /usr/share/php/oauth => ok
- php-xmpphp use /usr/share/php/xmpphp => ok
See reviews :
- php-hkit
Review https://bugzilla.redhat.com/show_bug.cgi?id=505358 approved but use /usr/share/php
- php-PHPMailer
Review pending https://bugzilla.redhat.com/show_bug.cgi?id=505356
- php-captchaphp
Review pending https://bugzilla.redhat.com/show_bug.cgi?id=505354
This seems straightforward. Not knowing anything about how php discovers modules, how are the subfolders within /usr/share/php recognized? Would people have to modify the include_dir path or patch code or rename files to make this work?
2/ to not allow install for Web application
A web application must install under /usr/share/<appname>
php-laconica seems to be a web-app installed under /usr/share/php
Should we just add the prohibition on using /usr/share/php to the existing web application Guidelines? And maybe link from the php Guidelines to the Web Application Guidelines prominently?
Also, do any php web applications have general use as a library for others to use? Do php plugins need to be able to include pieces of the web application and that would be best done by using /usr/share/php ? Giving alternatives if php applications need to be fixed to not do this would be good.
-Toshio
Le 19/06/2009 17:01, Toshio Kuratomi a écrit :
1/ to not allow direct use of /usr/share/php
This seems straightforward. Not knowing anything about how php discovers modules, how are the subfolders within /usr/share/php recognized?
PHP only search in /usr/share/php, not in subfolder. But of course using include "foo/bar.php" works (getting /usr/share/php/foo/bar.php)
Would people have to modify the include_dir path or patch code or rename files to make this work?
modify include_dir is sometime used, but I don't think it's the best solution as some installation don't allow it (need apache AllowOverides)
Generally, web apps used bundled libraries, so patch is required in all case. But this is generally quite trivial.
2/ to not allow install for Web application
A web application must install under /usr/share/<appname>
php-laconica seems to be a web-app installed under /usr/share/php
Should we just add the prohibition on using /usr/share/php to the existing web application Guidelines?
A prohibition for the "pages". But seems ok to use /usr/share/php/foo for a library, but mainly if this could be shared among apps.
And maybe link from the php Guidelines to the Web Application Guidelines prominently?
Yes, and even the reverse (both links).
Also, do any php web applications have general use as a library for others to use?
I don't think. When this exists, I think library is distributed separately (p.e. ezPublish use ezComponents)
Do php plugins need to be able to include pieces of the web application and that would be best done by using /usr/share/php ?
I can't find a example for this.
Remi.
Giving alternatives if php applications need to be fixed to not do this would be good.
-Toshio
-- Fedora-packaging mailing list Fedora-packaging@redhat.com https://www.redhat.com/mailman/listinfo/fedora-packaging
packaging@lists.fedoraproject.org