Jump to content

[SOLVED] image does not show up on one host


dsaba

Recommended Posts

i am using two different free webhosts, and I use the same code to create my image

 

one one host it works, and I see the created image

on the other host it DOES NOT WORK and the image does not show up

 

THE WORKING HOST

---------------------------------

PHP Version 4.4.2

 

Configure Command  './configure' '--prefix=/usr/local/php4' '--enable-discard-path' '--enable-memory-limit' '--enable-inline-optimization' '--disable-rpath' '--disable-debug' '--with-layout=GNU' '--with-zlib' '--enable-bcmath' '--with-openssl=/usr' '--enable-calendar' '--with-bz2' '--with-zip=/usr' '--with-pcre-regex=/usr' '--with-db4' '--enable-dbx' '--with-gd=/usr/' '--with-gettext' '--enable-mbstring' '--with-regex=php' '--with-mysql=/usr/' '--with-pgsql=/usr/' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--with-expat-dir=/usr' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--enable-ctype' '--with-iconv' '--enable-exif' '--enable-filepro' '--enable-shmop' '--enable-sockets' '--with-xmlrpc' '--with-curl' '--with-pic' 

 

gd

GD Support  enabled 

GD Version  2.0 or higher 

GIF Read Support  enabled 

GIF Create Support  enabled 

JPG Support  enabled 

PNG Support  enabled 

WBMP Support  enabled 

 

 

 

 

 

 

 

THE HOST THAT DOESN'T DISPLAY THE IMAGES

------------------------------------------------

PHP Version 4.3.9

 

Configure Command  './configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd=shared' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-ncurses=shared' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-xml' '--with-expat-dir=/usr' '--with-dom=shared,/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-xmlrpc=shared' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mbstring=shared' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mime-magic=/usr/share/file/magic.mime' '--with-apxs2=/usr/sbin/apxs' 

 

gd

GD Support  enabled 

GD Version  bundled (2.0.28 compatible) 

FreeType Support  enabled 

FreeType Linkage  with freetype 

GIF Read Support  enabled 

GIF Create Support  enabled 

JPG Support  enabled 

PNG Support  enabled 

WBMP Support  enabled 

XBM Support  enabled 

 

-------------------------------------------------------------------------------

 

here is the code I use to create the image:

/* set up image, the first number is the width and the second is the height*/
$im = ImageCreate(60, 20); 

/*creates two variables to store color*/
$white = ImageColorAllocate($im, 255, 255, 255);
$black = ImageColorAllocate($im, 0, 0, 0);

/*random string generator.*/
/*The seed for the random number*/
srand((double)microtime()*1000000); 

/*Runs the string through the md5 function*/
$string = md5(rand(0,9999)); 

/*creates the new string. */
$new_string = substr($string, 17, 5);
$_SESSION['new_string'] = $new_string;

/*fill image with black*/
ImageFill($im, 0, 0, $black);

/*writes string */
ImageString($im, 4, 9, 3, $new_string, $white);

/* output to browser*/
Imagejpeg($im, "verify.jpeg");
ImageDestroy($im); 

 

 

 

-------------------------------------------------------------------

SO MY QUESTION IS:

Why does it display the image and work on the first host, and not the other one?

I pasted relevant gd information in hopes that someone can tell me why it doesn't work with the other host.

 

-thank u

 

you say I should "check" my host on my own

 

thats the problem i do not know what to "check" for, what i assumed to check for was what i listed above, php information and everything related to gd that I could find

 

that is why i posted it, because I did not see anything amiss that might be obvious to other people

so if any of you DO SEE something that explains why the image does not work in one host, based on the information i supplied, then please say so

 

i do not expect you to know without given information, i gave you the information in hopes that you can spot something, if you can't, then something else is seriously wrong with the host, that I may need to email him

Just go ahead and email them before you go to forums asking for help, you should be able to find out your solutions that way a lot better than through here. Explain to them your problem and what you are trying to do. They may simply tell you it is not possible through them. Good luck.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.