kieranbarnes Independent PHP, WordPress & CubeCart Programmer

Yellow text?

Posted on June 25, 2007

I stumbled over a strange bug on two systems the other day where the imagettftext() function was always writing the text in yellow. No matter how I set the colour, imagecolorallocate($image, 0, 0, 0);, I would always get yellow. Why yellow?

Both systems are Ubuntu, I don't know if it is a mix up on the libraries from the package, or indeed PHP.

I had to recompile PHP ignoring the --with-ttf option which most docs suggest, and just use the --with-freetype-dir instead. Problem solved.


Related posts

  1. Find text within files
    Stuck trying to find text within files on Linux? cd /directory_tree_you_want_to_search find . -type f...
  2. Change “Howdy” text in WordPress admin
    The "Howdy admin" text can some times come across a little unprofessional in some WordPress...
  3. Detecting yum problems early
    Sometimes, yum freaks out. You might get your installation interrupted or some crazy happening which...
  4. PEAR – Text_Spell_Audio Package
    I've just noticed a new(-ish) package on PEAR, called Text_Spell_Audio. It generates sound clips speaking...
  5. “sh: -t: command not found” with PHP cron/command line
    Are you getting "sh: -t: command not found" when running a PHP from cron or...

Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.