Results 1 to 5 of 5

Thread: imagettfbbox(): Invalid font filename

  1. #1
    Join Date
    Aug 2011
    Posts
    6

    Default imagettfbbox(): Invalid font filename

    Hi,

    I just downloaded the newest development version of the phoronix test suite. I am using gentoo and php is installed with those USE flags:
    Code:
    dev-lang/php-5.3.8  USE="bzip2 cli crypt ctype curl fileinfo filter gd gdbm hash iconv ipv6 json nls pcntl phar posix readline session simplexml sockets ssl threads tokenizer truetype unicode xml zip zlib (-adabas) -apache2 -bcmath -berkdb (-birdstep) -calendar -cdb -cgi -cjk -curlwrappers -db2 (-dbmaker) -debug -doc -embed (-empress) (-empress-bcs) -enchant (-esoob) -exif -firebird -flatfile -fpm (-frontbase) -ftp -gd-external -gmp -imap -inifile -interbase -intl -iodbc -kerberos -kolab -ldap -ldap-sasl -libedit -mhash -mssql -mysql -mysqli -mysqlnd -oci8 -oci8-instant-client -odbc -pdo -pic -postgres -qdbm -recode -sapdb -sharedext -sharedmem -snmp -soap (-solid) -spell -sqlite -sqlite3 -suhosin (-sybase-ct) -sysvipc -tidy -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl"
    The test suite has problems when generating the graphs:
    Code:
    PHP Warning:  imagettfbbox(): Invalid font filename in /local/phoronix-test-suite/pts-core/objects/bilde_renderer/bilde_renderer.php on line 324
    
    Warning: imagettfbbox(): Invalid font filename in /local/phoronix-test-suite/pts-core/objects/bilde_renderer/bilde_renderer.php on line 324
    PHP Warning:  imagettfbbox(): Invalid font filename in /local/phoronix-test-suite/pts-core/objects/bilde_renderer/bilde_renderer.php on line 324
    
    Warning: imagettfbbox(): Invalid font filename in /local/phoronix-test-suite/pts-core/objects/bilde_renderer/bilde_renderer.php on line 324
    PHP Warning:  imagettfbbox(): Invalid font filename in /local/phoronix-test-suite/pts-core/objects/bilde_renderer/bilde_renderer.php on line 324
    I think the results of those warnings are texts that are half out of the image. The tables aren't readable.

    Does anyone know the solution?

  2. #2

    Default

    To your pts-core/objects/bilde_renderer/bilde_renderer.php, right before line 324 add:

    Code:
                echo PHP_EOL . 'font type: ' . $font_type . PHP_EOL;
    and post the output. Gentoo might be doing something weird or not letting PHP access the TTF fonts.

    Do you know if previous versions worked?

  3. #3
    Join Date
    Aug 2011
    Posts
    6

    Default

    font type: DejaVuSans.ttf

    I also searched for the font, it does exist: /usr/share/fonts/dejavu/DejaVuSans.ttf

    No I never tried previous versions.

  4. #4

    Default

    Look in the other threads or the included documentation about Gentoo... It might be hitting an open basedir problem. You need to adjust your php.ini file, I'm thinking that's the problem you're hitting.

  5. #5
    Join Date
    Aug 2011
    Posts
    6

    Default

    thanks for your help, I didn't find anything that helped so I just hardcoded the complete path, which works here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •