compile php 4.3.3 with gd

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kecebong

    compile php 4.3.3 with gd

    I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show
    in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver.

  • John Downey

    #2
    Re: compile php 4.3.3 with gd

    kecebong wrote:
    [color=blue]
    > I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show
    > in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver.
    >[/color]
    From PHP 4.3.0 GD2 is built in and I believe on by default so try
    compiling without worrying about GD and it may not show up but try to
    use functions and they will probably work.

    --
    John Downey




    Comment

    • kecebong

      #3
      Re: compile php 4.3.3 with gd

      John Downey wrote:[color=blue]
      > kecebong wrote:
      >[color=green]
      >> I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt
      >> show in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver.
      >>[/color]
      > From PHP 4.3.0 GD2 is built in and I believe on by default so try
      > compiling without worrying about GD and it may not show up but try to
      > use functions and they will probably work.
      >[/color]
      it still does not work, I used gd_info() function and nothing came up.
      and then I tried to change my php.ini (overwrite it)and now there's an
      error message, how can I restore my php.ini?

      Comment

      • John Downey

        #4
        Re: compile php 4.3.3 with gd

        kecebong wrote:[color=blue]
        > it still does not work, I used gd_info() function and nothing came up.
        > and then I tried to change my php.ini (overwrite it)and now there's an
        > error message, how can I restore my php.ini?
        >[/color]
        PHP has its php.ini-dist and php.ini-recommended in the folder you
        uncompressed it to. As for the compilation try configuring using
        --with-gd2 and don't specify a path that should use the bundled version.

        --
        John Downey




        Comment

        • Randell D.

          #5
          Re: compile php 4.3.3 with gd


          "kecebong" <cebong@plungky .com> wrote in message
          news:avsmb.3421 6$Rd4.18244@fed 1read07...[color=blue]
          > I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show
          > in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver.
          >[/color]

          What are your "configure" arguements?

          I have PHP configured on Apache 1.3.28 - When I compiled PHP I used the
          following:

          ../configure --with-mysql \
          --with-apache=$src/apache \
          --with-mcrypt \
          --with-jpeg-dir \
          --enable-exif \
          --with-zlib-dir \
          --with-gd \
          --with-ttf \
          --enable-gd-native-ttf \
          --with-freetype-dir \
          --with-mime-magic \
          --disable-session \
          --disable-cgi



          Comment

          • kecebong

            #6
            Re: compile php 4.3.3 with gd

            Randell D. wrote:[color=blue]
            > "kecebong" <cebong@plungky .com> wrote in message
            > news:avsmb.3421 6$Rd4.18244@fed 1read07...
            >[color=green]
            >>I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show
            >>in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver.
            >>[/color]
            >
            >
            > What are your "configure" arguements?
            >
            > I have PHP configured on Apache 1.3.28 - When I compiled PHP I used the
            > following:
            >
            > ./configure --with-mysql \
            > --with-apache=$src/apache \
            > --with-mcrypt \
            > --with-jpeg-dir \
            > --enable-exif \
            > --with-zlib-dir \
            > --with-gd \
            > --with-ttf \
            > --enable-gd-native-ttf \
            > --with-freetype-dir \
            > --with-mime-magic \
            > --disable-session \
            > --disable-cgi
            >
            >
            >
            >[/color]


            ../configure --with-gd2 --with-zlib-dir --with-openssl --disable-cli
            --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir --with-ttf
            --enable-gd2-native-ttf --disable-cgi
            I followed some of your configuration, but it still doesnt show any
            graphics, I wonder what I did wrong?

            I use this script as to display graphic

            <?php
            // set up image
            $height = 200;
            $width = 200;
            $im = ImageCreate($wi dth, $height);
            $white = ImageColorAlloc ate ($im, 255, 255, 255);
            $black = ImageColorAlloc ate ($im, 0, 0, 0);


            // draw on image
            ImageFill($im, 0, 0, $black);
            ImageLine($im, 0, 0, $width, $height, $white);
            ImageString($im , 4, 50, 150, 'Sales', $white);


            // output image
            Header ('Content-type: image/png');
            ImagePng ($im);


            // clean up
            ImageDestroy($i m);
            ?>

            and also[color=blue]
            > <?php
            > var_dump(gd_inf o());
            > ?>[/color]

            to get information about my gd setup. but it displayed just blank white
            page.

            Comment

            • kecebong

              #7
              Re: compile php 4.3.3 with gd

              John Downey wrote:[color=blue]
              > kecebong wrote:
              >[color=green]
              >> it still does not work, I used gd_info() function and nothing came up.
              >> and then I tried to change my php.ini (overwrite it)and now there's an
              >> error message, how can I restore my php.ini?
              >>[/color]
              > PHP has its php.ini-dist and php.ini-recommended in the folder you
              > uncompressed it to. As for the compilation try configuring using
              > --with-gd2 and don't specify a path that should use the bundled version.
              >[/color]
              thanks for the info how to restoring php.ini, it works.

              Comment

              • kecebong

                #8
                Re: compile php 4.3.3 with gd

                kecebong wrote:[color=blue]
                > Randell D. wrote:
                >[color=green]
                >> "kecebong" <cebong@plungky .com> wrote in message
                >> news:avsmb.3421 6$Rd4.18244@fed 1read07...
                >>[color=darkred]
                >>> I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show
                >>> in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver.
                >>>[/color]
                >>
                >>
                >> What are your "configure" arguements?
                >>
                >> I have PHP configured on Apache 1.3.28 - When I compiled PHP I used the
                >> following:
                >>
                >> ./configure --with-mysql \
                >> --with-apache=$src/apache \
                >> --with-mcrypt \
                >> --with-jpeg-dir \
                >> --enable-exif \
                >> --with-zlib-dir \
                >> --with-gd \
                >> --with-ttf \
                >> --enable-gd-native-ttf \
                >> --with-freetype-dir \
                >> --with-mime-magic \
                >> --disable-session \
                >> --disable-cgi
                >>
                >>
                >>
                >>[/color]
                >
                >
                > ./configure --with-gd2 --with-zlib-dir --with-openssl --disable-cli
                > --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir --with-ttf
                > --enable-gd2-native-ttf --disable-cgi
                > I followed some of your configuration, but it still doesnt show any
                > graphics, I wonder what I did wrong?
                >
                > I use this script as to display graphic
                >
                > <?php
                > // set up image
                > $height = 200;
                > $width = 200;
                > $im = ImageCreate($wi dth, $height);
                > $white = ImageColorAlloc ate ($im, 255, 255, 255);
                > $black = ImageColorAlloc ate ($im, 0, 0, 0);
                >
                >
                > // draw on image
                > ImageFill($im, 0, 0, $black);
                > ImageLine($im, 0, 0, $width, $height, $white);
                > ImageString($im , 4, 50, 150, 'Sales', $white);
                >
                >
                > // output image
                > Header ('Content-type: image/png');
                > ImagePng ($im);
                >
                >
                > // clean up
                > ImageDestroy($i m);
                > ?>
                >
                > and also
                >[color=green]
                >> <?php
                >> var_dump(gd_inf o());
                >> ?>[/color]
                >
                >
                > to get information about my gd setup. but it displayed just blank white
                > page.
                >[/color]
                well I finally got gd enabled by doing $ make clean and $ rm
                config.cache before $ ./configure new param. Thanks for all of the
                response. I got my answer from:



                Comment

                Working...