Attempt to compile PHP 5.2.0 with mysql and gd (2.0.33)

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

    Attempt to compile PHP 5.2.0 with mysql and gd (2.0.33)

    Hello newsgroup members,

    I had an install of php without gd, this seemed to work ok. I decided
    I would like to use the gd package with php. I have Redhat 3.0AS, and
    php 5.2.0, and gd-2.0.33. the phpinfo file looks like it has gd (shows
    up in info page).

    I get a failure running one of the gd functions:
    Fatal error: Call to undefined function imagecreatefrom jpeg() in
    usr/local/apache2/htdocs/thumbnail_gener ator.php on line 42

    That function is supposed to be ok in gd.

    I assume that I must start all over. What directory should I be using
    for --with-gd=/??????
    I have tried the unzipped location (gd-2.0.33) where i do the
    ../configure, etc - the php config fails, saying it cannot find
    libgd.(a|so) (which is in .libs) or at times gd.h. I have used
    /usr/lib as well - seems everything fails in some form. I am using
    apache 2.0. How can I remove php 5.2, and gd, and start over
    "correctly" .

    I followed the install and readmes for both php and gd - but no luck.

    Any tips or experience with help.

    Thanks
    ewholz

  • F Laupretre

    #2
    Re: Attempt to compile PHP 5.2.0 with mysql and gd (2.0.33)

    There are 2 possible solutions :

    1. The simple one: The PHP source tree contains a GD library. If you want
    to use it (and I don't see why you wouldn't), just add '--with-gd' or
    '--with-gd=shared' to your configure line. Then run 'make' and the
    embedded GD library will be compiled and linked with your PHP.

    2. The more complex one. If you don't want to use the embedded GD library,
    you will have to expand the GD sources, run configure in this directory,
    compile, link , install GD, and only after this, you will run configure in
    the PHP source tree and add '--with-gd=<dir>' where <diris the directory
    GD was installed in (not the directory of the sources).

    Now, something else: if you want to use imagecreatefrom jpeg, you will need
    the jpeg library, even if you link PHP with its embedded GD library.
    There, it becomes quite complex to explain here.

    Read the document at
    http://www.tekwire.net/joomla/buildi...ache_rhel3.htm : it
    is a step by step tutorial explaining how to build a complete Apache/PHP
    environment on Linux RHEL 3. The document was validated with PHP 5.1.6 but
    it should be OK for 5.2.

    Francois

    Le Wed, 13 Dec 2006 07:16:20 +0100, eholz1 <ewholz@gmail.c oma écrit:
    Hello newsgroup members,
    >
    I had an install of php without gd, this seemed to work ok. I decided
    I would like to use the gd package with php. I have Redhat 3.0AS, and
    php 5.2.0, and gd-2.0.33. the phpinfo file looks like it has gd (shows
    up in info page).
    >
    I get a failure running one of the gd functions:
    Fatal error: Call to undefined function imagecreatefrom jpeg() in
    usr/local/apache2/htdocs/thumbnail_gener ator.php on line 42
    >
    That function is supposed to be ok in gd.
    >
    I assume that I must start all over. What directory should I be using
    for --with-gd=/??????
    I have tried the unzipped location (gd-2.0.33) where i do the
    ./configure, etc - the php config fails, saying it cannot find
    libgd.(a|so) (which is in .libs) or at times gd.h. I have used
    /usr/lib as well - seems everything fails in some form. I am using
    apache 2.0. How can I remove php 5.2, and gd, and start over
    "correctly" .
    >
    I followed the install and readmes for both php and gd - but no luck.
    >
    Any tips or experience with help.
    >
    Thanks
    ewholz
    >


    --
    Utilisant le client e-mail révolutionnaire d'Opera :

    Comment

    Working...