PHP CGI scripts problem

I am using iPlanet webserver on a Win 2000 machine. Amongst the other things
I am doing with it, I have some PHP scripts which I want to run on it.
I have followed the manual on CGI, but I cannot get it to work.
After using the Admin setup, the 'obj.conf' file contains:
NameTrans fn="pfx2dir" from="/abc" dir="c:/Netscape/Server4/xyz" name="cgi"
Service fn="send-cgi" type="magnus-internal/cgi"
<Object name="cgi">
ObjectType fn="force-type" type="magnus-internal/cgi"
Service fn="send-cgi"
</Object>
The 'mime.types' file contains:
type=magnus-internal/cgi exts=cgi,exe,bat,php
type=application/x-php exts=php
Windows is set up to recognise '.php' extensions and run the PHP
interpreter.
The error message which I get is:
[03/Oct/2001:16:38:51] failure ( 900): for host 132.132.132.132 trying to
GET /zyz/test.php, send-cgi reports: could not send new process (The
operation completed successfully.
[03/Oct/2001:16:38:51] failure ( 900): cgi_send:cgi_start_exec
c:\Netscape\Server4\abc\test.php failed
Any ideas why this does not work?
Steven

Hi Steven ,
Follow exactly
http://benoit.noss.free.fr/php/install-php4.html
to install and configure PHP in IWS under WIndowsNT.
If it still does'nt works notify me.
Regards
T.Raghulan
[email protected]

Similar Messages

  • This.submitForm() -- problem with my cgi script

    Thanks to George Johnson for an earlier answer to a related issue with this.submitForm.
    I am trying to use this.submitForm as per Example 1 on p. 348 of "JavaScript for Acrobat API Reference" document.
    To avoid any restrictions with my web hosting service, I am using the following JavaScript (on my form's Submit button) on my local XAMPP server:
    this.submitForm ("./cgi-bin/myscript.cgi");
    My question involves what should be in the myscript.cgi file before I submit to it.  If there is no file to start with, the
    submission will result in a "File not found" error.  So I guess I need the myscript.cgi file in the cgi-bin folder to begin with.
    When I put in a blank myscript.cgi file in that folder (hoping the submission will overwrite it), I can the following message:
    Server error!  The server encountered an internal error and was unable to complete your request. Either the server is overloaded or
    there was an error in a CGI script.
    Can you tell me what is happening?  What should my original myscript.cgi have in it, if anything?

    Thanks for responding.
    I want CGI script to processes the incoming data from the PDF form submission. I want that process to save the FDF to a file on the server. 
    I also understand that the script has to return a response to the client.  I would like to send some kind of confirmation to the client.
    I realize that writing scripts isn't rocket science, but it would seem that Adobe would have some examples of scripts that deal specifically with fdf data.  Could you point me to any examples?

  • Start Virtual Machines with CGI-Scripts

    Hi @all,
    i have running some Virtual Machines on my Mac Mini Server that i want to start and stop dynamicly. I thought i can do that with CGI-Scripts. If i know the correct URL the VM will start or stop. The problem is that the script must be started with my user-id. The _www user cannot start the VM's. Is it possible that i run a CGI-Script with a different user-id? Or do you have an other idea how can i realise my requirement.
    Thank you very much
    BR
    Manuel

    thanks for your help Strontium90.
    I have compiled the binary and copied it in the path that apache wishes:
    ls -l /usr/bin/suexec
    -rwsr-x---  1 root  _www  18760 30 Mai 22:41 /usr/bin/suexec
    But when i restart the Apache Server the suexec would not be loaded. When i read the Apache Docu i should see an message an the error log that the Wrapper was loaded, but in my case the message did not appear.
    [Wed May 30 23:10:01 2012] [notice] caught SIGTERM, shutting down
    [Wed May 30 23:10:02 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.8 with Suhosin-Patch configured -- resuming normal operations
    Have you another tip for me?
    Thank you very much.
    BR
    Manuel

  • Formmail action & cgi scripts

    I have 2 forms I built in CS3 that have to be processed in a
    secure manner. I followed the advice I found online and from my
    webhost (network solutions) and downloaded Visual Form Mail Pro. I
    uploaded the cgi script files to the cgi-bin on the server and
    setup the permissions. When I click the submit button on the form,
    I get an Internal Server Error message. I think the problem is the
    action field on the properties panel. I cannot find anything that
    will tell me what the action should be. I cannot use the mailto
    action, the forms are for secure medical information to be
    forwarded to a dr's office. One other issue with how the form needs
    to be processed to email, is my client wants the email sent to his
    gmail account, how do I configure that?
    the url for the form I tried to configure is
    https://www.stluciegi.com/contact/patientcontact.html

    ou can use PHP on this hosting?
    I'd suggest using the phpformmail script.
    here's my stock cut 'n paste on what to set to what, and why
    1)go to
    http://http://developerkarma.com/projects
    -->phpformmail
    download it.
    extract the ZIP file.
    More detailed instructions are in the docs folder. These
    shortcut
    instructions are for version 1.07 of the phpformmail script.
    2) open formmail.php in dreamweaver
    Make the following changes (in code view, turn line numbers
    on)
    2a)
    line 4,
    define('CHECK_REFERER', true);
    change to:
    define('CHECK_REFERER', false);
    reason: too many people use a firewall or Norton security to
    restrict this.
    2b)
    Line 43
    $referers = array('www.example.com', 'example.com');
    change to the domain name of your web site.
    reason: this probably isn't needed since we just turned the
    referrer
    checking off. but change it anyway.
    2c)  *this is to hard-code the recipient address into
    the php
    file, where it is totally invisible *
    Line 46
    $recipient_array = array();
    change to:
    $recipient_array = array('me' =>
    '[email protected]');
    **of course, replace [email protected]  with
    the email address
    you want to receive the form data. Also note the single quote
    marks.
    reason: this sets the email address the form results will be
    sent to.
    You can also make a list of possible recipient alias values-
    see the readme
    in the docs folder.
    2d) give the script a default "From" address to use.
    Go to line 41
    Change:
    define('FROM', null);
    to:
    define('FROM', 'Example Name <[email protected]>');
    substituting your name and email address.
    3) now do a File-->Save As and save this file to within
    this Local Site
    folder. save it as anythingyouwant.php
    4) in dw's File Panel, find anythingyouwant.php and upload it
    to the remote
    site.
    5) Now open your form html file in dreamweaver,
    5a)click the mouse into the form area, and select the
    <form> tag on the
    lower left margin of the design window.
    In the Property Inspector, it should now show the properties
    of the <form>
    tag. In the Property Inspector, to the right of the ACTION
    line, click the
    folder icon and browse to and select the anythingyouwant.php
    file
    you've saved to within this site.
    5b) now click within the form area and go to dw
    menu-->Insert-->Form
    Objects-->Hidden Field
    This inserts a hidden form field.
    In the property inspector, change the NAME/ID of this field
    to: recipient
    And the VALUE of this field to: me
    the code should look like:
    <input name="recipient" type="hidden" id="recipient"
    value="me">
    This tells the script to use the "me" recipient_alias value
    as the email
    address to send the form to.
    5c: Do you have a form field to collect the user's email
    address?
    If yes, if this field is named exactly "email" then the
    script will use the
    user's email as the reply to in the outgoing email
    6) Save and upload the form page.
    Try the form from the website.
    Optional:
    1-make a new page for a thank you for submitting message.
    In the form, insert another hidden field.
    Name: redirect
    Value:  the full absolute
    http:// address to the new thank you page.
    If you don't set a redirect value- the form script will build
    a "thank you,
    here is what you submitted" page. If you want to use that
    dynamic page-
    upload the .css file that it uses.
    2- If you have a field in the form to collect the visitor's
    email address,
    IF you name this field  in the form exactly  
     email   then the visitor's
    email address will be the Reply To address in the outgoing
    email.
    There are 30 or so other optional form fields to control the
    form- see the
    readme in the docs folder. One of those optional control
    fields is
    verification.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • CGI script for simple form

    Can anyone give me a CGI script that will make a form
    automatlly e-mail the information gathered from an online form?
    Can that code be placed right into the html file?

    There are only two ways to process form data -
    1. Use mailto:[email protected] as the action of the form
    2. Use a server-side scripting method to a) harvest the
    form's data, b)
    process it in some manner, e.g., enter it into a database, c)
    formulate and
    send an email to one or more email recipients, and d)
    redirect the visitor
    to some ending page
    Method 1 is quite simple, and is also the least reliable. It
    depends both
    on your visitor having an email client already installed on
    their computer -
    this eliminates public computers, or home users without email
    clients
    installed (more and more it seems) - and on the installed
    email client
    responding to
    the mailto call. It is not possible to use this method *and*
    send the
    visitor to a
    thank you page as well.
    Method 2a is the preferred method, since it eliminates the
    problems of
    method
    1, but it means that you have to grapple with
    server-scripting somehow (ASP,
    CF, PHP, perl, etc.).
    Method 2b would be to use some third-party form processing,
    like
    http://www.bebosoft.com/products/formstogo/,
    or if your server supports PHP,
    you could investigate
    http://www.geekministry.com/formbuilder/,
    a very nice
    product by a frequent poster here.
    You would have to decide which of these methods is best for
    your needs,
    but if it's Method 2a, then start by asking your host what
    they provide for
    form
    processing. If it's 2b, then read their FAQ/instructions
    carefully.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "inhouse7" <[email protected]> wrote in
    message
    news:gda6ap$79k$[email protected]..
    > Can anyone give me a CGI script that will make a form
    automatlly e-mail
    > the information gathered from an online form?
    > Can that code be placed right into the html file?

  • Need help with PHP mail script [was: Can someone please help me?]

    I'm trying to collect data from a form and email it.  I'm using form2mail.php and the problem is that the email is not collecting the form info and it has the same email address in the From: and To: lines. I'm really stuck and would appreciate any help.
    Here is the HTML code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Contact Us</title>
    <style type="text/css">
    <!--
    .style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
    .style2 {
    font-size: 14px;
    color: #000000;
    body {
    background-color: #FFFFFF;
    body,td,th {
    color: #CC3300;
    .style3 {font-size: 14px; font-weight: bold; }
    .style6 {font-size: 18px}
    .style7 {font-size: 16px}
    .style8 {font-size: 16px; font-family: Verdana, Arial, Helvetica, sans-serif; }
    .style9 {font-size: 16px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; }
    .style10 {color: #000000}
    -->
    </style>
    </head>
    <body>
    <div align="center"><img src="nav2.jpg" alt="nav bar" width="698" height="91" border="0" usemap="#Map2" />
      <map name="Map2" id="Map2">
      <area shape="rect" coords="560,9,684,38" href="accessories.html" />
    <area shape="rect" coords="456,8,548,38" href="contact.html" />
    <area shape="rect" coords="305,8,435,40" href="photog.html" />
    <area shape="rect" coords="187,9,283,39" href="services.html" />
    <area shape="rect" coords="81,10,167,39" href="aboutus.html" />
    <area shape="rect" coords="5,10,68,39" href="index.html" />
    </map>
      <map name="Map" id="Map">
        <area shape="rect" coords="9,9,69,39" href="index.html" />
        <area shape="rect" coords="83,11,165,39" href="aboutus.html" />
        <area shape="rect" coords="182,9,285,38" href="services.html" />
        <area shape="rect" coords="436,14,560,37" href="contact.html" />
        <area shape="rect" coords="563,14,682,38" href="accessories.html" />
      </map>
    </div>
    <p> </p>
    <form id="TheForm" name="TheForm" action="form2mail.php" method="post">
      <p align="center" class="style2">P<span class="style1">lease fill out form below for a &quot;free no obligation quote&quot; then click submit.</span></p>
      <p align="center" class="style3">(*Required Information)</p>
      <div align="center">
        <pre><strong><span class="style8">*Contact Name</span> </strong><input name="name" type="text" id="name" />
    <span class="style8"><strong>
    Business Name </strong></span><input name="bn" type="text" id="bn" />
    <span class="style8"><strong>*Phone Number <input type="text" name="first" size="3" onFocus="this.value='';"
        onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.second);" maxlength="3" value="###" /> - <input type="text" name="second" size="3" onFocus="this.value='';" onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.third);" maxlength="3" value="###" /> - <input type="text" name="third" size="4" onFocus="this.value='';" onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.fourth);" maxlength="4" value="####"/> </strong></span>
    <strong><span class="style1">*</span><span class="style8">Email Address</span> <input name="email" type="text" id="email" />     </strong> </pre>
        <label><span class="style9">*Re-enter to confirm</span>
        <input name="emx" type="text" id="emx" /></label><br /><br /><span class="style9">
    <label></label>
        </span>
        <p><span class="style9">*Best time to call </span>
          <select name="name1[]" multiple size="1" >
            <option>8am-9am</option>
            <option>9am-10am</option>
            <option>10am-11am</option>
            <option>11am-12pm</option>
            <option>12pm-1pm</option>
            <option>1pm-2pm</option>
            <option>2pm-3pm</option>
            <option>3pm-4pm</option>
            <option>4pm-5pm</option>
            <option>5pm-6pm</option>
            <option>6pm-7pm</option>
            <option>7pm-8pm</option>
          </select>
          <br />
          <br />
          <span class="style9">Type of Location</span>
          <select name="name2[]" multiple size="1" >
            <option>Residential</option>
            <option>Commercial</option>
          </select>
          <br />
          <br />
            <span class="style1"><br />
            <strong><br />
              <span class="style6">*Type of Services Requested:</span></strong><br />
            </span><strong><span class="style10">(check all that apply)</span><br />
                </strong><br />
                <span class="style7"><span class="style1"><strong>Janitorial cleaning</strong></span>
                <input type="checkbox" name="checkbox[]" value="checkbox" multiple/>
                <br />
                </span><strong><br />
                  <span class="style8">Mobile Auto Detailing</span>
                <input type="checkbox" name="checkbox2[]" value="checkbox" multiple/>
                <br />
                <br />
                  </strong><span class="style9">Moving/Hauling</span>
          <input type="checkbox" name="checkbox3[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Pressure washing</span>
          <input type="checkbox" name="checkbox4[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Window washing</span>
          <input type="checkbox" name="checkbox5[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Window Tinting</span>
          <input type="checkbox" name="checkbox6[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Boat cleaning</span>
          <input type="checkbox" name="checkbox7[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">RV cleaning</span>
          <input type="checkbox" name="checkbox8[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Motorcycle cleaning</span>
          <input type="checkbox" name="checkbox9[]" value="checkbox" multiple/>
          <br />
          <br />
          <br />
          <br />
          <input name="SB"  type="button" class="style9" value="Submit" onClick="sendOff();">
        </p>
      </div></label>
      <script language="JavaScript1.2">
    // (C) 2000 www.CodeLifter.com
    // http://www.codelifter.com
    // Free for all users, but leave in this  header
    var good;
    function checkEmailAddress(field) {
    // Note: The next expression must be all on one line...
    //       allow no spaces, linefeeds, or carriage returns!
    var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org) |(\..{2,2}))$)\b/gi);
    if (goodEmail){
       good = true
    } else {
       alert('Please enter a valid e-mail address.')
       field.focus()
       field.select()
       good = false
    function autoTab(startPoint,endPoint){
    if (startPoint.getAttribute&&startPoint.value.length==startPoint.getAttribute("max length"))
    endPoint.focus();
    function checkNumber(phoneNumber){
    var x=phoneNumber;
    var phoneNumber=/(^\d+$)|(^\d+\.\d+$)/
    if (phoneNumber.test(x))
    testResult=true
    else{
    alert("Please enter a valid number.")
    phoneNumber.focus();
    phoneNumber.value="";
    testResult=false
    return (testResult)
    function sendOff(){
       namecheck = document.TheForm.name.value   
       if (namecheck.length <1) {
          alert('Please enter your name.')
          return
       good = false
       checkEmailAddress(document.TheForm.email)
       if ((document.TheForm.email.value ==
            document.TheForm.emx.value)&&(good)){
          // This is where you put your action
          // if name and email addresses are good.
          // We show an alert box, here; but you can
          // use a window.location= 'http://address'
          // to call a subsequent html page,
          // or a Perl script, etc.
          window.location= 'form2mail.php';
       if ((document.TheForm.email.value !=
              document.TheForm.emx.value)&&(good)){
              alert('Both e-mail address entries must match.')
    </script>
    </form>
    <p> </p>
    </body>
    </html>
    and here is the form2mail.php:
    <?php
    # You can use this script to submit your forms or to receive orders by email.
    $MailToAddress = "[email protected]"; // your email address
    $redirectURL = "http://www.chucksmobile.com/thankyou.html"; // the URL of the thank you page.
    $MailSubject = "[Customer Contact Info]"; // the subject of the email
    $sendHTML = FALSE; //set to "false" to receive Plain TEXT e-mail
    $serverCheck = FALSE; // if, for some reason you can't send e-mails, set this to "false"
    # copyright 2006 Web4Future.com =================== READ THIS ===================================================
    # If you are asking for a name and an email address in your form, you can name the input fields "name" and "email".
    # If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.
    # To block an IP, simply add it to the blockip.txt text file.
    # CHMOD 777 the blockip.txt file (run "CHMOD 777 blockip.txt", without the double quotes)
    # This is needed because the script tries to block the IP that tried to hack it
    # If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
    # you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple>
    # you have to do the same with checkboxes
    Web4Future Easiest Form2Mail (GPL).
    Copyright (C) 1998-2006 Web4Future.com All Rights Reserved.
    http://www.Web4Future.com/
    This script was written by George L. & Calin S. from Web4Future.com
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ===================================================
    $w4fver =  "2.2";
    $ip = ($_SERVER['HTTP_X_FORWARDED_FOR'] == "" ? $_SERVER['REMOTE_ADDR'] : $_SERVER['HTTP_X_FORWARDED_FOR']);
    //function blockIP
    function blockip($ip) {
    $handle = @fopen("blockip.txt", 'a');
    @fwrite($handle, $ip."\n");
    @fclose($handle);
    $w4fx = stristr(file_get_contents('blockip.txt'),getenv('REMOTE_ADDR'));
    if ($serverCheck) {
    if (preg_match ("/".str_replace("www.", "", $_SERVER["SERVER_NAME"])."/i", $_SERVER["HTTP_REFERER"])) { $w4fy = TRUE; } else { $w4fy = FALSE; }
    } else { $w4fy = TRUE; }
    if (($w4fy === TRUE) && ($w4fx === FALSE)) {
    $w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body><font face=3Dverdana size=3D2>";
    if (count($_GET) >0) {
    reset($_GET);
    while(list($key, $val) = each($_GET)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
       $w4fMessage .= "<b>$key:</b> ";
       foreach ($val as $vala) {
        $vala =stripslashes($vala);
        $vala = htmlspecialchars($vala);
        if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
        $w4fMessage .= "$vala, ";
       $w4fMessage .= "<br>\n";
      else {
       $val = stripslashes($val);
       if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
       if (($key == "Submit") || ($key == "submit")) { } 
       else {  if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
         else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
    } // end while
    }//end if
    else {
    reset($_POST);
    while(list($key, $val) = each($_POST)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
       $w4fMessage .= "<b>$key:</b> ";
       foreach ($val as $vala) {
        $vala =stripslashes($vala);
        $vala = htmlspecialchars($vala);
        if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }   
        $w4fMessage .= "$vala, ";
       $w4fMessage .= "<br>\n";
      else {
       $val = stripslashes($val);
       if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
       if (($key == "Submit") || ($key == "submit")) { } 
       else {  if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
         else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
    } // end while
    }//end else
    $w4fMessage .= "<font size=3D1><br><br>\n Sender IP: ".$ip."</font></font></body></html>";
        $w4f_what = array("/To:/i", "/Cc:/i", "/Bcc:/i","/Content-Type:/i","/\n/");
    $name = preg_replace($w4f_what, "", $name);
    $email = preg_replace($w4f_what, "", $email);
    if (!$email) {$email = $MailToAddress;}
    $mailHeader = "From: $name <$email>\r\n";
    $mailHeader .= "Reply-To: $name <$email>\r\n";
    $mailHeader .= "Message-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\n";
    $mailHeader .= "MIME-Version: 1.0\r\n";
    if ($sendHTML) {
      $mailHeader .= "Content-Type: multipart/alternative;";  
      $mailHeader .= "  boundary=\"----=_NextPart_000_000E_01C5256B.0AEFE730\"\r\n";    
    $mailHeader .= "X-Priority: 3\r\n";
    $mailHeader .= "X-Mailer: PHP/" . phpversion()."\r\n";
    $mailHeader .= "X-MimeOLE: Produced By Web4Future Easiest Form2Mail $w4fver\r\n";
    if ($sendHTML) {
      $mailMessage = "This is a multi-part message in MIME format.\r\n\r\n";
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";
      $mailMessage .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";  
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";  
      $mailMessage .= "Content-Type: text/html;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= "$w4fMessage\r\n\r\n";  
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730--\r\n";  
    if ($sendHTML === FALSE) {
      $mailHeader .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";  
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader)) { echo "Error sending e-mail!";}
    else { header("Location: ".$redirectURL); }
    } else { echo "<center><font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font></center>";}
    ?>
    Thanks in advance,
    Glenn
    [Subject line edited by moderator to indicate nature of request]

    Using PHP to process an online form and send the input by email is very simple. The mail() function takes a minimum of three arguments, namely: the address the mail is being sent to, the subject line, and the body of the email as a single string. The reason some people use scripts like form2mail.php is because they don't have the knowledge or patience to validate the user input to make sure it's safe to send.
    Rather than attempt to trawl through your complex form looking for the problems, I would suggest starting with a couple of simple tests.
    First of all, create a PHP page called mailtest.php containing the following script:
    <?php
    $to = '[email protected]'; // use your own email address
    $subject = 'PHP mail test';
    $message = 'This is a test of the mail() function.';
    $sent = mail($to, $subject, $message);
    if ($sent) {
      echo 'Mail was sent';
    } else {
      echo 'Problem sending mail';
    ?>
    Save the script, upload it to your server, and load it into a browser. If you see "Mail is sent", you're in business. If not, it probably means that the hosting company insists on the fifth argument being supplied to mail(). This is your email address preceded by -f. Change the line of code that sends the mail to this:
    $sent = mail($to, $subject, $message, null, '[email protected]');
    Obviously, replace "[email protected]" with your own email address.
    If this results in the mail being sent successfully, you will need to adapt the code in form2mail.php to accept the fifth parameter. You need to change the following line, which is a few lines from the end of the script:
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader))
    Change it to this:
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader, '[email protected]'))
    Again, use your own email address instead of "[email protected]".
    Once you have determined whether you need the fifth argument, test form2mail.php with a very simple form like this:
    <form id="form1" name="form1" method="post" action="form2mail.php">
      <p>
        <label for="name">Name:</label>
        <input type="text" name="name" id="name" />
      </p>
      <p>
        <label for="email">Email:</label>
        <input type="text" name="email" id="email" />
      </p>
      <p>
        <label>
          <input type="checkbox" name="options[]" value="boat cleaning" id="options_0" />
          Boat cleaning</label>
        <br />
        <label>
          <input type="checkbox" name="options[]" value="RV cleaning" id="options_1" />
          RV cleaning</label>
        <br />
        <label>
          <input type="checkbox" name="options[]" value="motorcycle cleaning" id="options_2" />
          Motorcycle cleaning</label>
      </p>
      <p>
        <input type="submit" name="send" id="send" value="Submit" />
      </p>
    </form>
    If that works, you can start to make the form more complex and add back your JavaScript validation.

  • How do I control data transfer rate from Java applications to CGI scripts?

    Hi. I've written a test cgi script which echoes any data it's sent back to the client, and I'm trying to write a java application that reads data from files on my hard drive and sends it to the cgi application.
    The method I've used is the same as the one described in the tutorial on this site, ie. create an URL object, open an URLConnection, get output stream from URLConnection, write data to output stream.
    The problem however is that the java application writes to the output stream at a much faster rate than my internet connection can handle, and so when I try to send more than a few kb the data doesn't seem to get sent at all. Is there some way I can control the rate at which data is sent, or is there a better way of sending data to a cgi application?
    I'd really appreciate any help, thanks!
    Ose.

    I've done some experimenting, and it seems that the problem is with my CGI application and not the Java application after all! (sigh) I wish I hadn't spent those duke dollars now. Oh well.

  • How to include html generated by a cgi-script ?

    Here's the problem:
    I need to include an html-header dynamically generated by a cgi-script: "web_nav.cgi" into my jsp-page.
    According to some documentation the <jsp:include page=... tag can only be used to include servlet, jsp or html files, and according to other sources it doesn't matter what technology the target uses, as long as it delivers html....
    I get a "..include failed, only jsp or html files can be included" error messsage so maybe the first theory is correct.
    But the problem remains: If not with the <jsp:include tag , How do I do it??
    Fast help would be really appreciated.
    Thnx a bunch.
    /Henrik

    Hi Henrik,
    1. the <jsp:include page="local_url" flush="true"/>
    works for local url which is context-relative only
    (within the same server and same context -application-)
    2. So where is your web_nav.cgi ? is it local or remote
    (on another server)
    3. You can do it, look into the jsp book or documentation
    for either jsp:include action and jsp:include directive for your need.
    --Paul

  • Flash based uploader script problem. V18.0 came with this bug!

    i am a web developer. everything works fine on firefox every time and my first browser which i always use it is firefox... but only a problem, never solved. FLASH UPLOAD PROBLEM.. there is a IO Error problem and it has never been solved... But with 18.0 version update , i had a new problem with Uploadify (flash based upload script). There is a session problem. this problem has never been before 18.0.. and my script works on other web browsers correctly now.
    i post data PHPSESSID from flash plugin, then write to top of php uploader script session_id(POST_DATA) ; session_start(); but still problem has not been solved.

    I got exact same issue... cant upload files with the flash uploader... it just closes and the files doesnt get finished uploading.
    This kinda sucks as you cant upload more then one file with the browser uploader....

  • WebLogic 6.1SP3: CGI Script Displayed, Not Processed

    I've setup CGI support in my WebLogic 6.1SP3 installation, on my Solaris box. I am attempting to run a simple script that prints a message to the screen/browser. When I attempt to run the CGI script, I see the contents of the script on screen. The script is never actually processed.
    Has anyone else encountered such a problem?

    Hi Rick,
    Just a shot in the dark, but does the script have eXecute privs? You
    should ask your question in the webserver newsgroup group:
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.webserver&utag=
    Thanks,
    Bruce
    Rick wrote:
    >
    I've setup CGI support in my WebLogic 6.1SP3 installation, on my Solaris box. I am attempting to run a simple script that prints a message to the screen/browser. When I attempt to run the CGI script, I see the contents of the script on screen. The script is never actually processed.
    Has anyone else encountered such a problem?

  • Servlet engine invoked FROM CGI script?

    Yes this is a backwards request, but I need a simple servlet engine that can be invoked through a CGI script. I perfectly realize the problems associated with this like session management, benefits in threading, etc not to mention the overhead of JVM startup on each request...
    Anything with which anyone's familiar? Searching returns (of course) how to invoke CGI from Servlet containers which is obviously not what I need.
    Thanks!

    Hi Michael,
    I am running 7.0 on Win NT while its the same case its displaying the whole content
    as it is setted the weblogic.servlet.CGIServlet in the web.xml file and providing
    the compiler for perl also .
    Looking for a quick reply
    Thanks
    Shivani
    Michael Young <[email protected]> wrote:
    Hi.
    What platform/OS version are you running WLS on?
    Thanks,
    Michael
    Suren Jain wrote:
    Hi,
    We are having problems invoking cgi scripts from the browser.
    When we try to access it, it is not executed, instead the script is displayed
    in the browser.
    We are using weblogic 5.1 and sp9.
    In the properties file we have specified
    weblogic.httpd.register.cgi-bin=weblogic.servlet.CGIServlet
    weblogic.httpd.initArgs.cgi-bin=\
    cgiDir=/opt/equitydev/geo/cgi-bin,\
    *.pl=/usr/local/bin/perl5,\
    *.sh=/bin/ksh
    Appreciate your help.
    Thanks
    Suren.--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • "cannot execute CGI script " error

    Greetings.
    I am trying to setup a Sun One version 6.1 server. When I try to run a simple cgi script, with a .pl suffix, I get:
    "cannot execute CGI script "
    Is there anything in particular I should look for in resolving hte problem ?
    Thanks.
    alan

    One thing I'd like to mention is this document:
    Document ID: 75347
    Title: Sun[TM] ONE WebServer 6 - cannot execute CGI script - Permission denied
    which states:
    case 2: The value for the chroot is NOT set and NO rights are granted
    for cgi's to execute anywhere.
    <PROPERTY name="chroot" value=""/>
    Note that the value of "value=" above will differ from your setup but that
    the location of the line within the server.xml file should be easily
    identifiable by the formatting described above.
    To quickly identify a fix, grant permissions from the root level by
    modifying the line to look thus:
    <PROPERTY name="chroot" value=""/>
    The problem and fix look to be the same. Any idea what the fix should look like ?
    Thanks.
    alan

  • Error running HAL routine from a perl cgi script via a browser

    Hi,
    I'm getting an error while trying to run a HAL routine from a perl- cgi initiated from a web browser. Perl-Cgi script runs fine when run from command line.
    07/23/2010|183648|N/A|Info|N/A|Analytic Services Adapter Log File Started
    07/23/2010|183648|AppName/Plan2|Info|Connect|Method Started
    07/23/2010|183648|AppName/Plan2*|Error|Connect|java.lang.UnsatisfiedLinkError: no HssJNIDriver950 in java.library.path*
    07/23/2010|183648|AppName/Plan2|Error|Connect|Method Ended - Connect completed with exceptions.
    07/23/2010|183648|N/A|Info|N/A|Analytic Services Adapter Log File Ended
    I've added the following env. variables in Apache server's httpd.conf file
    SetEnv ARBORPATH "E:\\Hyperion\\products\\Essbase\\EssbaseClient"
    SetEnv APS_HOME "E:\\Hyperion\\products\\Essbase\\aps"
    SetEnv ESSLANG "English_UnitedStates.Latin1@Binary"
    SetEnv EASPATH "E:\\Hyperion\\products\\Essbase\\eas\\server"
    SetEnv HYPERION_HOME "E:\\Hyperion"
    SetEnv ESSBASEPATH "E:\\Hyperion\\products\\Essbase\\EssbaseClient"
    SetEnv EAS_HOME "E:\Hyperion\products\Essbase\eas\console"
    SetEnv CLASSPATH "E:\\Vignette\\V7\\vbis\\Hyperion\\EssbaseAdapter"
    SetEnv PATH "E:\\Hyperion\\common\\ADM\\9.5.0.0\\Essbase\\9.5.0.0\\bin;E:\\Vignette\\V7\\vbis\\Hyperion\\EssbaseAdapter\\adm;C:\\Program Files (x86)\\Java\\jre1.5.0_17\\bin\\;E:\\Hyperion\\products\\Essbase\\EssbaseClient\\bin;E:\\Hyperion\\products\\Essbase\\EssbaseClient;E:\\Hyperion\\common\\CSS\\9.5.0.0\\bin;E:\\Hyperion\\products\\Essbase\\eas\\console\\bin;"
    Any pointers would be appreciated.
    Thanks in Advance!!

    Vipul,
    Vipul Sanghvi wrote:
    I am facing problem in running a Perl CGI Script on Weblogic
    Application
    Server
    I set the CGIServlet Property in the Weblogic Properties file as
    weblogic.httpd.register.cgi-bin=weblogic.servlet.CGIServlet
    weblogic.httpd.initArgs.cgi-bin=\
    cgiDir=/weblogic/myserver/public_html/cgi-bin,\
    *.pl=/bin/perl.exe,\It shouldn't end with ,\ right?
    Was it a mistake?
    -Kumar
    >
    I installed the Perl on my system and put the perl exe in the bin
    directory
    of the Weblogic App Server. But I am getting the error "failed to
    execute
    the test.pl ". Where test.pl is a simple test perl script.
    APP server ver is WLE5 Beta[att1.html]

  • [SOLVED] nginx, php-cgi, rewrite url, 502 bad gateway.

    Hello everyone.
    I just set my nginx server, with php-cgi, as it is in the wiki site and it is working perfectly. I have just one problem. I am trying to rewrite my url, and I got an error after several refreshes.
    This is my site configuration.
    server {
    listen 80;
    server_name localhost testwebsite testwebsite.homelinux.org;
    access_log logs/testwebsite.access.log main;
    location / {
    root /home/www/testwebsite;
    index index.php;
    if (!-e $request_filename) {
    rewrite ^/(.*)$ /index.php?path=$1 last;
    #rewrite ^/((.*)[^/])$ /index.php?path=$1 last;
    location ~ \.php$ {
    #root www;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME /home/www/testwebsite/$fastcgi_script_name;
    include fastcgi_params;
    When I am not trying to rewrite the url, everything is ok, but when I try to rewrite it, after several refreshes on the page, I got nginx error: 502 bad gateway, and the cgi deamon stops to work.
    When I restart the fastcgi (I am using the example /etc/rc.d/fastcgi file as it is in the wiki) the web site is working again for several refreshes, and then the fastcgi stops again and I got the bad gateway again.
    Can someone tell me what is wrong with my rewrite rule, please.
    Regards.
    Last edited by Gruntz (2010-04-08 15:58:50)

    I fixed it with that rewrite:
    rewrite  ^([^.]*)$  /index.php?path=$1;

  • Invoke CGI script in JSP?

    Hello All:
    I tried to use:
    <jsp:include flush="true" page="/cgi/test.cgi">to invoke CGI script. The problem is the parameters in request were not passed to CGI. There is no this issue if page invoked is JSP.
    I am using SunONE Web Server 6.1
    I appreciate you for any consideration.

    Well, you can only do that when the new page is complete - probably in the onload event. Which means you have to tell it which field you want to focus - probably by submitting an extra parameter.
    Heres a working example:
    <html>
    <head>
    <script language="javascript">
      function saveCurrentField(field){
        document.forms[0].currentField.value = field.name;
      function focusLastField(){
        var lastField = "${param.currentField}";
        document.forms[0][lastField].focus();
    </script>
    </head>
    <body onload="focusLastField()">
    <h1>Testing jsp to focus a field on load of the page</h1>
    <form>
    <table>
    <tr><td>Name:</td><td><input type="text" name="name" value="${param.name}" onchange="saveCurrentField(this); this.form.submit();"></td></tr>
    <tr><td>email:</td><td> <input type="text" name="email" value="${param.email}" onchange="saveCurrentField(this); this.form.submit();"></td></tr>
    <tr><td>Age:</td><td>
      <select name="age" onchange="saveCurrentField(this); this.form.submit();">
        <option>  0-20
        <option> 21-40
        <option> 41-60
        <option> 60+
      </select>
    </td></tr>
    </table>
    <input type="hidden" name="currentField">
    </form>
    </body>
    </html>I wrote it using EL expressions.
    If you don't have a JSP2.0 container, or EL is not enabled, replace those ${param.xxxxxx} expressions with <%= request.getParameter"xxxxxxx") %>
    Cheers,
    evnafets

Maybe you are looking for

  • How do I import AVI video with stereo audio (and keep it that way)?

    Today I just discovered that all the AVI video with stereo audio I've ever imported into a Premiere Pro CS6 project has been mysteriously converted to mono. And I can't find any import setting anywhere that enable me to change this. Here's the deal..

  • Old ipod dock bepps when ipod docked but new universal dosent...

    This other day i tried my ipod on my friends 40GB 4th Gen iPod (not color display) and my 30GB iPod Video fit so i put it in and when i put in in it did like to little beep/chirp sounds like that mean that the ipod is well connected.... but i just bo

  • Sending mail alert in obiee 11g

    Hi I am using obiee 11.1.1.7 (SampleApp Virtual Appliance 305). I have configured in EM & created alert but not able to send mail. I thing i have to do some modification in instanceconfig.xml & biee-domain.xml, can anyone please tell me by which code

  • Download error 5000 when downloading the LP for the Lifehouse Deluxe Smoke

    I've been having this problem for the pass couple of days. I have been in contact with itunes and they were unable to resolve my issue. Wondering if anyone here is having this problem or had it and was able to resolve it. So anyways I downloaded the

  • Oralce Error - ORA-01722 WARN  [org.hibernate.dialect.Oracle9Dialect]

    Hi. i want to know meaning of following Error and how to remove it. ORA-01722 WARN [org.hibernate.dialect.Oracle9Dialect] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead Regards, Pradeep Kr. Shar