Shoutbox

PHP GD image functions - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: PHP GD image functions (/showthread.php?tid=63688)

PHP GD image functions by ayjay on 07-20-2006 at 07:45 PM

Whenever I save a PHP file in which I'm making an image using the GD image functions, I'm getting the error that the "image contains errors". The same script's been tried by a few other people and works for them so I've come to the conclusion that it's either the way it's being saved or the way it's being uploaded :P
I've tried various editors with every possible setting you could imagine being changed 1 at a time :P and 2 different FTP clients, but still get the same error (apart from when I save it as UTF-8 - when I get a load of random crap :P)

If anyone could just tell me exactly what settings they use to save the PHP files using the GD functions and if any settings need changing in FTP, I'd be very very grateful :P

Danke :D


RE: PHP GD image functions by absorbation on 07-20-2006 at 07:46 PM

What PHP version does your server have? GD functions have a habit for varying alot between versions.


RE: PHP GD image functions by ayjay on 07-20-2006 at 07:47 PM

PHP 5.1.2 and GD 2.1.7, although it's been tested on the same server and works ok.


RE: PHP GD image functions by absorbation on 07-20-2006 at 07:50 PM

I also had troubles with PHP 5 on Dreamhost. I couldn't get alot of things to work as I wanted and so switched back to PHP4. Do you use Dreamhost, if so you can change versions. Also posting the source would help :).


RE: PHP GD image functions by ayjay on 07-20-2006 at 07:53 PM

Well, it's been tested on the EXACT same config and worked fine.
It was also tested with the exact same code and no matter what the code is, it does it anyway :P so it's not worth pasting really.


RE: PHP GD image functions by Eljay on 07-20-2006 at 07:53 PM

posting the error would help 8-)

to see the error either remove the header('Content-type:image/png') or just view-source. :P


RE: PHP GD image functions by ayjay on 07-20-2006 at 08:01 PM

ffs 8-)

about a week I have been messing with this and it now decides to work.


RE: PHP GD image functions by absorbation on 07-20-2006 at 08:02 PM

You probably uploaded the wrong file, I do that from time to time (a).


RE: PHP GD image functions by ayjay on 07-20-2006 at 08:04 PM

quote:
Originally posted by absorbation
You probably uploaded the wrong file, I do that from time to time (a).

Nah, you wouldn't believe how many files were both on my desktop and uploaded while I was trying to get it to work :P
RE: PHP GD image functions by wj on 07-20-2006 at 09:12 PM

Can you post your script?