Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

56 users online



Problem - Img functions not working

Problem - Img functions not working

Currently viewing this thread: 1 (0 members and 1 guests)


StickManArmy

StickManArmy

Hawt.
Status: Offline!

Problem - Img functions not working

Alright, so I have this site. A little while ago, we updated the PHP version on the server to 4.4.0.

Somehow, now, I can't create images in PHP anymore. I used to have one before the update which is no longer working. I'm thinking this is something to do with some default configuration value that has changed from version to version? You can view the phpinfo() function here. Are there any values I should pay specific attention to? A page like this won't work:

PHP:

<?php

header
("Content-type: image/png");
$im = @imagecreate(10050)
   or die(
"Cannot Initialize new GD image stream");
$background_color imagecolorallocate($im255255255);
$text_color imagecolorallocate($im2331491);
imagestring($im155,  "A Simple Text String"$text_color);
imagepng($im);
imagedestroy($im);

?>

Anyway, I'm kind of a newbie at these things, so I'd appreciate your help.

___________________

Lockout7 - the Webcomic

Simon

Simon

Jag är Gandalf den grå och den vite, men vem är du?
Status: Offline!

To me, it looks like you don't have the GD library installed. :P

___________________

Neversidian, your staff is broken.

Last edited by Simon, August 26th, 2005 09:56 PM (Edited 1 times)

StickManArmy

StickManArmy

Hawt.
Status: Offline!

GD Library? What is that? o_O

___________________

Lockout7 - the Webcomic

Dachande663

Dachande663

Web Developer & Geek
Status: Offline!

make a file called anything.php and put this in:

PHP:

<?php
php_info
();
?>


Somewhere in there should be a bit about the GD library which handles graphics stuff. If you don't have it (but I think it comes by default) then you won't be able to use those functions (again I think).

___________________

http://www.hybridlogic.co.uk/sig.jpg
http://www.hybridlogic.co.uk/winamp.jpg

BigToach

BigToach

Neversidian
Status: Offline!

if you are on a hosted server, talk to your host and ask if they can enable the GD library on your PHP version. If you arent on a hosted server, google gd2 installation and you shpuld get the info you need.

just a lil extra info. the GD library is the set of functions that actually does the image editing. PHP has just been ported to work along with it to allow you to edit images straight from the php engine.

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

StickManArmy

StickManArmy

Hawt.
Status: Offline!

Alright, thanks for the help, guys.

By the way, Dachande663, I had done that. Read my post again. =P

___________________

Lockout7 - the Webcomic

BigToach

BigToach

Neversidian
Status: Offline!

well according to your phpinfo your gd lib is installed.
see what happens when you do

PHP:

<?php
print_r
(gd_info());
?>

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

Simon

Simon

Jag är Gandalf den grå och den vite, men vem är du?
Status: Offline!
Originally posted by BigToach:

well according to your phpinfo your gd lib is installed.
see what happens when you do

PHP:

<?php
print_r
(gd_info());
?>

I think he just got it installed because I can swear it wasn't there when I looked before. :)

___________________

Neversidian, your staff is broken.

BigToach

BigToach

Neversidian
Status: Offline!

yeah i had the same feeling as well...

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

StickManArmy

StickManArmy

Hawt.
Status: Offline!

Yep, thanks a lot for your help. It's now working. =)

___________________

Lockout7 - the Webcomic

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0085 seconds.