addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-crosscrosseditemptyheartfacebookfolderfullheartglobegmailgoogleimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartrashtriangle-downtriangle-uptwitteruseryahoo

RE: [baltimorephp] Errors using imagecreate

From: Joe T.
Sent on: Monday, April 23, 2012 6:47 PM
Unfortunately I got just a blank.  Not even line noise.  And yeah I already had no extra whitespaces after the last ?> tag.

Date: Mon, 23 Apr[masked]:07:58 -0700
From: [address removed]
Subject: Re: [baltimorephp] Errors using imagecreate
To: [address removed]

Comment out the header line and see what is being output.  It should be a bunch of line noise, but that way you can see if any text is being inadvertently being displayed.  A php error/warning/notice is the usual cause of this result.  Knowing the errors will help you troubleshoot.  Also make sure there isn't any whitespace after the ?> tag (or just omit it from the file entirely).

From: Joe Tseng <[address removed]>
To: [address removed]
Sent: Monday, April 23, 2012 10:52 AM
Subject: [baltimorephp] Errors using imagecreate
I recently migrated some apps to a new Solaris server and I'm getting some errors back with some graphics-related calls.  Just as a test I inserted a small test script:

    header('Content-type: image/png');
    $myImage = imagecreate(200, 100);
    $myGray = imagecolorallocate($myImage, 204, 204, 204);
    $myBlack = imagecolorallocate($myImage, 0, 0, 0);
    imageline($myImage, 15, 35, 120, 60, $myBlack);


And I got the following message:

The image "..." cannot be displayed because it contains errors.

My PHP instance was compiled from source per a request from our server group.  My makefile was created using the following flags:

'./configure' '--prefix=/export/appl/pkgs/php/v5.3.9' '--with-apxs2=/export/appl/pkgs/httpd/latest/bin/apxs' '--with-mysql=/export/appl/pkgs/mysql/latest' '--with-mysqli=/export/appl/pkgs/mysql/latest/bin/mysql_config' '--with-gd=/export/appl/pkgs/libgd/latest' '--with-pear' '--with-png-dir=/export/appl/pkgs/libpng/latest' '--with-jpeg-dir=/export/appl/pkgs/jpeg/latest' '--with-curl=/export/appl/pkgs/curl/latest' '--with-freetype-dir=/export/appl/pkgs/freetype/latest' '--with-mhash=/export/appl/pkgs/mhash/latest' '--with-mcrypt=/export/appl/pkgs/libmcrypt/latest' '--enable-pcntl' '--enable-soap' '--enable-mbstring' '--with-zlib-dir=/export/appl/zlib/v1.2.5' '--with-ldap'

I don't think any sort of error msg would be visible in the Apache error or access log.  Am I missing anything in my script or my compile command?


- Joe

If you type "Google" into Google, you can break the Internet.  -- Jen Barber

Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Joe Tseng ([address removed]) from Baltimore PHP.
To learn more about Joe Tseng, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy