Current location: Hot Scripts Forums » Programming Languages » PHP » How to test if the GD Library is working?


How to test if the GD Library is working?

Reply
  #1 (permalink)  
Old 12-30-03, 12:29 PM
PedstersPlanet PedstersPlanet is offline
New Member
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
How to test if the GD Library is working?

Has anyone a script to test if the library is working? like i can upload an example photo.

My linux server has this library installed and enabled, but the script I installed will not work with GD Support. If I turn it off in the admin script, photo's display ok.... but if I turn it on, the dreaded ''red-cross instead of photo syndrome'' appears...

My PHP is vertsion 4, and the GD is version 1.6.2.

I would be grateful if anyone can assist.
Reply With Quote
  #2 (permalink)  
Old 12-31-03, 06:28 AM
Stefan's Avatar
Stefan Stefan is offline
Junior Code Guru
 
Join Date: Jun 2003
Location: Utrecht, The Netherlands
Posts: 599
Thanks: 0
Thanked 0 Times in 0 Posts
have you checked if that script has it's own support as to why this could happen?

it might also be a rights problem maybe? that the files can't be written by the webserver?
Reply With Quote
  #3 (permalink)  
Old 12-31-03, 07:29 AM
TemplatesForAll TemplatesForAll is offline
Newbie Coder
 
Join Date: Aug 2003
Location: Tucson, Arizona
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by PedstersPlanet
Has anyone a script to test if the library is working? like i can upload an example photo.

My linux server has this library installed and enabled, but the script I installed will not work with GD Support. If I turn it off in the admin script, photo's display ok.... but if I turn it on, the dreaded ''red-cross instead of photo syndrome'' appears...

My PHP is vertsion 4, and the GD is version 1.6.2.

I would be grateful if anyone can assist.
are you using something like <img src="dynamic.php"> if so check to make sure you have no white spaces before the <? or after the ?> most times it causes errors. If you want to check to see if GD is working try
Code:
<? phpinfo(); ?>
or this code I wrote:
Code:
<?php 
 $array = gd_info(); 
 foreach($array as $key => $value){ 
 if ($value == 1){ 
 $value = "yes"; 
 } elseif ($value == ""){ 
 $value = "no"; 
 } 
 echo "<b><i>$key:</i></b> $value\n<br />\n"; 
 } 
 ?>
Hope that helps dude.
__________________
-Scott
Templates For All - Free website templates.
FastBanner - Free PHP banner generator for your website.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP not working in IIS5 on WinXP Pro cistate ASP 5 06-18-04 02:31 PM
The same preg_match_all not working on all servers xgab PHP 2 12-19-03 12:26 PM
Line breaks not working mdhall PHP 6 11-28-03 12:12 PM
If/else statement working...but not working mdhall PHP 13 10-16-03 08:47 AM
Quiz test mail certificate mjackson Script Requests 0 08-26-03 09:39 AM


All times are GMT -5. The time now is 07:49 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.