Smarty in php.ini Include

Bug #44404 reported by Greg Taylor
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
smarty (Debian)
Fix Released
Unknown
smarty (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: smarty

Upon installing the latest Smarty package with the standard PHP5/MySQL5 that come with Dapper, I found that I had to manually add the /usr/share/php/smarty directory to my php.ini. It'd be really nice if it automatically did this for you so you don't have less experienced admins puzzling over why it finished the setup with PEAR but didn't add the smarty dir to the include path.

Revision history for this message
In , dim (dim-tapoueh) wrote : wontfix #290176 (debian policy)

# http://www.debian.org/doc/debian-policy/ch-files.html#s10.7.4
# The maintainer scripts must not alter a conffile of any package,
# including the one the scripts belong to.
tags 290176 +wontfix

thank
--
Dimitri.
http://dim.tapoueh.org

« Bon, puisque tout le monde a oublié son maillot, voilà ce que je vous
propose... »
 -- Moïse

Revision history for this message
Greg Taylor (gtaylor) wrote :

Binary package hint: smarty

Upon installing the latest Smarty package with the standard PHP5/MySQL5 that come with Dapper, I found that I had to manually add the /usr/share/php/smarty directory to my php.ini. It'd be really nice if it automatically did this for you so you don't have less experienced admins puzzling over why it finished the setup with PEAR but didn't add the smarty dir to the include path.

Revision history for this message
Barry deFreese (bddebian) wrote :

I'm not sure of the benefit of running Krusader under Gnome but I have uploaded a fix for this. Thank you.

Changed in smarty:
status: Unconfirmed → Fix Committed
Revision history for this message
Barry deFreese (bddebian) wrote :

Ack, sorry, wrong bug, ignore previous comment.

Changed in smarty:
status: Fix Committed → Unconfirmed
Changed in smarty:
status: Unknown → Confirmed
Revision history for this message
Emmet Hikory (persia) wrote :

I'm rejecting this bug, as it's marked wontfix in Debian, with the a note that smarty shouldn't modify php.ini directly, as it is a conffile. It may be possible to do something with /etc/php5/conf.d/: please reopen the bug if a solution along those lines is prepared. Please note that using "require("smarty/Smarty.class.php");" in your code should accomplish the goal.

Changed in smarty:
status: Unconfirmed → Rejected
Changed in smarty:
status: Confirmed → Won't Fix
Revision history for this message
Chet Gray (chetgray) wrote :

I'm using a separate ini file in /etc/php5/conf.d/ to accomplish this.

/etc/php5/conf.d/smarty.ini:
[Smarty]
include_path = ${include_path} ":/usr/share/php/Smarty"

That's all.

Of course, the ${variable} syntax in PHP configuration files has apparently only been possible since PHP 5.1.0 (see http://us.php.net/manual/en/configuration.php), and the smarty package says it's fine with php4.

Revision history for this message
Chet Gray (chetgray) wrote :

I'm reopening as confirmed.

We could have smarty put a config file in the php conf.d as I described in my previous comment;

Changed in smarty:
status: Invalid → Confirmed
Revision history for this message
Chet Gray (chetgray) wrote :

I've just realized that my fix only works if include_path has already been set in php.ini. It seems that if include_path has not been explicitly set before conf.d/smarty.ini is included it causes a segfault.

Revision history for this message
Olivier Berger (olivierberger) wrote :

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=497453 for my report on the include_path initialisation / concatenation segfault problem.

Revision history for this message
In , Olivier Berger (olivierberger) wrote :

# There's a smarter way to do that
tags 290176 - wontfix
thanks

As explained in companion ticket in Ubuntu (https://bugs.launchpad.net/ubuntu/+source/smarty/+bug/44404) there's a simple way to do so by adding a .ini file in the conf.d dir of PHP5 (at least starting with PHP5.1, I think).

Still it won't be possible though until bug #497453 is fixed.

Hope this helps.

P.S.: wasn't tested for Samrty but for Zend framework (see https://bugs.launchpad.net/ubuntu/+source/zend-framework/+bug/220719).

Best regards,

On Wed, Apr 13, 2005 at 03:38:52PM +0200, Dimitri Fontaine wrote:
> # http://www.debian.org/doc/debian-policy/ch-files.html#s10.7.4
> # The maintainer scripts must not alter a conffile of any package,
> # including the one the scripts belong to.
> tags 290176 +wontfix
>
> thank
> --
> Dimitri.
> http://dim.tapoueh.org
>
> « Bon, puisque tout le monde a oublié son maillot, voilà ce que je vous
> propose... »
> -- Moïse
>
>

Changed in smarty:
status: Won't Fix → New
Kees Cook (kees)
Changed in smarty (Ubuntu):
importance: Medium → Wishlist
Changed in smarty (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.