Installing GD2 with PHP on linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • usafshah
    New Member
    • Nov 2006
    • 104

    Installing GD2 with PHP on linux

    Hi guys


    I'm using fedora core 6, php5 and apache2, i downloaded gd2 compiled and test with gddemo and its working fine...

    php is located: /usr/local/php
    gd is located: /usr/local/gd


    how should i make it working with php, i have tried to recompile php with the following command

    ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-track-vars --with-gd=/usr/local/gd

    last time i compiled php with the following command:

    ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql
    but still when i see through phpinfo();

    i'm getting

    Configure Command './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql'

    I have put the line in php.ini

    extension=gd.so
    and
    also un-commented the line
    extension=php_g d2.dll

    but in vain
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Is there a reason you decided you would like to compile PHP and GD from source, as opposed to using a package manager such as yum?

    Comment

    • usafshah
      New Member
      • Nov 2006
      • 104

      #3
      i dont know about yum, how can i do this with yum ?

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        Originally posted by usafshah
        i dont know about yum, how can i do this with yum ?
        Code:
        # yum install php-gd

        Comment

        • usafshah
          New Member
          • Nov 2006
          • 104

          #5
          [PHP][root@linuxserve r ~]# yum install php-gd
          Loading "installonl yn" plugin
          Setting up Install Process
          Setting up repositories
          core 1.1 kB 00:00
          updates 100% |============== ===========| 1.2 kB 00:00
          extras 100% |============== ===========| 1.1 kB 00:00
          Reading repository metadata in from local files
          primary.xml.gz 100% |============== ===========| 509 kB 00:05
          updates : ############### ############### ############### ##### 1288/1288
          primary.xml.gz 100% |============== ===========| 1.9 MB 00:08
          extras : ############### ############### ############### ##### 6006/6006
          Parsing package install arguments
          Nothing to do
          [root@linuxserve r ~]#[/PHP]


          What should i do after this ? caz i still dont see any GD section in phpinfo();

          Comment

          • Motoma
            Recognized Expert Specialist
            • Jan 2007
            • 3236

            #6
            Originally posted by usafshah
            [PHP][root@linuxserve r ~]# yum install php-gd
            Loading "installonl yn" plugin
            Setting up Install Process
            Setting up repositories
            core 1.1 kB 00:00
            updates 100% |============== ===========| 1.2 kB 00:00
            extras 100% |============== ===========| 1.1 kB 00:00
            Reading repository metadata in from local files
            primary.xml.gz 100% |============== ===========| 509 kB 00:05
            updates : ############### ############### ############### ##### 1288/1288
            primary.xml.gz 100% |============== ===========| 1.9 MB 00:08
            extras : ############### ############### ############### ##### 6006/6006
            Parsing package install arguments
            Nothing to do
            [root@linuxserve r ~]#[/PHP]


            What should i do after this ? caz i still dont see any GD section in phpinfo();
            The Nothing to do message means it did not install...
            Odd...this worked for me.
            Could you post the results of the following commands for me?

            Code:
            yum search php-gd
            
            yum search gd
            
            yum install gd*

            Comment

            • usafshah
              New Member
              • Nov 2006
              • 104

              #7
              [PHP][root@linuxserve r tickets]# yum search php-gd
              Loading "installonl yn" plugin
              Setting up repositories
              core 100% |============== ===========| 1.1 kB 00:00
              updates 100% |============== ===========| 1.2 kB 00:00
              extras 100% |============== ===========| 1.1 kB 00:00
              Reading repository metadata in from local files
              primary.xml.gz 100% |============== ===========| 1.9 MB 00:08
              extras : ############### ############### ############### ##### 6087/6087



              php-gd.i386 5.1.6-3 core
              Matched from:
              php-gd
              The php-gd package contains a dynamic shared object that will add
              support for using the gd graphics library to PHP.



              php-gd.i386 5.1.6-3.3.fc6 updates
              Matched from:
              php-gd
              The php-gd package contains a dynamic shared object that will add
              support for using the gd graphics library to PHP.



              php-gd.i386 5.1.6-3.4.fc6 updates
              Matched from:
              php-gd
              The php-gd package contains a dynamic shared object that will add
              support for using the gd graphics library to PHP.



              php-gd.i386 5.1.6-3.4.fc6 installed
              Matched from:
              php-gd
              The php-gd package contains a dynamic shared object that will add
              support for using the gd graphics library to PHP.

              [root@linuxserve r tickets]#
              [/PHP]

              Comment

              • usafshah
                New Member
                • Nov 2006
                • 104

                #8
                The result of yum search gd is very large can't post here , text size increased then allowed.


                is there any simple text file uploading server when i upoad the file for you ?

                Comment

                • usafshah
                  New Member
                  • Nov 2006
                  • 104

                  #9
                  [PHP][root@linuxserve r tickets]# yum insatll gd*
                  Loading "installonl yn" plugin
                  usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache, upgrade, provides, shell, install, whatprovides, groupinstall, update, groupupdate, info, search, check-update, list, remove, clean, grouperase >

                  options:
                  -h, --help show this help message and exit
                  -t, --tolerant be tolerant of errors
                  -C run entirely from cache, don't update cache
                  -c [config file] config file location
                  -R [minutes] maximum command wait time
                  -d [debug level] debugging output level
                  -e [error level] error output level
                  -y answer yes for all questions
                  --version show Yum version and exit
                  --installroot=[path] set install root
                  --enablerepo=[repo] enable one or more repositories (wildcards allowed)
                  --disablerepo=[repo] disable one or more repositories (wildcards allowed)
                  -x [package], --exclude=[package]
                  exclude package(s) by name or glob
                  --obsoletes enable obsoletes processing during updates
                  --noplugins disable Yum plugins
                  None
                  [root@linuxserve r tickets]#
                  [/PHP]

                  Comment

                  • Motoma
                    Recognized Expert Specialist
                    • Jan 2007
                    • 3236

                    #10
                    Originally posted by usafshah
                    [PHP][root@linuxserve r tickets]# yum search php-gd
                    Loading "installonl yn" plugin
                    Setting up repositories
                    core 100% |============== ===========| 1.1 kB 00:00
                    updates 100% |============== ===========| 1.2 kB 00:00
                    extras 100% |============== ===========| 1.1 kB 00:00
                    Reading repository metadata in from local files
                    primary.xml.gz 100% |============== ===========| 1.9 MB 00:08
                    extras : ############### ############### ############### ##### 6087/6087



                    php-gd.i386 5.1.6-3 core
                    Matched from:
                    php-gd
                    The php-gd package contains a dynamic shared object that will add
                    support for using the gd graphics library to PHP.



                    php-gd.i386 5.1.6-3.3.fc6 updates
                    Matched from:
                    php-gd
                    The php-gd package contains a dynamic shared object that will add
                    support for using the gd graphics library to PHP.



                    php-gd.i386 5.1.6-3.4.fc6 updates
                    Matched from:
                    php-gd
                    The php-gd package contains a dynamic shared object that will add
                    support for using the gd graphics library to PHP.



                    php-gd.i386 5.1.6-3.4.fc6 installed
                    Matched from:
                    php-gd
                    The php-gd package contains a dynamic shared object that will add
                    support for using the gd graphics library to PHP.

                    [root@linuxserve r tickets]#
                    [/PHP]

                    Strange...Try running "yum install php-gd" again...I have no idea why it didn't work.

                    Comment

                    Working...