View previous topic :: View next topic |
Author |
Message |
Trix -
Joined: 03 Apr 2003 Posts: 33
|
Posted: Sat Dec 06, 2003 12:12 am Post subject: Please Read |
|
|
i have this file and what it dows is generate a calendar type thing but whenevr i try to run it it asks me to download the file i have php installed and im 100% SURE because it runs other php scripts FINE! but like i said when i try to run this one it asks me to download .php file i have tried on 2 servers (abyss aPache) remotly and localy this is the script:
Code: | <?php
header("Content-type: image/jpg");
$im = ImageCreateFromJpeg("cal.jpg");
$white = imagecolorallocate($im, 255,255,255);
$black = imagecolorallocate($im, 0,0,0);
$month = date("M");
$day = date("j");
$time = date("h:i:s A");
imagettftext($im, 12, 0, 16, 44, $white, "fonts/ariblk.ttf",
"$month");
imagettftext($im, 25, 0, 36, 77, $black, "fonts/ariblk.ttf",
"$day");
imagettftext($im, 10, 0, 14, 93, $black, "fonts/ariblk.ttf",
"$time");
// imagepng($im);
imagejpeg($im,'',50);
imagedestroy($im);
?> |
i have gd enabled and all the paths r correct but it still doesnt work please help me! |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Dec 06, 2003 4:17 am Post subject: |
|
|
Is this supposed to be link to as a image.
<img src="calender.php?">
How do u run this script because I cannot test it
without knowing how to use it , I have GD installed
and I would like to help you. 8) |
|
Back to top |
|
 |
Trix -
Joined: 03 Apr 2003 Posts: 33
|
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Dec 07, 2003 7:34 pm Post subject: |
|
|
Trix,
We suggest that you write the full path of the font instead of only fonts/ariblk.ttf . _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
Trix -
Joined: 03 Apr 2003 Posts: 33
|
Posted: Sun Dec 07, 2003 9:44 pm Post subject: |
|
|
Hey thnx for the help guys but i have ttryed that alreadys and it still doesnt work :'( |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Dec 08, 2003 4:32 am Post subject: |
|
|
Trix,
It may be interesting to check the documentation of imagettftext in http://www.php.net (and especially the user contributed notes). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
Trix -
Joined: 03 Apr 2003 Posts: 33
|
Posted: Mon Dec 08, 2003 8:52 am Post subject: |
|
|
my m8 has it working its just that his one is on a apache linux box and i tryed it on there and for some reason it still asked me to onload the code but now it doesnt do that it just displays ca.jpg with no differences |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Dec 08, 2003 8:54 am Post subject: |
|
|
Trix , please tell me how to set this up
im offering you help 8) |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Dec 08, 2003 8:42 pm Post subject: |
|
|
Trix,
The issue is not with the web server. It is with your PHP installation. GD library is known to use other libraries such as FreeType. This may be the cause of the problem. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
Trix -
Joined: 03 Apr 2003 Posts: 33
|
Posted: Tue Dec 09, 2003 8:46 am Post subject: |
|
|
howdo i instal;l free type and all other libraries that gd2 mite ever call on? |
|
Back to top |
|
 |
|