hello!

i need to enable gd support, got three questions:

  1. running phpinfo() the "Configure Command" row is the one used to configure php? i just clicked php during mdk installation process so i dont have any idea about the parameters used.

  2. i need to enable gd support, can i re-run configure with the same parameters + --with-gd?

  3. but where is php install directory, so that i can re-run configure? (i tried to find the dir)

thanks!

mdk10.1
php 4.3.8

    It would be better if you explained to us your operating system platform, the HTTP server you are using, PHP version (3/4/5), etc. in detail. Most of us wouldn't have a clue what MDK is. It could mean anything.

    For example, on a Windows platform running Apache 2.0 and Php 5.x, go to your PHP directory, look in the php.ini file and enable the GD2 extension. Then reboot your HTTP server.

    Need more info for us to help you.

      hello!

      sorr for the incomplete info. that should be:

      mandrake 10.1
      apache 2.0.50
      php 4.3.8

      help please..

      thank you!

        hello!

        thanks for the links, that was a good read.

        when i run phpinfo()

        i get this:

        GD Support enabled
        GD Version 2.0 or higher
        FreeType Support enabled
        FreeType Linkage with freetype
        JPG Support enabled
        PNG Support enabled
        WBMP Support enabled

        so basically gd support is ok right? i run this sample code found in webmonkey:

        http://webmonkey.wired.com/webmonkey/01/21/index4a_page3.html?tw=programming

        <?php
        //Send a header to the browser indicating
        //that this is a PNG image.
        //Remember to never send anything
        //to the browser before the header,
        //unless you're just itching for an error.

        header("Content-type: image/png");

        //create a new image called $image, 200 by 200 pixels
        $width = 200;
        $height = 200;
        $image = imagecreate($width, $height);

        //Allocate some colors.
        $white = imagecolorallocate($image, 255, 255, 255);
        $black = imagecolorallocate($image, 0, 0, 0);

        //Fill in the entire image with a white background.
        //Note that the first two arguments (after the
        //image name) are the X and Y coordinates of
        //the upper left corner of the rectangle,
        //the second two are the coordinates of the lower
        //right corner, and the last argument is the fill color

        imagefilledrectangle($image, 0, 0, $width, $height, $white);
        //Write a message in black.
        //The arguments to ImageTTFText are, in order,
        //the image name, the height in pixels of the text,
        //the angle (starting at 0 for normal text,
        //and proceeding counterclockwise,
        //the X and Y coordinates of the starting point,
        //the color, the TrueType font file, and the
        //content of the text.

        imagettftext($image, 150, 0, 20, 110, $black,
        "../fonts/verdana.ttf", "I love you!");

        //Push the completed image out.
        imagepng($image);

        //Finally, free up the memory allocated for the image.
        imagedestroy($image);
        ?>

        i dont get an output, as suggested i commented the header to see some errors and saw this:

        Warning: imagettftext(): Could not find/open font in /var/www/html/phptestimage2.php on line 39

        where should i start fixing? as phpinfo shows, i believe i have gd support ok. but why cant i generated images? for now i just want to see gd support ok then ill go on with the php learning stuff..

        thanks for interest in this thread.

          Write a Reply...