How to recompiling php with --enable-zip parameter on linux server?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ujwalarali85
    New Member
    • Sep 2009
    • 13

    How to recompiling php with --enable-zip parameter on linux server?

    We have ZZIPlib installed.

    My command configure line looks like :
    ./configure –with-apxs –with-curl –with-curl-dir=/usr/local/lib –with-gd –with-gd-dir=/usr/local –with-gettext –with-jpeg-dir=/usr/local/lib –with-kerberos, etc.

    Then I need to add –enable-zip to this line.

    I can't even find the right place to run the ./configure --help command.
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Originally posted by ujwalarali85
    We have ZZIPlib installed.

    My command configure line looks like :
    ./configure –with-apxs –with-curl –with-curl-dir=/usr/local/lib –with-gd –with-gd-dir=/usr/local –with-gettext –with-jpeg-dir=/usr/local/lib –with-kerberos, etc.

    Then I need to add –enable-zip to this line.

    I can't even find the right place to run the ./configure --help command.
    You need to PHP source, which is available from php.net.

    Then cd into the source directory, and run your new configure command (with your enable zip), then make && make install.

    Comment

    • ujwalarali85
      New Member
      • Sep 2009
      • 13

      #3
      Originally posted by Markus
      You need to PHP source, which is available from php.net.

      Then cd into the source directory, and run your new configure command (with your enable zip), then make && make install.
      Sorry I couldn't get you exactly, please explain in brief. Its very urgent requirement for me to enable ZIP functionality.

      I have Webmin access but not know where and how to run Configure command with enable zip option.

      Thanks a lot.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        these are shell commands (aka CLI) so you need a shell window (or terminal (window), e.g. provided by aterm, xterm, …) to type it there.

        Comment

        • ujwalarali85
          New Member
          • Sep 2009
          • 13

          #5
          Originally posted by Dormilich
          these are shell commands (aka CLI) so you need a shell window (or terminal (window), e.g. provided by aterm, xterm, …) to type it there.
          I have the Shell window , but how and in which directory I have to run configure command

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            do as Markus said:

            Then cd into the source directory, and run your new configure command (with your enable zip), then make && make install.

            Comment

            • ujwalarali85
              New Member
              • Sep 2009
              • 13

              #7
              Originally posted by Dormilich
              do as Markus said:

              Then cd into the source directory, and run your new configure command (with your enable zip), then make && make install.
              exactly not getting the 'source directory' and where it located. Please can you help regarding this.

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #8
                source directory: the directory where you unzipped the PHP source code into

                Comment

                • ujwalarali85
                  New Member
                  • Sep 2009
                  • 13

                  #9
                  Originally posted by Dormilich
                  source directory: the directory where you unzipped the PHP source code into
                  I got PHP Source Dir, but ./configure file is not present there. There is php-config file in that in that configure options are set as follows

                  configure_optio ns=" '--disable-cli' '--disable-discard-path' '--disable-force-cgi-redirect' '--prefix=/usr/local/php5' '--with-config-file-path=/usr/local/lib/php5' '--with-pear=/usr/share/php5' '--enable-exif' '--enable-ftp' '--enable-bcmath' '--enable-calendar' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-gettext' '--with-zlib-dir' '--with-imap' '--with-imap-ssl' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-xpm-dir=/usr' '--with-openssl' '--with-kerberos' '--enable-sysvsem' '--enable-sysvshm' '--with-mcrypt' '--with-iconv' '--enable-mbstring=all' '--enable-mbregex' '--with-mysql=/usr' '--with-mysqli' '--with-curl' '--with-pdo-mysql' '--enable-soap' '--with-mhash' '--with-xsl'"

                  Now Please guide me how I run configure command with --enable-zip option.

                  Comment

                  • Dormilich
                    Recognized Expert Expert
                    • Aug 2008
                    • 8694

                    #10
                    Originally posted by ujwalarali85
                    I got PHP Source Dir, but ./configure file is not present there.
                    if it were a file, it’d be hidden. alas, it is a shell script (usually provided by the system).

                    Comment

                    • ujwalarali85
                      New Member
                      • Sep 2009
                      • 13

                      #11
                      Originally posted by Dormilich
                      if it were a file, it’d be hidden. alas, it is a shell script (usually provided by the system).
                      Thanks for reply.
                      I did following steps

                      > cd /usr/local/php5/bin

                      > './configure' '--disable-cli' '--disable-discard-path' '--disable-force-cgi-redirect' '--prefix=/usr/local/php5' '--with-config-file-path=/usr/local/lib/php5' '--with-pear=/usr/share/php5' '--enable-exif' '--enable-ftp' '--enable-bcmath' '--enable-calendar' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-gettext' '--with-zlib-dir' '--with-imap' '--with-imap-ssl' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-xpm-dir=/usr' '--with-openssl' '--with-kerberos' '--enable-sysvsem' '--enable-sysvshm' '--with-mcrypt' '--with-iconv' '--enable-mbstring=all' '--enable-mbregex' '--with-mysql=/usr' '--with-mysqli' '--with-curl' '--with-pdo-mysql' '--enable-soap' '--with-mhash' '--with-xsl' '--enable-zip'


                      /bin/bash: ./configure: No such file or directory


                      I got above error message

                      Comment

                      • Dormilich
                        Recognized Expert Expert
                        • Aug 2008
                        • 8694

                        #12
                        Originally posted by ujwalarali85
                        /bin/bash: ./configure: No such file or directory

                        I got above error message
                        I suspect the Makefile is missing. (see also here)

                        Comment

                        • Markus
                          Recognized Expert Expert
                          • Jun 2007
                          • 6092

                          #13
                          Originally posted by ujwalarali85
                          Thanks for reply.
                          I did following steps

                          > cd /usr/local/php5/bin

                          > './configure' '--disable-cli' '--disable-discard-path' '--disable-force-cgi-redirect' '--prefix=/usr/local/php5' '--with-config-file-path=/usr/local/lib/php5' '--with-pear=/usr/share/php5' '--enable-exif' '--enable-ftp' '--enable-bcmath' '--enable-calendar' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-gettext' '--with-zlib-dir' '--with-imap' '--with-imap-ssl' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-xpm-dir=/usr' '--with-openssl' '--with-kerberos' '--enable-sysvsem' '--enable-sysvshm' '--with-mcrypt' '--with-iconv' '--enable-mbstring=all' '--enable-mbregex' '--with-mysql=/usr' '--with-mysqli' '--with-curl' '--with-pdo-mysql' '--enable-soap' '--with-mhash' '--with-xsl' '--enable-zip'


                          /bin/bash: ./configure: No such file or directory


                          I got above error message
                          No - that's where your compiled PHP is located. You need the actual source code, available from here - remember, you want the complete source code.. nothing precompiled. Once you have that downloaded, cd into it's location. The source should have a README file, that will explain how to install on a *nix system.

                          Comment

                          • ujwalarali85
                            New Member
                            • Sep 2009
                            • 13

                            #14
                            Originally posted by Markus
                            No - that's where your compiled PHP is located. You need the actual source code, available from here - remember, you want the complete source code.. nothing precompiled. Once you have that downloaded, cd into it's location. The source should have a README file, that will explain how to install on a *nix system.
                            Thanks Markus.
                            I have already have PHP5 installed on server.
                            Now I want how to add zip support to PHP5 as PHP5 is already installed at server.(Ref: http://www.lampdocs.com/blog/2008/08...pport-for-php/)

                            I found the another forum

                            with reference of this so I thought the source directory is /usr/local/portage/dev-lang/

                            So did
                            > cd /usr/local/portage-ovh/dev-lang/php5-ovh

                            then run the configur commad with '--enable-zip' option ,but still it giving following error
                            /bin/bash: ./configure: No such file or directory

                            Comment

                            • Dormilich
                              Recognized Expert Expert
                              • Aug 2008
                              • 8694

                              #15
                              Originally posted by ujwalarali85
                              I have already have PHP5 installed on server.
                              Now I want how to add zip support to PHP5 as PHP5 is already installed at server.
                              it doesn’t matter if there already is a compliled build. to add the zip functionality you must (re)compile the whole stuff (which requires the source code). the blog clearly stated that.

                              Originally posted by ujwalarali85
                              http://forums.gentoo.org/viewtopic-t...2-start-0.html with reference of this so I thought the source directory is /usr/local/portage/dev-lang/
                              things are different, if you installed PHP through a package manager (apt, synaptic, yast, emerge, port, …)

                              if you’re using Gentoo Linux, then you should use emerge to rebuild PHP (as described in the link).

                              Comment

                              Working...