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

Bug #52726 reported by Rog on 2006-07-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-image-canvas (Ubuntu)
php-image-graph (Debian)
Fix Released

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:

This may be the same as debian bug #340730 as mentioned here:
, but I can't tell for sure as debian.org seems to down at the moment.

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
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 :(

jbridgej (jbridgej) wrote :

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

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, ;-)



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

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

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

William Grant (wgrant) wrote :

Dapper is not the latest stable release.

anonym (launch-mailinator) wrote :

Dapper is the latest stable LTS release.

jbridgej (jbridgej) on 2007-07-17
Changed in php-image-canvas:
status: Incomplete → New

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

Changed in php-image-canvas:
status: New → Triaged

This dediff should fix the bug.

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).

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).

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
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
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.

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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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