[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

CGI: 'mailto' & internal server error

Posted on 2000-05-09
10
Medium Priority
?
198 Views
Last Modified: 2013-12-25
I am trying to define a footer so that the same links appear at the bottom of every page, eg: Home, Disclaimer, Contact, etc.  The problem is that when I include the href for mailto, the page comes up with an internal server error.

Yes, the HTML is escaped. Yes, I tried escaping special characters in addition to escaping the block of html, and I've tried several different combinations of each: escaping HTML as a block and escaping individual characters.

The HTML is in the same footer with the other footer links, and they're fine. If I take out the href for mailto, the script is fine. Add the href for mailto, and it results in an error.

For example, this works just fine:

<a href="sitemap.shtml>Sitemap</a>&nbsp; |&nbsp;
<a href="http://www.mysite.net">Home</a>&nbsp; |&nbsp;

But if I immediately add

<a href="mailto:info@mysite.net">Contact</a>

just below the other two links, I get an internal server error.

Anyone have any idea why? Thank you for your time.
0
Comment
Question by:celere
[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
  • 5
  • 3
  • 2
10 Comments
 
LVL 16

Expert Comment

by:maneshr
ID: 2793519
from the looks of it, the problem seems more to do with the email client that is fired up when the user clicks on mailto than anything else.

lets say the email client that is kicked up is netscape Email client.
i would suggest you try to fire up the same client directly and see if you still get the same error.

me feeling is that you will.

let me know.
0
 

Author Comment

by:celere
ID: 2793564
If I understand you correctly, you think it could be a browser issue?  I am not getting the internal server error after clicking mailto.  The error comes up before the page even loads, so the user doesn't have the opportunity to click on mailto.
0
 
LVL 6

Accepted Solution

by:
christopher sagayam earned 800 total points
ID: 2793779
try

a href="mailto:info\@mysite.net">Contact</


instead of

a href="mailto:info@mysite.net">Contact</


note the backslash
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:celere
ID: 2793828
Hero! Thank You!
0
 

Author Comment

by:celere
ID: 2794243
FYI -- I posted another question for 100 points here

http://www1.experts-exchange.com/Computers/WWW/CGI/Q_10341470.html

Thanks for your help!
0
 

Author Comment

by:celere
ID: 2797280
Greetings!

For the record, I just found that if I have my footer as a separate HTML file called into the cgi script:

#Footer
undef $/;
open(FILE, "footer.html")|| die print "case closed";
$footer=<FILE>;
close(FILE);
$/="\n";

straight HTML works, and none of the characters need escaping.
Note this works with the footer.html in the same directory as the cgi script. I have yet to figure out how to use references outside of the directory.

Cheers!
0
 
LVL 6

Expert Comment

by:christopher sagayam
ID: 2797298
open(FILE, "footer.html")|| die print "case closed";


In the above statement .. you have to give the absolute path to footer.html .. if you want to refer to files oustside your directory
0
 

Author Comment

by:celere
ID: 2797315
I tried that, it didn't work.

If I have the footer in the parent directory, and use either

#Footer
undef $/;
open(FILE, "http://www.mysite.net/footer.html")|| die print "case closed";
$gfootbody=<FILE>;
close(FILE);
$/="\n";

-OR-

open(FILE, "/footer.html")|| die print "case closed";

I get a 500 error every time.

0
 
LVL 16

Expert Comment

by:maneshr
ID: 2797393
i dont think you can use open(FILE, "http://www.mysite.net/footer.html")

Also i would suggest you check the permissions of the CGI user under whom the script is executed. Chances are that person might not have read access to the / directory.
0
 
LVL 6

Expert Comment

by:christopher sagayam
ID: 2798431
open(FILE, "http://www.mysite.net/footer.html")|| die print "case closed";


absolute path will be something like this ..

for eg ..

open(FILE, "/home/celere/public_html/footer.html")|| die print "case closed";


0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

650 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