?
Solved

CGI: 'mailto' & internal server error

Posted on 2000-05-09
10
Medium Priority
?
197 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
A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

 

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

752 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