[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.4

HTTP 500 - Internal server error

Asked by FirstBorn in PHP Scripting Language

Tags: 500, cloakdir, error

Hi Everyone,

I'm having Major Issues with 2 PHP Scripts that work together.

The Error Generated is the dreaded HTTP 500 - Internal server error

The First Script is called alc_track.php, the Second is called alc_track_submit.php

Both Files have been chmod'ed to 777 Per instructions.

Thank You in Advance!

:)



---------------------------------------------------------------------------------
Below are the Scripts in order:

------------------------------------------------------------------------
alc_track.php:
------------------------------------------------------------------------
<html>
<head>
<title>Affiliate Link Cloaker</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
function validate()
{
      //alert("inside validate");
      //alert("document.loginform.email.length = " + document.loginform.email.value);
      
      if(document.form.url.value.length == 0)
      {
            alert("Please enter URL");
            document.form.url.focus();
            return;
      }

      if(document.form.keyword.value.length == 0)
      {
            alert("Please enter keyword");
            document.form.keyword.focus();
            return;
      }
      
    document.form.action="alc_track_submit.php";
    document.form.submit();
}
</script>

</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form" method="post" action="">
  <div align="center">
    <table width="600" border="0" cellspacing="10" cellpadding="10">
      <tr>
        <td height="85" width="151">
          <p><font face="Arial, Helvetica, sans-serif" size="2"><b>Paste the long
            Url here</b></font></p>
        </td>
        <td height="85" width="379"> <font face="Arial, Helvetica, sans-serif" size="2">
          <input type="text" name="url" size="50" maxlength="150" value="">
          </font></td>
      </tr>
      <tr>
        <td width="151"><font face="Arial, Helvetica, sans-serif" size="2"><b>Give
          it a keyword</b><br>
          (this will be the name of the cloaked link)</font></td>
        <td width="379"><font face="Arial, Helvetica, sans-serif" size="2">
          <input type="text" name="keyword" size="50" maxlength="150" value="">
          <input type="button" name="cloak" value="Cloak" onClick="javascript:validate();">
          </font></td>
      </tr>
    </table>
  </div>
</form>
<p align="center"><font face="Arial, Helvetica, sans-serif" size="2"><a href="http://WebmasterInABox.net" target="_blank">Powered
  by the Affiliate Link Cloaker <br>
  from WebmasterInABox.net</a></font></p>
</body>
</html>


-----------------------------------------------


-----------------------------------------------
alc_track_submit.php:
-----------------------------------------------

