Description of problem:
There are several php packages, such as Smarty, which currently installs their
files in /usr/share/, and to include these classes in your php program you have
to actually type out the entire file path.
PHP should just include /usr/share/php in the include path. Then packages such
as Smarty can simply install their classes in /usr/share/php/Smarty instead of
This will allow a programmer to use include_once 'Smarty/foo.php'; instead of
the full path name.
Smarty is not the only example, this issue was brought up from a package of
another php package who was wondering how to have his php class added to the
This technique is used on other distros with more PHP experience than Fedora.
The default compiled-in include_path is set to:
is that not working?
No, other non-pear php classes currently just install their stuff in /usr/share
and expect end users to modify the include path or else type all the full path
name to a class when including it in php.
By adding /usr/share/php to the default php include path, a package such as
php-Smarty can then simply install the php class files in the
/usr/share/php/Smarty directory instead of the /usr/share/Smarty directory as it
Then with the new include_path set in place, the user can have in their php files:
include 'foo/foo.php' instead of include '/usr/share/foo/foo.php';
This will be discussed in today's Fedora packaging committee meeting. See also:
The meeting today will decide if this is to be added to the packging guidelines
for non-pear php classes such as php-Smarty.
Oh, sorry, php-vs-pear, my mistake.
This seems like a good idea; php (actually php-common) would also have to
package the directory of course. If this is agreed by the packaging committee
I'll do it.
09:04:08 spot | First item:
09:04:09 >> OpenURL 1
09:04:09 spot |
09:04:32 f13 | I'm here, just beating on the test1 RC tree
09:04:49 spot | Basically, if you put your php Class files in
/usr/share/php, it makes life much simpler for users.
09:05:13 spot | The proposal is that we mandate this as part of the
09:05:51 XulChris | this is for non-pear php classes, pear classes still
go under /usr/share/pear
09:05:57 f13 | seems to make sense. Are there any Core packages
that don't follow this?
09:06:15 spot | f13: looks like php doesn't
09:06:23 XulChris | f13: php package needs to add /usr/share/php to the
09:06:47 f13 | so lets get the php maintainer to put in his input
09:07:03 tibbs | Is php-Smarty in core?
09:07:10 XulChris | Smarty is in extras
09:08:28 tibbs | Poor Joe; we keep coming up with new PHP changes.
09:09:24 spot | is joe back in the office?
09:09:42 f13 | not sure
09:09:46 XulChris | i think this was discussed a long time ago when we
were doing the pear guidelines, but im not sure what became of it, i think it
got lost in
09:09:59 XulChris | joe just replied to the bugzilla entry 5 minutes ago
09:10:21 tibbs | We were waiting on some other PHP-related decision as
09:10:46 spot | Perhaps when joe adds it to the php package, we can
amend the guidelines.
09:11:04 XulChris | response from joe:
09:11:06 XulChris | This seems like a good idea; php (actually php-common)
would also have to
09:11:06 XulChris | package the directory of course. If this is agreed by
the packaging committee
09:11:07 XulChris | I'll do it.
09:11:37 XulChris |
09:11:39 f13 | ok, great.
09:11:56 spot | ok, lets vote on the addition then
09:11:58 tibbs | Yes, if he's happy then I'm happy; this makes quite
09:12:01 spot | +1
09:12:02 tibbs | +1
09:12:03 abadger1999 | +1
09:12:43 * spot looks around
09:12:50 f13 | +1
09:13:16 racor | +1
09:13:27 spot | ok, thats 5. it passes, i'll write it up.
09:13:38 XulChris | thanks guys
Cool, timing on this couldn't have been more perfect. Above is logs from
meeting which just happened. :)
This is done for Raw Hide, php-5.2.0-9. Leaving this open so it gets done for
an FC6 update too.
The FC6 update just shipped does add /usr/share/php to the default include path
but didn't package /usr/share/php; leaving this open.
Fixed in -3.5.fc6; thanks for suggestion.