Solved

Firefox 1.xx bug on Macs

Posted on 2007-03-26
9
444 Views
Last Modified: 2008-02-01
When users try to sign up for an account using Firefox version 1.xx on a Mac, the get prompted to download a file (the next page) after hitting submit. Since I don't have a Mac, this is becoming very difficult to debug.

Here is the page:

http://ww.petelavelle.com/adMan/signUp.php

The code for the page is located here:

http://www.petelavelle.com/download/Signup.zip

Can someone help me figure out what is going wrong?
0
Comment
Question by:PLavelle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
9 Comments
 

Author Comment

by:PLavelle
ID: 18795167
Oops... here is the page:

http://ww.petelavelle.com/adMan/signUp.php
0
 

Author Comment

by:PLavelle
ID: 18795177
<?php

      require("globals.php");

      $formBean = new FormBean();
      
      $formBean->addField(new TextField("company", "Company Name", REQUIRED, 40, 1, 20));
      $formBean->addField(new PersonNameField("name", "Contact's Name", REQUIRED));
      $formBean->addField(new EmailAddrField("email", "Contact's Email", REQUIRED));
      $formBean->addField(new UsernameField("user", "Username", REQUIRED));
      $formBean->addField(new PickPasswordField("password", "Password", REQUIRED));
      $formBean->addField(new PickPasswordField("password2", "Retype Password", REQUIRED));
      $formBean->addField(new PasswordQuestionField("password_question", "Password Question", REQUIRED, "[Select One]"));
      $formBean->addField(new PasswordAnswerField("password_answer", "Password Answer", REQUIRED));
      $formBean->addField(new CountryField("country", "Country", REQUIRED, "[Select One]"));
      $formBean->addField(new StateField("state", "State (If in USA)", NOT_REQUIRED, " "));
      $formBean->addField(new TextField("referrer", "How Did You Hear About Us?", NOT_REQUIRED, 40, 1, 30));
      $formBean->addField(new CheckboxField("nationwide_advertiser", "" .
            "Check here if you would like to be <br/>" .
            "listed on our <a href='../nationwideListings.php' target='_blank'>‘Nationwide Listings’</a> page."));
      $formBean->addField(new SubmitField("_submit", "Submit"));
      $formBean->addField(new SubmitField("cancel", "Cancel"));
      
      $formBean->getParameters();
      
      if ($formBean->getValue("_submit")) {
            if (strcmp($formBean->getValue("country"), "United States") == 0)
                  $formBean->formFields["state"]->checkForBlank();
            if (!($formBean->getValue("password") === $formBean->getValue("password2"))) {
                  $formBean->setError("password2", "does not match Password!");
            }
            if ($formBean->checkValues()) {
                  $sql =
                        "INSERT INTO " . AD_MAN_TABLE_PREFIX . "users "
                              . "(username,name,password,password_question,"
                                    . "password_answer,email,inserted_on) "
                              ."VALUES "
                              . "(" . $formBean->getDbValue("user") . ","
                                    . $formBean->getDbValue("name") . ","
                                    . "MD5(" . $formBean->getDbValue("password") . "),"
                                    . $formBean->getDbValue("password_question") . ","
                                    . $formBean->getDbValue("password_answer") . ","
                                    . $formBean->getDbValue("email") . ",NOW())";
                  if (!gmysql_query($sql, true)) {
                        $formBean->setError("user", "already exists");
                  } else {
                        $userId = getSimpleValue("SELECT user_id FROM " . AD_MAN_TABLE_PREFIX . "users WHERE username=" . $formBean->getDbValue("user"));
                        gmysql_query(
                              "INSERT INTO " . AD_MAN_TABLE_PREFIX . "advertisers "
                                    . "(user_id,company,referrer,country,state,nationwide_advertiser) VALUES "
                                    . "('" . $userId . "', "
                                    . $formBean->getDbValue("company") . ", "
                                    . $formBean->getDbValue("referrer") . ", "
                                    . $formBean->getDbValue("country") . ", "
                                    . $formBean->getDbValue("state") . ", "
                                    . $formBean->getDbValue("nationwide_advertiser")
                                    . ")"
                        );
                        
                        $groupId = getSimpleValue("SELECT group_id FROM " . AD_MAN_TABLE_PREFIX . "groups WHERE name='Advertiser'");

                        gmysql_query("INSERT INTO " . AD_MAN_TABLE_PREFIX . "group_members (group_id,user_id) VALUES ('" . $groupId . "','" . $userId . "')", true);
                        
                        // Create default campaign
                        gmysql_query("INSERT INTO " . AD_MAN_TABLE_PREFIX . "campaigns (user_id,campaign_name,inserted_on) VALUES ('" .  $userId . "','Campaign #1',NOW())");
                        
                        login($userId, $formBean->getValue("user"));
                        
                        $message = wordwrap(
                              "Dear " . $formBean->getValue("name") . ",\n\n"
                              . "Thank you for signing up for an AdMan advertiser account on " . $GLOBALS["PREFS"]["company_url"] . ".\n\n"
                              . "Here is your new account info:\n"
                              . "Username: " . $formBean->getValue("user") . "\n"
                              . "Password: (Not displayed for security reasons).\n\n"
                              . "You can login at " . $GLOBALS["AD_MAN_ROOT_URL"] . "\n\n"
                              . __SIGNATURE,
                              __WRAP_EMAIL_LENGTH
                        );
                        mail($formBean->getValue("email"), "New Advertiser Account", $message, "From: " . __CONTACT_EMAIL);
                        
                        if($formBean->getValue("nationwide_advertiser")){
                              $message = wordwrap(
                                    "A new nationwide advertiser has signed up for an account." . ",\n\n"
                                    . "Contact name: " . $formBean->getValue("name") . ".\n"
                                    . "Contact email: " . $formBean->getValue("email") . ".\n"
                                    . "Company: " . $formBean->getValue("company") . ".\n"
                                    . "State: " . $formBean->getValue("state") . ".\n"
                                    . "Country: " . $formBean->getValue("country") . ".\n\n"
                                    . __SIGNATURE,
                                    __WRAP_EMAIL_LENGTH
                              );
                              mail(__CONTACT_EMAIL, "New Nationwide Advertiser", $message, "From: " . __CONTACT_EMAIL);
                        }

                        if ($_REQUEST["goTo"]) {
                              $goToUrl = $_REQUEST["goTo"];
                        } else {
                              $goToUrl = "advertiser/listCampaigns.php";
                        }
                        header("Location: confirmation.php?msg=" . rawurlencode("Advertiser Account Created") . "&goTo=" . urlencode($goToUrl));
                        exit();
                  }
            }
      }
      
      if ($formBean->getValue("cancel")) {
            header("Location: index.php");
            exit();
      }
      
