Professional Web Applications Themes

GD detection? - PHP Development

On Wed, 02 Jul 2003 09:13:53 -0700, RG wrote: > I have built an app that uses GD, only after installing it on a few > different servers, I have run into a little problem. > Is there anyway in PHP to determine which version of GD in running? > If there was, I could automate the task instead of having to alter the code. > > TIA > RG <? phpinfo() ?> -- Jeffrey D. Silverman | jeffrey AT jhu DOT edu Johns Hopkins University | Baltimore, MD Website | [url]http://www.wse.jhu.edu/newtnotes/[/url]...

  1. #1

    Default Re: GD detection?

    On Wed, 02 Jul 2003 09:13:53 -0700, RG wrote:
    > I have built an app that uses GD, only after installing it on a few
    > different servers, I have run into a little problem.
    > Is there anyway in PHP to determine which version of GD in running?
    > If there was, I could automate the task instead of having to alter the code.
    >
    > TIA
    > RG
    <?
    phpinfo()
    ?>

    --
    Jeffrey D. Silverman | jeffrey AT jhu DOT edu
    Johns Hopkins University | Baltimore, MD
    Website | [url]http://www.wse.jhu.edu/newtnotes/[/url]

    Jeffrey Silverman Guest

  2. #2

    Default Re: GD detection?

    "RG" <MeNotTellingYa.com> wrote in message news:<3f029a69$0$45174$65c69314mercury.nildram.ne t>...
    > "RG" <MeNotTellingYa.com> wrote in message
    > news:3f0293b4$0$45168$65c69314mercury.nildram.net ...
    > > I have built an app that uses GD, only after installing it on a few
    > > different servers, I have run into a little problem.
    > > Is there anyway in PHP to determine which version of GD in running?
    > > If there was, I could automate the task instead of having to alter the
    > code.
    > >
    > > TIA
    > > RG
    > >
    >
    >
    >
    > Crisis over, function_exists() is the kiddie :)
    > RG
    function_exists can be misleading with GD functions. If you're running
    GD 1.6.2, function_exists (imagecreatetruecolor) evaluates to true.
    The function does exist, it just says it requires GD 2.0 to do
    anything. :s

    There is a function called gd_info that will give you that
    information, if you're running PHP 4.3.0. However, the best way I've
    found is based on the user contributed notes.

    [url]http://www.php.net/manual/en/function.gd-info.php[/url]

    Basically, to use ob_start to buffer the phpinfo results and then use
    preg_match to hack the version number out of the resulting HTML.
    Paul Liversidge Guest

  3. #3

    Default Re: GD detection?

    "RG" <MeNotTellingYa.com> wrote in message news:<3f029a69$0$45174$65c69314mercury.nildram.ne t>...
    > "RG" <MeNotTellingYa.com> wrote in message
    > news:3f0293b4$0$45168$65c69314mercury.nildram.net ...
    > > I have built an app that uses GD, only after installing it on a few
    > > different servers, I have run into a little problem.
    > > Is there anyway in PHP to determine which version of GD in running?
    > > If there was, I could automate the task instead of having to alter the
    > code.
    > >
    > > TIA
    > > RG
    > >
    >
    >
    >
    > Crisis over, function_exists() is the kiddie :)
    > RG
    function_exists can be misleading with GD functions. If you're running
    GD 1.6.2, function_exists (imagecreatetruecolor) evaluates to true.
    The function does exist, it just says it requires GD 2.0 to do
    anything. :s

    There is a function called gd_info that will give you that
    information, if you're running PHP 4.3.0. However, the best way I've
    found is based on the user contributed notes.

    [url]http://www.php.net/manual/en/function.gd-info.php[/url]

    Basically, to use ob_start to buffer the phpinfo results and then use
    preg_match to hack the version number out of the resulting HTML.
    Paul Liversidge Guest

Similar Threads

  1. collision detection
    By Seph webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 18
    Last Post: May 20th, 09:24 AM
  2. Help with Flash detection
    By jnewc in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: June 2nd, 01:47 PM
  3. IP detection
    By germaris in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 20th, 02:51 PM
  4. Flash Detection Help
    By Adrian Martinez in forum Macromedia Flash
    Replies: 2
    Last Post: January 15th, 10:09 PM
  5. mouse detection
    By speckle webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 1
    Last Post: January 15th, 08:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139