<?
      $siteName = "http://www.MySite.com";
      $adminName = "MySelf";
      $adminEmail = "Me@MySite.com";
      $cloakDir = "dir";

      
      $fileName = "../$cloakDir/$keyword.html";
      if (file_exists($fileName))
      {
            print "Sorry, could not create cloaked link.<br>The keyword <b>$keyword</b> is already in use.<p>
            Please hit the 'Back' button on your browser and select another keyword.";
            exit;
      }
      else
      {
                  $fp = fopen ($fileName, "w+");
                  if(!$fp)
                  {
                         print("<p>Cannot create <b>$fileName</b>. <br>Make sure you have created a directory by name <b>$cloakDir</b> in your root directory, and that it is chmod'ed to 777.
                        <p>Once you've done that, come back to this page, hit the back button on your browser, and try again.");
                        exit;
                  }
                  else
                  {
                  $fp = fopen ($fileName, "w+");
                  $data = "<html>
            <frameset rows=\"0,*\" cols=\"*\" frameborder=0 framespacing=0>
              <frame src=\"\">
              <frame src=\"$url\">
            </frameset>
            <noframes><body bgcolor=\"#FFFFFF\" text=\"#000000\">
            </body></noframes>
            </html>";
            
                  for($count = 0; $count < strlen($data); $count++)
                  {
                        $escaped .= "%" . bin2hex($data[$count]);
                  }
                  $code = "<HTML><HEAD><SCRIPT LANGUAGE=\"javascript\">\n<!--\ndocument.write(unescape(\"$escaped\"));\n//-->\n</SCRIPT></HEAD></HTML>";
                  //echo $code;
                  fwrite ($fp, $code);
                  fclose ($fp);
                  mail($adminEmail,"Link Cloaker","A new cloked link has been added:\n$url\n\nCloaked url:\n$siteName/$cloakDir/$keyword.html","From: \"$adminName\" <$adminEmail>");
                  }
      }
?>

<html>
<head>
<title>Thank You - Affiliate Link Cloaker</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<? if (file_exists("header.php")) include "header.php"; ?>

<body bgcolor="#FFFFFF" text="#000000">
<p align="center">&nbsp;</p>
<p align="center"><font face="Arial, Helvetica, sans-serif" size="4"><b><u>Here's
  your Cloaked & Encrypted url</u></b></font></p>
<form name="form1" method="post" action="">
  <div align="center">
    <table width="600" border="0" cellspacing="5" cellpadding="10">
      <?
              $link = $siteName.'/'.$cloakDir.'/'.$keyword.'.html';
        ?>
        <tr>
        <td><font face="Arial, Helvetica, sans-serif" size="2">Your short url</font>:
          <font face="Arial, Helvetica, sans-serif" size="2">
          <input type="text" name="textfield" value = "<?=$link?>" size="50">
          </font></td>
      </tr>
        <tr>
        <td>
          <font face="Arial, Helvetica, sans-serif" size="2">
            <a href="<?=$link?>" target="_new"><?=$link?>
            </a></font>
        </td>
      </tr>
        <tr>
        <td>
          <p><font face="Arial, Helvetica, sans-serif" size="2">Go ahead, try
            clicking on it
            </font></p>
          <p><font face="Arial, Helvetica, sans-serif" size="2">It should take
            you to the right &quot;long&quot; url.</font></p>
          <p><font face="Arial, Helvetica, sans-serif" size="2">Now you can copy
            and paste the link from the above text box and use it in your emails
            or on your web site.</font></p>
        </td>
      </tr>
    </table>
  </div>
</form>
<div align="center"><font face="Arial, Helvetica, sans-serif" size="2"><a href="http://WebmasterInABox.net" target="_blank">Powered
  by the Affiliate Link Cloaker <br>
  from WebmasterInABox.net</a></font>
<?
  if (file_exists("header.php")) include "footer.php";
?>
</div>
</body>
</html>
[+][-]05/29/03 12:44 PM, ID: 8608473Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/29/03 08:55 PM, ID: 8611184Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/29/03 11:54 PM, ID: 8611801Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 12:17 AM, ID: 8611910Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 12:28 AM, ID: 8611940Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: PHP Scripting Language
Tags: 500, cloakdir, error
Sign Up Now!
Solution Provided By: VGR
Participating Experts: 1
Solution Grade: A
 
[+][-]05/30/03 05:43 AM, ID: 8613488Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 05:54 AM, ID: 8613624Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 05:54 AM, ID: 8613626Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 06:09 AM, ID: 8613784Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 07:11 AM, ID: 8614310Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 07:34 AM, ID: 8614470Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 07:38 AM, ID: 8614504Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 08:39 AM, ID: 8615019Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 09:39 AM, ID: 8615525Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 09:42 AM, ID: 8615553Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 09:58 AM, ID: 8615669Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 11:14 AM, ID: 8616232Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 12:00 PM, ID: 8616575Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 12:48 PM, ID: 8616868Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 12:55 PM, ID: 8616894Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 01:30 PM, ID: 8617106Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 01:36 PM, ID: 8617132Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 01:43 PM, ID: 8617172Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 01:46 PM, ID: 8617186Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 01:54 PM, ID: 8617224Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 01:59 PM, ID: 8617246Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 02:01 PM, ID: 8617254Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 02:13 PM, ID: 8617311Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/30/03 02:33 PM, ID: 8617382Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 02:36 PM, ID: 8617392Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 03:07 PM, ID: 8617478Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/30/03 03:30 PM, ID: 8617561Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/02/03 08:57 PM, ID: 8635245Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81