addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupsimageimagesinstagramlinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1outlookpersonJoin Group on CardStartprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

RE: [baltimorephp] Errors using imagecreate

From: Joe T.
Sent on: Monday, April 23, 2012 4:36 PM

How would I check gd is working?  Would I do this in PHP?  If so, wouldn't my test script verify that it's not working?  Can I somehow use gd directly?

From: [address removed]
Date: Mon, 23 Apr[masked]:00:02 -0400
Subject: Re: [baltimorephp] Errors using imagecreate
To: [address removed]

Hi Joe,

Don't know if this will help, but:
- I tested your script on my server, and it works, so it may come from another place
- have you checked with phpinfo that gd is working ok with png enabled?

Have a good day,

On Mon, Apr 23, 2012 at 10:52 AM, Joe Tseng <[address removed]> wrote:
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