Perl help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mastamindz
    Confirmed User
    • Feb 2002
    • 3547

    #1

    Perl help

    I just installed a script, everything was installed properly (to my knowledge) but I seem to have an error when trying to run it.

    http://www.ydl.ca/cgi-bin/puw/puw_setup.cgi

    Anyone know where I should start?
    If you click here, you will make money.
  • Why
    MFBA
    • Mar 2003
    • 7230

    #2
    ssh as root and do "tail /var/log/messages" and that might give you a bit more input as to what exactly the error was.

    Comment

    • vending_machine
      Confirmed User
      • Jun 2002
      • 1070

      #3
      Originally posted by mastamindz
      I just installed a script, everything was installed properly (to my knowledge) but I seem to have an error when trying to run it.

      http://www.ydl.ca/cgi-bin/puw/puw_setup.cgi

      Anyone know where I should start?
      Does this script mail something? Sounds like it's trying to mail something, but you haven't configured the email address or something similar correctly. The apache error logs might lead you towards a fix.

      Comment

      • foe
        Confirmed User
        • May 2002
        • 5246

        #4
        make sure you give it permisions to excecute.

        Comment

        • mastamindz
          Confirmed User
          • Feb 2002
          • 3547

          #5
          Originally posted by vending_machine


          Does this script mail something? Sounds like it's trying to mail something, but you haven't configured the email address or something similar correctly. The apache error logs might lead you towards a fix.
          nope its a small content managment script
          If you click here, you will make money.

          Comment

          • mastamindz
            Confirmed User
            • Feb 2002
            • 3547

            #6
            Originally posted by foe
            make sure you give it permisions to excecute.
            all the cgi script were chmod'd to 755
            If you click here, you will make money.

            Comment

            • vending_machine
              Confirmed User
              • Jun 2002
              • 1070

              #7
              Common Mistake: A common mistake made during setup is that users will place the files puwysiwyg.js and puwysiwyg.css in the same folder as the CGI scripts. Please note, that as of version 1.2, these two files go in the same directory as the images.
              I don't know if this is the exact script you're installing, but you should doublecheck.

              Comment

              • mastamindz
                Confirmed User
                • Feb 2002
                • 3547

                #8
                Originally posted by vending_machine


                I don't know if this is the exact script you're installing, but you should doublecheck.
                yep those are in the images directory
                If you click here, you will make money.

                Comment

                • vending_machine
                  Confirmed User
                  • Jun 2002
                  • 1070

                  #9
                  Originally posted by mastamindz


                  yep those are in the images directory
                  It's really hard to say without actually being able to look at the setup and the error logs unfortunately. You should ask your host.

                  Comment

                  • Ketadream
                    Confirmed User
                    • Feb 2003
                    • 1373

                    #10
                    I assume script255 is a script its calling make sure its set to 777 just for the hell of it.


                    /home/www/ydl.ca/cgi-bin/puw/puw_setup.cgi
                    should it not be usr/home/www ect or does that even matter.

                    Im not a perl expert I'm a ASP/VB expert who just converted and saw the light of php
                    SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

                    Comment

                    • darksoul
                      Confirmed User
                      • Apr 2002
                      • 4997

                      #11
                      login with ssh and do:
                      perl -pw /home/www/ydl.ca/cgi-bin/puw/puw_setup.cgi

                      you should see some detailed errors.
                      if you say its 755 then
                      it looks you didn't uploaded in ascii
                      1337 5y54|)m1n: 157717888
                      BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                      Cambooth

                      Comment

                      • Makingcoin
                        Confirmed User
                        • Aug 2002
                        • 8919

                        #12
                        kick the box

                        www.MAKINGCOIN.com

                        icq. 166-662-831
                        "Start making large coin!"


                        Daddy I Get Paid To Be A Whore - Coming Soon

                        Comment

                        • fiveyes
                          Confirmed User
                          • Aug 2001
                          • 1680

                          #13
                          Near the top of the script, like the third or fourth line down, add this line, it'll be more helpful than a "malformed header" message:

                          use CGI::Carp qw(fatalsToBrowser);
                          <CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

                          <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>

                          Comment

                          • fiveyes
                            Confirmed User
                            • Aug 2001
                            • 1680

                            #14
                            http://www.washington.edu/computing/...gi-errors.html
                            <CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

                            <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>

                            Comment

                            • vending_machine
                              Confirmed User
                              • Jun 2002
                              • 1070

                              #15
                              Problem is that the script seems to be handling errors itself, so it's hard to say exactly what the issue is. There have been a few suggestions here that might help though.

                              Comment

                              • fiveyes
                                Confirmed User
                                • Aug 2001
                                • 1680

                                #16
                                Originally posted by darksoul
                                login with ssh and do:
                                perl -pw /home/www/ydl.ca/cgi-bin/puw/puw_setup.cgi

                                you should see some detailed errors.
                                if you say its 755 then
                                it looks you didn't uploaded in ascii
                                No, there's a difference in "premature end of headers" and "malformed headers". You're advising for the first case, which doesn't apply here.
                                <CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

                                <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>

                                Comment

                                • mastamindz
                                  Confirmed User
                                  • Feb 2002
                                  • 3547

                                  #17
                                  Originally posted by Makingcoin
                                  kick the box
                                  You always have all the answers
                                  If you click here, you will make money.

                                  Comment

                                  • darksoul
                                    Confirmed User
                                    • Apr 2002
                                    • 4997

                                    #18
                                    Originally posted by fiveyes

                                    No, there's a difference in "premature end of headers" and "malformed headers". You're advising for the first case, which doesn't apply here.
                                    are you sure the error its generated by the script tho ?
                                    "Could not execute script" contradicts that
                                    I'm not seeing it like
                                    "Could not execute script255"
                                    that 255 looks more like a line number or an error code
                                    1337 5y54|)m1n: 157717888
                                    BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                                    Cambooth

                                    Comment

                                    • mastamindz
                                      Confirmed User
                                      • Feb 2002
                                      • 3547

                                      #19
                                      Originally posted by darksoul


                                      are you sure the error its generated by the script tho ?
                                      "Could not execute script" contradicts that
                                      I'm not seeing it like
                                      "Could not execute script255"
                                      that 255 looks more like a line number or an error code
                                      the script doesnt even have 255 lines of code...
                                      Last edited by mastamindz; 06-12-2003, 12:14 AM.
                                      If you click here, you will make money.

                                      Comment

                                      • darksoul
                                        Confirmed User
                                        • Apr 2002
                                        • 4997

                                        #20
                                        Originally posted by mastamindz


                                        the script doesnt even have 255 lines of code...
                                        I wasn't saying that
                                        1337 5y54|)m1n: 157717888
                                        BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                                        Cambooth

                                        Comment

                                        • mastamindz
                                          Confirmed User
                                          • Feb 2002
                                          • 3547

                                          #21
                                          oh
                                          If you click here, you will make money.

                                          Comment

                                          • vending_machine
                                            Confirmed User
                                            • Jun 2002
                                            • 1070

                                            #22
                                            Just get someone you trust onto your server to look at it, this isn't going to go anywhere without real error messages...

                                            Comment

                                            • mastamindz
                                              Confirmed User
                                              • Feb 2002
                                              • 3547

                                              #23
                                              Originally posted by vending_machine
                                              Just get someone you trust onto your server to look at it, this isn't going to go anywhere without real error messages...
                                              I could do that, but then I would have nothing to do
                                              If you click here, you will make money.

                                              Comment

                                              • fiveyes
                                                Confirmed User
                                                • Aug 2001
                                                • 1680

                                                #24
                                                Originally posted by mastamindz


                                                I could do that, but then I would have nothing to do
                                                But this way you're only going to get blind men trying to describe an elephant...
                                                <CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

                                                <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>

                                                Comment

                                                • AcidMax
                                                  Confirmed User
                                                  • May 2002
                                                  • 1827

                                                  #25
                                                  Maybe make sure it was uploaded properly? Not sure without looking at the code and errors specifically but sometimes if you upload scripts improperly it will screw them up. Just another thing to look at and im not sure if this script would work at all in that instance, but just an idea.
                                                  Latest MMA news. http://www.mmawrapup.com

                                                  Comment

                                                  • crescentx
                                                    Confirmed User
                                                    • Jun 2003
                                                    • 317

                                                    #26
                                                    (grope, grope, I hope that's the elephant's trunk omg)

                                                    OK, what the error message from web says to me is only that for some reason the script could not execute - could be anything, if it's all 755, double-check your paths, make sure the script doesn't require any other Perl packages, make sure you can do

                                                    vi thescript.pl (whatever the script's full name is)

                                                    and it isn't all on one line with lots ^Ms all over the place. (If so, it won't run, those mean it's a text file that was extracted or uploaded as binary). Command line is the only way to go here

                                                    ./thescript.pl

                                                    If it doesn't give errors on command line, that'd be weird. Check your web server error log for clues.

                                                    What's happening is invisibly anything on the web sends what's called a header like

                                                    Content-Type:text/html

                                                    With two carriage returns after it. If the script can't execute, the header gets garbled by the error message.

                                                    -doug
                                                    XYCash International Gay Affiliate Program

                                                    Comment

                                                    • neighborhood_bob
                                                      Registered User
                                                      • Jun 2003
                                                      • 83

                                                      #27
                                                      Even more basic...did you edit the script?
                                                      If so, you need to use a text editor that keeps
                                                      the ASCII formatting intact (wordpad doesn't do this by default.)
                                                      Make sure "word wrap" is OFF.
                                                      Upload in ASCII mode with your FTP client.
                                                      CHMOD files 755.

                                                      If you don't want to invoke the CGI module,
                                                      Creata a blank text file in notepad, name it error.txt, and
                                                      upload it into your main HTML directory.
                                                      Then add this code to the top of your script directly below the
                                                      shebang-

                                                      BEGIN {
                                                      open (STDERR, ">/path/to/error_file/error.txt");
                                                      }

                                                      replace the path with the server side path to the text file.

                                                      Then just open error.txt in browser to get more complete
                                                      error messages.

                                                      GL
                                                      <br><br><EMBED src="http://www.gulfmeridian.com/hic.swf" menu=false quality=high WIDTH="120" HEIGHT="60" NAME="hic" ALIGN=""></EMBED>

                                                      Comment

                                                      • salsbury
                                                        Confirmed User
                                                        • Feb 2002
                                                        • 1070

                                                        #28
                                                        run perl -wc script in the cgi's directory. that will catch most problems.

                                                        now the issue here is apparently that puw_setup.cgi is calling a script (one way or another). and is printing the string "Cannot execute the script" and "255" (that is, seperately). 255 is the return code. i'd bet on it.

                                                        it's printing it before the Content-type header is printing.

                                                        check with your host... but maybe the ownership of the script is wrong? or maybe the permissions on the script directory are wrong (they should not be 777 (nor should the script)).

                                                        if you aren't sure how to check that, log in to the server, to the cgi directory, and run: "ls -alR" and post the output somewhere, and we can tell ya.

                                                        Comment

                                                        • extreme
                                                          Confirmed User
                                                          • Oct 2002
                                                          • 2120

                                                          #29
                                                          Originally posted by mastamindz


                                                          all the cgi script were chmod'd to 755
                                                          ... 755 sounds right, got that on the directory they're in too? Apache doesn't like if group or world has write permissions sometimes.

                                                          Comment

                                                          Working...