Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 13th, 2008, 12:45 PM
Registered User
 
Join Date: Mar 2008
Location: Blumenau, Santa Catarina, Brazil.
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.
Reply With Quote
  #2 (permalink)  
Old March 13th, 2008, 07:31 PM
Registered User
 
Join Date: Feb 2008
Location: , , .
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.

Reply With Quote
  #3 (permalink)  
Old January 29th, 2010, 12:12 PM
Authorized User
Points: 45, Level: 1
Points: 45, Level: 1 Points: 45, Level: 1 Points: 45, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06:01 PM
ch.4 - I do not get the compilation error dad62896 BOOK: Beginning ASP.NET 1.0 2 February 11th, 2005 03:20 AM



All times are GMT -4. The time now is 02:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.