hi guys
i want to install php in linux redhat 7.3

apache_1.3.31
gd-2.0.26
php-4.3.7

i tried thses commands

Install Apache:

./configure --prefix=/var/www --enable-module=so

Install GD library:

./configure --prefix=/var/www/ --enable-FEATURE --with-PACKAGE --with-freetype --with-png

Install PHP:

./configure --with-mysql --with-apxs=/var/www/bin/apxs --with-sybase=$SYBASE/OCS --enable-magic-quotes --with-gd=/var/www/ --with-zlib
make

make install

when i make the PHP it's give me an error

ext/gd/gd.lo: In function zif_imagecolormatch':
/install/php-4.3.7/ext/gd/gd.c:802: undefined reference to
gdImageColorMatch'
ext/gd/gd.lo: In function zif_imagerotate':
/install/php-4.3.7/ext/gd/gd.c:1112: undefined reference to
gdImageRotate'
ext/gd/gd.lo: In function zif_imagecreatefromstring':
/install/php-4.3.7/ext/gd/gd.c:1336: undefined reference to
gdImageCreateFromGifCtx'
ext/gd/gd.lo: In function zif_imagecreatefromgif':
/install/php-4.3.7/ext/gd/gd.c:1492: undefined reference to
gdImageCreateFromGifCtx'
/install/php-4.3.7/ext/gd/gd.c:1492: undefined reference to gdImageCreateFromGif'
ext/gd/gd.lo: In function
zif_imageline':
/install/php-4.3.7/ext/gd/gd.c:2184: undefined reference to gdImageAALine'
ext/gd/gd.lo: In function
zif_imageellipse':
/install/php-4.3.7/ext/gd/gd.c:2317: undefined reference to gdImageEllipse'
ext/gd/gd.lo: In function
_php_image_convert':
/install/php-4.3.7/ext/gd/gd.c:3741: undefined reference to gdImageCreateFromGif'
ext/gd/gd.lo: In function
zif_imageantialias':
/install/php-4.3.7/ext/gd/gd.c:3878: undefined reference to `gdImageAntialias'
collect2: ld returned 1 exit status

make: *** [sapi/cli/php] Error 1

so can anyone give me the best configuration so i can do it

    Originally posted by ramez_sever

    Install GD library:


    ./configure --prefix=/var/www/ --enable-FEATURE --with-PACKAGE --with-freetype --with-png


    Don't compile GD. Your version of PHP already has it. I told you that in your other forum post:

    http://www.phpbuilder.com/board/showthread.php?s=&threadid=10277488

    Also, is there a reason you are not including the path to your MySQL directory at this part:

    Install PHP:

    ./configure --with-mysql

    I also told you that in your other post:

    http://www.phpbuilder.com/board/showthread.php?s=&threadid=10277488

      so what i should do to solve the problem ???

      i didn't install mysql yet so i make it the default directory

        You need to install MySQL first, just like you did Apache.

        After you install Apache and MySQL, then you need to install the three gunzip files that I mentioned in your other post. I"m not going to copy and paste them for you in this post.

        After you finish that, then you can install PHP.

        But first, start with MySQL and Apache installations. Let me know if that is a problem and I will try to help, but you need to also take my advice (or the advice of others) to heart if you want further support. Otherwise, I am trying to suggest to you how to solve your problem, but you don't do it, and then you ask for help.

        I do not have all of the answers, but I can only help you if you want my help.

          thanks man for your help
          i will try to install mysql first

          then i will come back later for your advice

            Here are instructions for installing MySQL on RH 7.3:

            shell> groupadd mysql
            shell> useradd -g mysql mysql
            shell> cd /usr/local
            shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
            shell> ln -s full-path-to-mysql-VERSION-OS mysql
            shell> cd mysql
            shell> ./scripts/mysql_install_db
            shell> chown -R root .
            shell> chown -R mysql data
            shell> chgrp -R mysql .
            shell> ./bin/mysqld_safe --user=mysql &

            And for Apache 1.31 on RH 7.3:

            shell > gunzip < /path/to/apache_version-tar.gz | tar xvf –
            shell > ln –s apache_version_directory apache
            shell > cd apache
            shell > ./configure - -prefix=/usr/local/apache - -enable-module=so
            shell > make
            shell > make install

            And for the three gunzip files I mentioned in the other post:

            1. Go to the directory where you downloaded jpegsr.v6b.tar.gz
              shell> gunzip < /usr/local/jpegsrc.v6b.tar.gz | tar xvf –

            2. Go to the directory where you downloaded zlib-1.2.1.tar.gz

            a. shell > gunzip < /usr/local/zlib-1.2.1.tar.gz | tar xvf –
            b. shell > ln –s /usr/local/zilib-1.2.1 zlib
            c. shell > ./configure
            d. shell > make test
            e. shell > make install

            1. Go to the directory where you downloaded libpng-1.2.5.tar.gz
              a. shell > gunzip < /usr/local/libpng-1.2.5.tar.gz | tar xvf –
              b. shell > ln –s /usr/local/libpng-1.2.5 libpng
              c. shell > cd libpng
              d. shell > cp /usr/local/libpng/scripts/makefile.linux makefile
              e. shell > make test
              f. shell > make install

            Last, here are instructions for PHP configuration. Of course, substitute your own paths:

            shell > gunzip < /path/to/php_version-tar.gz | tar xvf –
            shell > ln –s php_version_directory php
            shell > cd php
            shell > ./configure - -with-mysql=/usr/local/mysql \
            - -with-apxs=/usr/local/apache/bin/apxs \
            - -enable-magic-quotes \
            - -enable-track-vars \
            - -enable-trans-sid \
            - -with-xml \
            - -disable-short-tags \
            --enable-ftp \
            --with-gd \
            --with-zlib-dir=/usr/local/zlib \
            --with-jpeg-dir=/usr/local/jpeg-6b \
            --with-png-dir=/usr/local/libpng

            shell > make
            shell > make install

            If you want to follow my configs exactly, just know that I install everything into /usr/local directory. You will need to create the same type of sybolic links as I have as well.

              i did what you wrote

              but when i tried this command

              ===================

              ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs --with-sybase=$SYBASE/OCS --enable-magic-quotes --enable-track-vars --enable-trans-sid --with-xml --disable-short-tags --enable-ftp --with-gd --with-zlib-dir=/usr/local/zlib --with-jpeg-dir=/usr/local/jpeg-6b --with-png-dir=/usr/local/libpng

              it's give me an error

              configure: error: mysql configure failed. Please check config.log for more information.

              what do you think the error
              or should i ignore it and conteniue

                and why when i install mysql i didn't say make and make install

                even the php??? you didn't mention these two commands

                  Because MySQL runs a script:

                  shell> ./scripts/mysql_install_db

                    when i try make in mysql directory

                    its give me an error

                    make: *** No targets specified and no makefile found. Stop.

                      Then at this point, you may be better off learning about each of the products and learning how to install each of them one at a time.

                      It would be too difficult for me to know how to solve each problem you are running into when I don't know completey what you are doing.

                      Maybe someone else will have better help for me, but my suggestion would be to spend some time reading the manuals or getting a good introductory book, which explains in greater detail what to do than could be done in newsgroup postings.

                        Yes, you did and I tried to help you each step of the way, but at this point, you may be better off with a book or reading the manuals.

                          8 days later

                          When you get this error:

                          make: *** No targets specified and no makefile found. Stop

                          it means that the configuration never succeeded. When you configure a program, it creates a "make file" that is used to install the program.

                          Every step of installing a program is critical and you can't move on unless the preceding step succeeds.

                          configure (options)
                          make
                          make install

                          You'll probably find that configuring the program will fail more than the other steps. When it does, read the errors carefully (scroll up to where they first start - one small error can trigger lots of them) and try to satisfy whatever the program is bitching about.

                          You have to successfully install MySQL then Apache and then PHP.

                          The first time I put together a server, I used these instructions:
                          http://e-gineer.com/instructions/index.phtml

                          They are somewhat dated now but I find that the author does a great job at explaining things.

                          Maybe someone else can post some good and current on-line tutorials for you.

                            Write a Reply...