apache in cygwin: cannot execute binary file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickyeng
    Contributor
    • Nov 2006
    • 252

    apache in cygwin: cannot execute binary file

    I have the apache files in my directory:
    Code:
    /home/Nick/apache_1.3.33
    I have files :
    Install
    README
    apache
    apache.exe
    base64
    crypt
    htpasswd
    httpd
    htppd.tmpl

    I use cygwin. I try to start the apache server by typing:

    Code:
    $ ./httpd start
    But it give me this:
    Code:
    Display protocol statistics and current TCP/IP network connections.
    
    NETSTAT [-a] [-e] [-n] [-o] [-s] [-p proto] [-r] [interval]
    
    -a    bla bla bla
    -e    bla bla bla 
    -n    bla bla bla
    .......
    .......
    .......
    Starting Apache Web Server: ./apache: ./apache: cannot execute binary file
    Why i can't start apache?
    What's wrong with binary file?

    Regards,
    Nick.
  • nickyeng
    Contributor
    • Nov 2006
    • 252

    #2
    In the steps of Compiling the source, I runs:

    $ ./configure

    and then

    $ make

    after that, i copy and rename the file

    src/httpd

    to

    ~/CSC2406/bin/apache

    where i start the apache server in the directory of CSC2406/bin by typing
    $ ./httpd start

    Comment

    • sashi
      Recognized Expert Top Contributor
      • Jun 2006
      • 1749

      #3
      Originally posted by nickyeng
      I have the apache files in my directory:
      Code:
      /home/Nick/apache_1.3.33
      I have files :
      Install
      README
      apache
      apache.exe
      base64
      crypt
      htpasswd
      httpd
      htppd.tmpl

      I use cygwin. I try to start the apache server by typing:

      Code:
      $ ./httpd start
      But it give me this:
      Code:
      Display protocol statistics and current TCP/IP network connections.
      
      NETSTAT [-a] [-e] [-n] [-o] [-s] [-p proto] [-r] [interval]
      
      -a    bla bla bla
      -e    bla bla bla 
      -n    bla bla bla
      .......
      .......
      .......
      Starting Apache Web Server: ./apache: ./apache: cannot execute binary file
      Why i can't start apache?
      What's wrong with binary file?

      Regards,
      Nick.
      Hi there,

      Check the binary file permission, make sure the execute check box is selected. Good luck & Take care.

      Comment

      • nickyeng
        Contributor
        • Nov 2006
        • 252

        #4
        Originally posted by sashi
        Hi there,

        Check the binary file permission, make sure the execute check box is selected. Good luck & Take care.
        how to check binary file permission?
        i am totally new to Cygwin. Many command i dont know yet.
        could you specify more detail?

        Comment

        • Colloid Snake
          New Member
          • Nov 2006
          • 144

          #5
          Originally posted by nickyeng
          how to check binary file permission?
          i am totally new to Cygwin. Many command i dont know yet.
          could you specify more detail?
          Check this out - it should help (I think the one you want is under Tutorial 5, but you might find the rest of them interesting as well).

          Comment

          • nickyeng
            Contributor
            • Nov 2006
            • 252

            #6
            Originally posted by Colloid Snake
            Check this out - it should help (I think the one you want is under Tutorial 5, but you might find the rest of them interesting as well).

            http://www.ee.surrey.ac.uk/Teaching/Unix/index.html
            thanks for the link, but my problem still no solved.

            Comment

            • Colloid Snake
              New Member
              • Nov 2006
              • 144

              #7
              Originally posted by nickyeng
              thanks for the link, but my problem still no solved.
              Sashi was suggesting you go through the Windows directories (usually C:\Cygwin\...) to find the apache binary file and then right-click it and choose security to see what options are allowed, and I would suggest doing the same in Cygwin (using an ls -alh, and looking for the 'x' option).

              Do you have access to those?

              Comment

              • nickyeng
                Contributor
                • Nov 2006
                • 252

                #8
                Originally posted by Colloid Snake
                Sashi was suggesting you go through the Windows directories (usually C:\Cygwin\...) to find the apache binary file and then right-click it and choose security to see what options are allowed, and I would suggest doing the same in Cygwin (using an ls -alh, and looking for the 'x' option).

                Do you have access to those?
                yes i have it.
                Here is the picture:


                So, any wrong with permission of execute httpd?
                Once i type ./httpd start, it lists this:


                how come cannot execute binary file?

                Comment

                • sashi
                  Recognized Expert Top Contributor
                  • Jun 2006
                  • 1749

                  #9
                  Originally posted by nickyeng
                  yes i have it.
                  Here is the picture:


                  So, any wrong with permission of execute httpd?
                  Once i type ./httpd start, it lists this:


                  how come cannot execute binary file?
                  Hi there,

                  Please execute the below command and tell us what you see. Take care.

                  Code:
                    netstat -a

                  Comment

                  • nickyeng
                    Contributor
                    • Nov 2006
                    • 252

                    #10
                    Originally posted by sashi
                    Hi there,

                    Please execute the below command and tell us what you see. Take care.

                    Code:
                      netstat -a
                    i dont think the problem i having now is anything to do with netstat -a, right?
                    what for want to know my active connection?
                    Are you guys helping me here?

                    Comment

                    • nickyeng
                      Contributor
                      • Nov 2006
                      • 252

                      #11
                      sigh...

                      i cannot do anything but to trust you guys here.
                      So, here is my result of writing that command.

                      Comment

                      • sashi
                        Recognized Expert Top Contributor
                        • Jun 2006
                        • 1749

                        #12
                        Originally posted by nickyeng
                        i dont think the problem i having now is anything to do with netstat -a, right?
                        what for want to know my active connection?
                        Are you guys helping me here?
                        Hi there,

                        The question is, do you need help in the first place? The reason why i asked you to execute <netstat -a> is to make sure your port <80> is not being used by any other application. Whatelse do you think i can do by seeing you port status?

                        Comment

                        • sashi
                          Recognized Expert Top Contributor
                          • Jun 2006
                          • 1749

                          #13
                          Originally posted by nickyeng
                          sigh...

                          i cannot do anything but to trust you guys here.
                          So, here is my result of writing that command.
                          Hi there,

                          Can you once again execute the same command out of <cygwin> shell? Please post your output. Take care.

                          Comment

                          • nickyeng
                            Contributor
                            • Nov 2006
                            • 252

                            #14
                            Originally posted by sashi
                            Hi there,

                            Can you once again execute the same command out of <cygwin> shell? Please post your output. Take care.
                            here is the 2nd :

                            Comment

                            Working...