Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 05-20-2005, 05:58 PM GD Error
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
Trades: 1
What is up, this code is from php.net and it wont work
Code:
<?php
// Set the content-type
header("Content-type: image/png");

// Create the image
$im = imagecreate(400, 30);

// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);

// The text to draw
$text = 'Testing...';
// Replace path by your own font path
$font = './dfont.ttf';

// Add some shadow to the text
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);

// Add the text
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);

// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
?>
http://alpha-productions.org/images/make2.php


error:
The image “http://alpha-productions.org/images/make2.php” cannot be displayed, because it contains errors.

please help
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
 
Register now for full access!
Old 05-20-2005, 06:14 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
$font = './dfont.ttf';

Have you got the font in your images folder?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 05-20-2005, 06:16 PM
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
Trades: 1
yea and it still doesnt work
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
Old 05-20-2005, 06:25 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
What version of PHP is this script designed for and what version is install on your server as it is claiming that one of the functions is undefined.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 05-20-2005, 06:34 PM
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
Trades: 1
its not saying its undefined, its has errors, undefined looks like this
Fatal error: Call to undefined function imagettftext().

ok, but gd works on my server, i did it before without the ttf, its like 4.3.0 on server
imagettftext
uses
(PHP 3, PHP 4 , PHP 5)
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
Old 05-20-2005, 06:38 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
Yes, I know what it looks like:

/>
<b>Fatal error</b>: Call to undefined function: imagettftext() in <b>/home/alphapro/public_html/images/make2.php</b> on line <b>19</b><br />
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 05-20-2005, 06:38 PM
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
Trades: 1
<tr><td bgcolor=458DE5 width=25% style="border: 1px solid #000000"><font face=arial size=1 color=white>&nbsp;Spotlight</td>

change the "s to 's
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
Old 05-20-2005, 06:41 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
Does your server have True Type Font supported for PHP?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 05-20-2005, 07:14 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
What a complete Pratt!!

I offer help and this guy adds me to his msn. I tell him to check his php.ini for true type font.

Five minutes later he criticises my website and then tells me I can't bloody spell!!!!

Criticise = English

Criticize = US

Education does not cost much
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

Last edited by Gaffer Sports; 05-20-2005 at 07:17 PM..
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Reply     « Reply to GD Error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36092 seconds with 12 queries