|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with Random Image...
Hi guys, I'm having trouble with the following code.
Everything works fine if I use only the Imagestring function but not with the Imagettftext function. Are there any special requirements to use the Imagettftext function? Hope you can help. LCP PHP Code:
|
|
#2
|
|||
|
|||
|
Make sure your font file is the in the same directory as your script, or if it isn't, ensure the path in imagettftext() is pointing to the correct location.
|
|
#3
|
|||
|
|||
|
The font file is there but I get the following error:
Fatal error: Call to undefined function: imagettftext() in /home/user/public_html/random_number.php on line 16 Thanks. |
|
#4
|
|||
|
|||
|
PHP Code:
98% of the time that error string means the function is not loaded or the library itself is not loaded. The other 2% of the time the function has been disabled by the host. Lets first make sure you have the library (GD) installed. Run this sniplet -> PHP Code:
See what that returns. It will show your installed libraries and print weather GD is installed or not. If GD is installed - I would call your host and ask them why the function was disabled - if thats the case...
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
|
#5
|
|||
|
|||
|
Thanks for your reply, this is the output.
I'll check to see why it was dissabled. xml wddx standard session posix pcre openssl mysql mhash mcrypt mbstring gd ftp curl ctype calendar bcmath zlib Zend Optimizer apache GD is loaded Thanks. |
|
#6
|
|||
|
|||
|
does the version of GD that you are running support that function?
|
|
#7
|
|||
|
|||
|
Quote:
My apologies, I didn't read what you said close enough. ![]() |
|
#8
|
|||
|
|||
|
Np.
It seems that the problem may be due to the legal issues with .gif creation on the new versions of PHP. If so, ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Help with Random Image... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|