Solved

CGI: 'mailto' & internal server error

Posted on 2000-05-09
10
195 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 200 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

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

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

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
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…

737 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