Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

TKI cart

by lopacki (Initiate)
on Jun 08, 2010 at 23:46 UTC ( #843757=perlquestion: print w/replies, xml ) Need Help??
lopacki has asked for the wisdom of the Perl Monks concerning the following question:


I have had a shopping cart and formmail on my website for many years and it has worked flawlessly. I have to admit that I did not write the perl code its TKI cart that used to be free on the web.

The problem I have encountered is that I am trying to use the same TKI on a new site that is a sub domain on my server. And I am wondering if because it is a sub domain do I need the path directing the form to be different. I do have the CGI-Bin and all of its contents on the new site.

I have been testing the new site by just using the formmail part with a form that I put on one of the pages, this same form page is on my main site and again it works flawlessly. The problem I am encountering is when the form is submitted it cannot seem to find the path cgi-bin/formmail. I have been playing with the code for quite some time and continue to get the message that this link cannot be found.

The path it is trying to find is www.mywebsite/cgi-bin/formmail.

I have tried all of the following

<form method="post" action="">

<form method="post" action="">

<form method="post" action="../cgi-bin/">

<form method="post" action="/cgi-bin/">

Nothing I try to do seems to work

Also when trying to use the shopping cart again it cannot find the CGI-bin, it is being directed to the but for whatever reason again no luck on the link being found by the cart.

I thank you in advance for anything you might recommend that I try out as I am at my wits end.

Replies are listed 'Best First'.
Re: TKI cart
by ww (Archbishop) on Jun 09, 2010 at 01:49 UTC
    RUN! Do not walk! to the nearest source for an alternate to formmail. NMS has already been mentioned, TFMail (from London Perl Mongers, IIRC) is another. is notorious for its security failings. And if TKI is from the same source (Matt's), get rid of it too!

    Update: Turning to a question more closely related to the one you actually posed:

    There's very little efficiency or true economy in using the main domain's cgi-bin directory for the subdomain's business. OTOH, there are many ways that doing so can create issues or problems you don't need. For an almost trivial example, you won't be able to readily distinguish between mail sent from one site and mail from the other without extra effort (revising your form, for example).

    Your server's setup (your own or a service?) may also be a problem. If you're using a service, ask their un-helpful desk; if it's your own, you probably need to explore the delights of the relevant (Apache?) documentation. In fact, information about the server might make it possible for a Monk to offer more substantive advice.

      My sub domain has its own cgi-bin and all that is relevent, this is why I do not understand why the path will not work.

      I am not trying to use the cgi-bin of the main domain.

        You really need to post more complete data about the subdomain -- such as, where is its cgi-bin in relation to the page from which index.html is served... and what the structural relationship is between the page with the form and the location of your problem children. I'm looking for ASCII art or an absolutely unambiguous narrative so I can feel confident that I know what you're trying to tell me.

        At one point above, you cite what appears to be an attept to use an absolute path:


        To me, it looks as though you've concealed the TLD for no reason or don't understand paths. And if you're using this to execute, formail.cgi or something else, you're either missing the file extension or have stashed in a subdir of cgi-bin (which your host may not have setup as an directory with executables) and have not included the executable's name at all.

        That kind of thing -- narrative that is, at best, ambiguous until you clarify, and clearly errorneous technical data like that cited above -- makes it very difficult to offer prescriptions for a fix. It's like asking an MD to prescribe when it's not clear whether you have appendicitis or food poisoning.

        And just BTW, it's a really good idea to log in, since you are a Monk... because you can't fix -- for example -- your typos in that which you post anonymously... and we can't be sure the posts actually come from you (as opposed -- for example -- from a troll trying to confuse your issues).

Re: TKI cart
by rjt (Deacon) on Jun 09, 2010 at 01:58 UTC

    By "it cannot seem to find the path to cgi-bin/formmail", do you mean the server returns a 404 error when trying to do any of the above POST operations? If you're seeing something else, please let us know.

    Anyway, this seems like more of a web server configuration issue, especially since the shopping cart can't find "CGI-bin" either. Which web server are you running? Can you run other CGI scripts? Is it maybe a capitalization issue with "CGI-bin" versus "cgi-bin"?

Re: TKI cart
by Anonymous Monk on Jun 09, 2010 at 01:14 UTC
Re: TKI cart
by ikegami (Pope) on Jun 09, 2010 at 17:01 UTC
    Why don't you use the absolute URL of the page if you have problems creating a relative URL to the page? I'm guessing it's http://www.mywebsite/cgi-bin/, but you didn't specify.

    Not likely to be correct. If this relative URL is visited from
    it refers to

    Not likely to be correct. If this relative URL is visited from
    it refers to
Re: TKI cart
by Anonymous Monk on Jun 09, 2010 at 16:51 UTC
    This is only due to the new configuration of your webserver. if you are using apache then it is just a small fix,kindly let me know?
      why do you assume anyone has access to TKI cart?

      The server is in fact apache and linux, I have read the threads and later today I will try some of the possible fixes.

      If you have an answer to my problem it will be much appreciated.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://843757]
Approved by ww
Front-paged by redgreen
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-02-21 18:05 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (285 votes). Check out past polls.