?>

<html>

<head>
<title>Advertiser Sign Up</title>
<? require("section1.php"); ?>
</head>

<body onLoad="setFocus();">

      <? require("section2.php"); ?>

      <h1 class="FORMfields">
            Advertiser Sign Up
      </h1>
      <table class="tableHelpers">
            <tr class="tableHelpersFormFields">
                  <td class="tableHelpersFormFields1" style="width:600px">
                              <STRONG><B><FONT face=Verdana color=red><SPAN
                          style="COLOR: red; FONT-FAMILY: Verdana">NOTE TO MAC
                          USERS:</SPAN></FONT></B></STRONG>
                          <DIV>
                          <P><FONT face=Verdana><SPAN
                          style="FONT-FAMILY: Verdana">We are currently experiencing
                          some problems with accounts setup by users on Mac computers. If you are
                          signing up for an account on a Mac, please do not use the Safari browser. Your
                          account will not be activated. You&nbsp;may use the Firefox browser, but
                          please note:&nbsp;once you create your account, you will be prompted to
                          download a confirmation page. Once downloaded, it will look like nothing has
                          happened. Please then return to the main&nbsp;login page and login with the
                          username and password you just created. Your account should be
                          active.</SPAN></FONT></P></DIV>
                  </td>
            </tr>
      </table>
 
      <form action="" method="post">
            <?= $formBean->getTableTag() ?>
      </form>
      
      <? require("section3.php"); ?>

</body>


</html>
0
 

Author Comment

by:PLavelle
ID: 18795184
I think this line is causing the download prompt:

                        header("Location: confirmation.php?msg=" . rawurlencode("Advertiser Account Created") . "&goTo=" . urlencode($goToUrl));

0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 11

Accepted Solution

by:
walkerke earned 167 total points
ID: 18796726
Other than getting a database error that "Column 'nationwide_advertiser' cannot be null" if I didn't check the box at the bottom, it worked find for me. I'm using Firefox 1.5.0.11 on MacOSX Tiger.

By the way, you have some users "test11, test12, test13, & test14" that can be deleted now.
0
 

Author Comment

by:PLavelle
ID: 18796793
Sorry about that. The null error is fixed.

Thanks for testing it for me.

Could a couple more people do a test for me? I am stuck without a Mac for the time being.
0
 
LVL 14

Assisted Solution

by:cracky
cracky earned 333 total points
ID: 18824247
Works fine for me in Firefox 1.5.x, Firefox 2.x and Safari 2.0.4.

Can your users still reproduce this error? What exact version of Firefox are they using?
0
 

Author Comment

by:PLavelle
ID: 18824272
Would you mind trying to sign up on the live site?

http://www.weddingwarehouse.com/adMan/signUp.php

I appreciate your time. This one is very tough for me to debug because I don't have a Mac.
0
 
LVL 14

Assisted Solution

by:cracky
cracky earned 333 total points
ID: 18824322
Works fine for me in Firefox 1.5.x, Firefox 2.x and Safari 2.0.4 :)
0
 

Author Comment

by:PLavelle
ID: 18824341
Thank you very much!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use 2 ON statements in inner join 3 27
JSON decode 5 22
Do not understand error message 3 29
Problem with sound with Bose headset 3 8
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
The viewer will learn how to dynamically set the form action using jQuery.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question