Announcement

Collapse
No announcement yet.

Network Settings / Premature end of script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Network Settings / Premature end of script

    Howdy -

    I've got a site that I'm trying to upload, but the network setup test is failing. I've trawled through the forum and checked the things mentioned:
    • path to perl shell correct
    • cgi script extension correct (other scripts in the directory run fine)
    • path to cgi-bin is fine (Actinic scripts are there)
    • cgi-bin URL correct (other scripts work)
    • not out of disk space
    • server is configured to accept POST to cgi (other scripts work)


    Any clues? The advanced network setup says scripts are not executing on the server properly. The Actinic scripts are not; others are just fine.

    One thing I did notice was that in the manual upload instructions it mentions encryption files and class files - I uploaded the encription files into the base directory of the site. Where do the class files go? The message is somewhat cryptic.


    Any help would be GREATLY appreciated.

    s.

    #2
    It would help if you could post your network settings. Export them to a textfile and hide the FTP username / Password.

    Also do another network test and post the actual error message.

    Finally tell us who and what type of server you're on MS, Unix, Solaris, etc.

    I'd not worry about the class files until you get your Network Test to work. They're only needed at the final stage of the checkout. They go several subdirectories deep within acatalog ( COM/Actinic/Catalog I think).

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Network settings

      Hey Norman -

      The two errors I get when running the network test are as follows:

      1. "Actinic Ecommerce received a server error from the web server. The CGI scripts are not executing properly on the server. Run Web | Configure Web Site Details... to review your web site configuration."

      When I view details, the web page says "The server encountered an internal error or misconfiguration and was unable to complete your request."

      The server error log says "Premature end of script headers: cp000001.pl"

      2. Then Actinic Says "The test script failed to execute on the web server. The error could be caused by several things. Check the path to the Perl shell, the CGI script extension, the path to CGI-BIN, and the CGI-BIN URL. This error could also occur if your web site is out of disk space or your web server is not configured to accept POSTs to CGI scripts." (I checked these as per my last post)

      Thanks so much for your help. The web server is an Apache 2.0 server running on a Redhat 9.0 linux install, Perl version 5.8. The domain is run as a virtual domain - I host a number of sites. I'm the sysadmin.

      And the network settings are as follows (drum roll please):

      HTTPPROXYMODE 0
      HTTPPROXYADDRESS
      HTTPPROXYPORT 80
      HTTPPROXYUSER
      HTTPPROXYPASSWORD
      FTPPROXYMODE 0
      FTPPROXYADDRESS
      FTPPROXYPORT 21
      FTPPROXYUSER
      FTPPROXYPASSWORD
      SCRIPTID 1
      SCRIPTEXT .pl
      SMTPHOST mail.luxmedia.com
      WEBSITEURL http://staging.fierceinc.com/
      IGNOREPASSIVEERRORS true
      PATHTOPERL /usr/bin/perl
      CATALOGURL http://staging.fierceinc.com/acatalog/
      CGIBINURL http://staging.fierceinc.com/cgi-bin/
      PATHFROMCGITOCATALOG /www/fierceinc/acatalog/
      CODEBASE ./
      FTPHOST staging.fierceinc.com
      FTPUSERNAME foo
      FTPPASSWORD bar
      PATHTOCGIBIN /var/www/cgi-bin/
      USEPASSIVEFTP true
      FTPPATHFROMCGITOCATALOG

      They all look pretty harmless to me, with the exception of the CODEBASE parameter - I don't know what that's all about.

      s.

      Comment


        #4
        replace PATHFROMCGITOCATALOG /www/fierceinc/acatalog/

        with ../acatalog/



        replace PATHTOCGIBIN /var/www/cgi-bin/



        with /web/cgi-bin/

        Comment


          #5
          That can't be right, and moreover, Actinic confirms it.

          there is no /web directory on my server, so Actinic reports that it can't get there when attempting to FTP.

          Also, the path from cgi-bin to the catalog isn't ../acatalog; I have a global cgi-bin for all my sites located at /var/www/cgi-bin. The websites are located at /www/{name of site}. This www directory is not the same as the www directory under /var. That's why I put full paths in my settings, i.e.

          /var/www/cgi-bin
          /www/fierceinc/acatalog

          does Actinic have a problem with the leading "/"? I don't think so, since the scripts are FTPed up to the directory no problem, and when I look at the site, clicking on the "Add to cart" button finds the appropriate script - it just won't run.

          Hm. Curious, eh? I'm sure it will turn out to be something very dumb on my part.

          s.

          Comment


            #6
            Have you tried the relative path route from CGI-BIN to acatalog of:-

            ../../../www/fierceinc/acatalog/

            Norman
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              just did. No dice. Same errors. <sigh>

              It seems like a perl error to me - the web server is the one complaining. But then again, maybe it's a simple path error somewhere. I'll ask a perl programmer friend of mine, and see if he has any ideas.

              thanks, all.

              s.

              Comment


                #8
                DOS linefeeds

                Unbelieveable.

                The DOS linefeeds in the perl scripts are the culprits. Run dos2unix on the scripts, and it all works just fine. There's a great explanation here:

                http://www.redhat.com/archives/redha.../msg00436.html

                So, to avoid this problem resetting itself every time I upload the site, I have to either upload manually, or in ASCII mode. Can the Actinic FTP be set to ASCII mode?

                Also, SFTP support should be added - who the heck wants to leave FTP up and running? I've been taken down once that way, and really don't want that happening again.

                Many thanks for everyone's feedback - this is obviously a very responsive community.

                s.

                Comment


                  #9
                  That's really weird because as far as I know, all uploading of the perl scripts by Actinic is automatically done in ASCII mode rather than BINARY. It is when you manually upload a script in BINARY that you get all the problems.

                  Once the perl scripts are uploaded (and converted) they will not be uploaded again unless you change your network settings or do a 'Web | Refresh'.

                  Comment


                    #10
                    I've never had any trouble editing the Perl scripts even using editors as dumb as Notepad. As Chris said the Actinic upload sorts out the mode and makes sure the CRLF's are Perl compatible.

                    As to "who the heck wants to leave FTP up and running?" - nearly every ISP in the world uses plain FTP 24x7. It's just a matter of keeping your FTP server up-to-date with regards to security.

                    Norman
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment


                      #11
                      RedHat vsftp config settings

                      Aha!

                      Gentlemen, you pointed me in the right direction, and sure enough, RedHat vsftpd (their ftp client) is defaulted to NOT accept ASCII transfers. From the config file:

                      # By default the server will pretend to allow ASCII mode but in fact ignore
                      # the request. Turn on the below options to have the server actually do ASCII
                      # mangling on files when in ASCII mode.
                      # Beware that turning on ascii_download_enable enables malicious remote parties
                      # to consume your I/O resources, by issuing the command "SIZE /big/file" in
                      # ASCII mode.
                      # These ASCII options are split into upload and download because you may wish
                      # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
                      # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
                      # on the client anyway..
                      ascii_upload_enable=YES


                      I removed the hash mark before the ascii_upload_enable=YES parameter, restarted the service, and ...

                      SUCCESS!!!

                      Thanks, gents. I have other questions referring to squeezing Actinic into an existing website without breaking table widths, but I'll do some research first. Setting the ACTSTDWIDTH parameter is *definitely* not enough. I've found straggling tables in the .pl scripts, particularly in the error messages. If I can't sort it out I'll start a new thread - after researching the archives, of course.

                      Many, many thanks.

                      s.

                      Comment


                        #12
                        Steve,

                        Good to hear that you've sorted it.

                        And your last post has all the keywords needed that will help anyone in the future who has this problem.

                        Norman
                        Norman - www.drillpine.biz
                        Edinburgh, U K / Bitez, Turkey

                        Comment


                          #13
                          Thank you!

                          I've just spent 12 hours trying to sort out a problem with my CGI search script. This forum gave me the answer in 2 minutes - I hadn't sent the script in ASCII mode. THANK YOU - I'll know better next time.

                          Comment

                          Working...
                          X