Wrox Programmer Forums
|
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2008, 12:45 PM
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ttpdotcom
Default CH. 7 imagettftext function error

I´ve got this error:
Warning: imagettftext() [function.imagettftext]: Invalid font filename in C:\Apache\htdocs\Chapter7\modifyimage.php on line 47
My code is:
if ($text == 'on') {
   imagettftext($image, 12, 0, 20, 20, 0, "CALIBRI.TTF", $image_caption);
}
This font is installed at the default system folder, C:\windows\Fonts

Is it a PHP problem?

Thanks in advance :)

Education is what remains after one has forgotten everything he learned in school.
 
Old March 13th, 2008, 07:31 PM
Registered User
 
Join Date: Feb 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I loaded font file in my webpage directory. Try making a copy and putting in your Chapter7 subdirectory and see if that works.

 
Old January 29th, 2010, 01:12 PM
Authorized User
 
Join Date: Jan 2010
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default Similar imagettftext problems

I wasn't getting an error whenever I called the imagettftext function. Instead, the text I wanted superimposed on the picture just wouldn't appear until I copied a font file from c:/windows/fonts to the directory with modifyimage.php like Karlos199.

If you take a look at the manual page on the imagettftext function, it tells you how to change where PHP/GD will look for fonts.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
Ch.7 - Autosuggest example - Exception Error Joel Chaney BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 March 27th, 2007 09:35 AM
CH 9 Error manasa BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 February 23rd, 2007 07:01 PM
ch.4 - I do not get the compilation error dad62896 BOOK: Beginning ASP.NET 1.0 2 February 11th, 2005 04:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.