Missing file referred to in /usr/share/php/Image/Canvas/Color.php

Bug #52726 reported by Rog
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-image-canvas (Ubuntu)
Triaged
Low
Unassigned
php-image-graph (Debian)
Fix Released
Unknown

Bug Description

When using the acidbase graphing facility, the php-image-canvas file /usr/share/php/Image/Canvas/Color.php reports a missing file...

---
Warning: require_once(Image/Color.php) [function.require-once]: failed to open stream: No such file or directory in /usr/share/php/Image/Canvas/Color.php on line 33

Fatal error: require_once() [function.require]: Failed opening required 'Image/Color.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/php/Image/Canvas/Color.php on line 33
---

I have verified that this file is not provided as part of this package, and a quick apt-file search didn't turn up a likely candidate for a missing dependancy.

A similiar report of this issue can be found here:
http://pear.php.net/bugs/bug.php?id=6066

This may be the same as debian bug #340730 as mentioned here:
http://lists.alioth.debian.org/pipermail/pkg-php-maint/2005-November/000378.html
, but I can't tell for sure as debian.org seems to down at the moment.

Revision history for this message
Rog (roger-mindsocket) wrote :

My bad, just got in to see the Debian bug and it's the same. I'll try to install from upstream.

Changed in php-image-graph:
status: Unknown → Unconfirmed
Revision history for this message
jbridgej (jbridgej) wrote :

> My bad

No you're not!

A package must ensure it installs all dependencies it requires. The Ubuntu package doesn't, so it's broken.

It's still a bug and needs to be fixed.

Unfortuantely bug fixes aren't Ubuntu's strong point :(

Revision history for this message
jbridgej (jbridgej) wrote :

The only fix for this issue is a new package: php-image-color which contains the single file Image/Color.php

Revision history for this message
David Fokkema (dfokkema) wrote :

Indeed. The following does the trick:

sudo pear install Image_Color

Since this is a dependency of php-image-canvas, I say this should be fixed. And it's not hard! (Easy for me to say, ;-)

Thanks,

David

Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

Do you still have this issue with the latest stable release of Ubuntu ?

Changed in php-image-canvas:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
anonym (launch-mailinator) wrote :

Yes. Dapper is the LTS stable release, and the problem still exists.

Revision history for this message
William Grant (wgrant) wrote :

Dapper is not the latest stable release.

Revision history for this message
anonym (launch-mailinator) wrote :

Dapper is the latest stable LTS release.

jbridgej (jbridgej)
Changed in php-image-canvas:
status: Incomplete → New
Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

Thank you for your bug report. I'm marking this as triaged.

Changed in php-image-canvas:
status: New → Triaged
Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

This dediff should fix the bug.

Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

As someone noticed the php-image-color package doesn't exist yet, Debian seems to be working on it ( there seems to be some issues).

Revision history for this message
Scott Kitterman (kitterman) wrote :

Usubbung UUS since there is no action to perform yet. Please resubcribe once php-image-color is in Ubuntu (check and make sure Debian hasn't fixed it and you can just sync from Debian first).

Revision history for this message
Sebastien CELLES (s-cls) wrote :

This bug is still present in latest release of Ubuntu (8.04) !

Something else seems to be broken because when I try this sample
http://pear.veggerby.dk/samples/show/id/plot_bar/
see "Show php code"
I doesn't work (even if I'm running sudo pear install Image_Color)

I get the following error message (see attachment)

Changed in php-image-graph:
status: New → Fix Released
Revision history for this message
Moloth (moloth) wrote :

Confirmed the bug is still present in Ubuntu (8.04) at at 17th September 2008.

The fix works though: "sudo pear install Image_Color"

Your errors:
1.>Warning: imagettftext() [function.imagettftext]: Could not find/open font in /usr/share/php/Image/Canvas/GD.php on line 1405
2.>Warning: Cannot modify header information - headers already sent by (output started at /var/www/map/graphicstest.php:1) in /usr/share/php/Image/Canvas.php on line 620

The first error means you haven't installed the fonts. Copy your truetype fonts to /usr/share/php/Image/Canvas/Fonts/
e.g verdana.ttf

The second error means you have probably left some space before your <?php start tag so it is sending the space before your image thereby modifying the headers.

---

In Ubuntu (8.04) I still get an error:

Fatal error: Call to undefined function: imageantialias() in
/homepages/33/d92408425/htdocs/PEAR/Image/Canvas/GD.php on line 182

This is apparently a problem with Ubuntu build of GD. Installing GD from source will fix this.
http://pear.php.net/bugs/bug.php?id=8776

I just did what the article says and removed ",'antialias' => 'native' " from the php code.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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