CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Perl beginner - I need help please

 

First page Previous page 1 2 3 4 5 Next page Last page  View All


JennyW
journeyman

Jun 23, 2001, 10:26 AM

Post #101 of 123 (7817 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi mhx, Marcus and Marcus Holland-Moritz,
Are you all having a good weekend?


In Reply To
I really, really hate to say that, but I don't have an answer for you this time.

Thatís ok. Youíve been so helpful in every way imaginable.
However, Iím all ears (I will be very interested) if you ever think of a solution.

When I send an email to the addresses on my mailing list, the recipients all receive my written message in their inbox. When they get that message they can also see my email address.

I do not want my email address to be:

1. Visible to the recipient.
2. I donít want to give the recipient the ability to Reply and send a message to the sending email address in the email.

Is it possible to do this?

Thanks,
Jenny



mhx
Enthusiast / Moderator

Jun 23, 2001, 1:16 PM

Post #102 of 123 (7815 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

I'm not 100% sure, but I don't think it's possible to show your name (which I guess you still want to show) without an e-mail address.
There are two possibilities you have. First, you don't specify anything. If you do so, a default e-mail address (some weird number @netfirms.com) will be inserted as the sender.
Second, you specify an address. I've looked up the abstract syntax description for e-mail addresses and found that it's not possible to specify a name without an address. So, the easiest thing to do is to use a dummy e-mail address.
I also don't think that it's possible to disable the receiver's option to reply. Simply because there has to be a sender e-mail address.
I'm sure you also get a lot of spam. In my hotmail account which I've created 5 years ago, I got 250 addresses on my blocked senders list and still receive about 20 spam mails per day. That's why I don't use the account anymore. Have you ever seen that any of these mails didn't have a sender address? I haven't. And I'm sure if it was possible to send anonymous mail (such as you want to) most of the spam mail were anonymous.
As another example, a lot of mails I receive contain a special notice that you shouldn't reply to them because they were automatically generated. If you could block the receiver's reply option, this wouldn't be neccessary.
You see, I'm not absolutely sure, but I don't think it's possible. If you don't want the users to see your e-mail, get a dummy account and use this instead of your real account. I don't have a better solution currently, and I don't think there is a really good solution to this.

Bye,
Marcus

PS: "Iím all ears" is almost the same in german ("ich bin ganz Ohr"). Thanks for the explanation anyway!



JennyW
journeyman

Jun 25, 2001, 9:36 AM

Post #103 of 123 (7803 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus!

Did you have a good weekend?
I went to the zoo yesterday with a few friends. When I got home I was darn tired!

In Reply To
I've looked up the abstract syntax description for e-mail addresses and found that it's not possible to specify a name without an address. So, the easiest thing to do is to use a dummy e-mail address.
I also don't think that it's possible to disable the receiver's option to reply. Simply because there has to be a sender e-mail address.

I guess Iíll use a dummy address, itís not a big deal. I wasnít totally sure if I wanted to implement these changes (if they were possible) anyway, I just wanted the option.

The only thing I have left to do for my mailing list script is to check to see how many people it can store and send email to.

=====================================================

Off to new and better thingsÖ

I have a perl script that dynamically places a Poll on an html page, but I canít seem to get it working.

I uploaded, chmodíed and made script adjustments to all the files that related to the script. I followed every step specified in the readme file (I obviously went wrong somewhere, but Iíll soon get to that!)

Hereís my pollís urlÖ

http://jennyw3.netfirms.com/cgi-bin/poll_it_ssi.cgi

In order to dynamically insert this poll on a webpage the readme file directed me to perform the following (I followed the portions highlighted in purple

README
The filename packaged w/ this script named 'Poll_It_SSI.cgi'
is the CGI Script used w/ SSI (Server Side Includes) to import
your poll on an existing web page.

To use SSI within HTML files, most servers require your web page
name to have an *.shtml extension rather than *.html. This allows
you to execute a command to include a CGI Output in your html file.


Some servers (Unix/Apache) you can enter a file named '.htaccess'
with the contents:

AddType text/x-server-parsed-html .html

Inside of it (make sure that line above has a return after it)

What this file will do is tell the server to parse HTML files
in that directory w/ .html files, allowing you use *.html files
with SSI instead of renaming to *.shtml.

Now to input the Poll_It_SSI.cgi script into an HTML page, use this
code (After finding out what you need to use for SSI calls from the
above explanation):


< !--#exec cgi="path/to/Poll_It_SSI.cgi" -- >

The above tag will look for the *.cgi file at the location specified
& if there will output your current poll running into your web page.


I inserted the script above into an .shtml file, so I could view the poll in a webpage, but I received an error.

Hereís the errorÖ


Code
[an error occurred while processing this directive]

Hereís the url for the error aboveÖ

http://jennyw3.netfirms.com/002_ssi_test.shtml

I tried another SSI script (date script) to make sure I was doing the .shtml thing correctly and received a successful outputÖ
I inserted the following SSI into an .shtml pageÖ

< !--#echo var="DATE_LOCAL" -- >

Here were my successful resultsÖ

http://jennyw3.netfirms.com/001_ssi_test.shtml

Do you know what I could be doing wrong?

If itís necessary, hereís the full readme docÖ
http://jennyw3.netfirms.com/text_files_for_viewing_only/INSTALL_Poll_It_v2.05.txt

If you need any more information just holler Ė JENNY!!

Thanks,
Jenny



mhx
Enthusiast / Moderator

Jun 25, 2001, 11:42 AM

Post #104 of 123 (7800 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

JENNIEEEE!

(sorry, but you asked for shouting ;-)
Yeah, there are two things that I'd like to have a look at. First, it's the CGI-script itself (poll_it_ssi.cgi) and second, it's the source code of the SHTML file (002_ssi_test.shtml). Unfortunately, since it's a server side include, it's not the original source code that I receive when requesting the URL.
If you could be so kind and link me to these files, I'll try to figure out what went wrong. This again is something new to me, since I haven't used SSI before, but it doesn't seem to be so special.
Oh, yes, my weekend was fine so far. We're slowly getting closer to summer where I live, so I took the opportunity to cycle around and take a few photographs in my surrounding area. Some are quite cool!

Bye,
Marcus



JennyW
journeyman

Jun 25, 2001, 5:56 PM

Post #105 of 123 (7793 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi mhx!

Hereís the two links you requested:

1. The CGI script

http://jennyw3.netfirms.com/text_files_for_viewing_only/poll_it_ssi.txt

2. The HTML document

http://jennyw3.netfirms.com/text_files_for_viewing_only/002_ssi_test.txt


In Reply To
This again is something new to me, since I haven't used SSI before, but it doesn't seem to be so special.

Yes, SSI is new to me too. However, like you it doesnít seem too too complicated, but then again, I canít seem to figure out the problem.


In Reply To
Oh, yes, my weekend was fine so far. We're slowly getting closer to summer where I live, so I took the opportunity to cycle around and take a few photographs in my surrounding area. Some are quite cool!

Whatís the present temperature of your climate right now?
You take photography? Thatís cool. What do you enjoy taking pictures of?


Take care,
Jenny



mhx
Enthusiast / Moderator

Jun 26, 2001, 10:37 AM

Post #106 of 123 (7786 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny!

Unfortunately, I have the answer for your problem. It's in the Netfirms SSI FAQ:

In Reply To
Q - Why can't I execute CGI (perl) scripts within my webpage using the #exec cgi command?
A - At this point Netfirms does not provide #exec-cgi functionality - although you can still use scripts from your CGI-BIN directory.

The script itself really isn't the problem. It worked absolutely smooth with my local Apache server. You didn't make any mistake.
Bad news, I know, but perhaps they're going to fix this annoying - and IMO unneccessary - problem. I just started to like SSI, but if I cannot use it...
But now, let's move on to more positive things!

In Reply To
Whatís the present temperature of your climate right now?

Well, today it got really hot! We're having about 34 degrees Celsius. (Are you familiar with Celsius? If you prefer Fahrenheit, this is about 93 degrees.) My thermometer tells me something about 78 (172) degrees, but this is in the direct sun. (I can tell you, this is not the right weather to cycle in black clothes ;-) In my basement flat it's cool 20 (68) degrees, very nice if you come from outside. Smile

In Reply To
You take photography? Thatís cool. What do you enjoy taking pictures of?

Ooo, just about everything. Nothing and no-one is safe if I take my cameras along! I got several thousand slides, and since I have my digital camera, I don't even have to care about films. (I enjoy using my 'analogue' cameras more than the digital one, but it's easier to carry along.)
I really like macro-photography, so I find my favourite motifs in nature. I also like taking photos of my cats. Last year I consumed eleven films when I was at the EXPO world exposition in Hannover. I'm about to set up a web page with a small photo gallery, but I gotta do some Perl programming before to make this easy to maintain ;-)

Ciao,
Marcus



JennyW
journeyman

Jun 26, 2001, 4:30 PM

Post #107 of 123 (7782 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus,

In Reply To
Q - Why can't I execute CGI (perl) scripts within my webpage using the #exec cgi command?
A - At this point Netfirms does not provide #exec-cgi functionality - although you can still use scripts from your CGI-BIN directory.

This is really really stinky. I remember, when I first signed with netfirms, yes, I remember reading the above Ė darn.

This is not good and I am going to write them a nice letter about this.

Do you know any free websites that provide #exec-cgi functionality?

In Reply To
The script itself really isn't the problem. It worked absolutely smooth with my local Apache server. You didn't make any mistake.

Well Iím at least glad to hear I did something right! I hope I can test this in the near future!

How did it look on your server? Did it show up on the webpage that had the SSI command in the code?

In Reply To
Are you familiar with Celsius?

I sure am familiar with Celsius! I love the warm weather, it feels so great on the skin!

In Reply To
Last year I consumed eleven films when I was at the EXPO world exposition in Hannover. I'm about to set up a web page with a small photo gallery, but I gotta do some Perl programming before to make this easy to maintain ;-)

Iím not too familiar with Germany. Where is Hanover located (East or West Germany?)

Let me know when that photo gallery hits the web!

Take care,
Jenny



mhx
Enthusiast / Moderator

Jun 26, 2001, 8:52 PM

Post #108 of 123 (7776 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Good morning, Jenny!


In Reply To
Do you know any free websites that provide #exec-cgi functionality?

Yes, I know (since about 5 Minutes... :-). At prohosting you can sign up for a 50 MB account with full CGI/SSI support. But: They don't have support for sendmail... As soon as I find a provider that offers everything and costs nothing, I'm going to tell you.

In Reply To
How did it look on your server? Did it show up on the webpage that had the SSI command in the code?

Yeah, it showed up just as expected. Have a look here to see it.

In Reply To
Where is Hanover located (East or West Germany?)

Mmmh. First, there's no more East or West Germany since about 12 years now. At least they're no longer separated since then. But to answer your question, Hannover is in the center of the north of Germany. If you know Frankfurt and Hamburg, it's somewhere in between. Germany isn't so big, so this description should locate it within a radius of 100 km ;-)
Be sure I'll keep you informed about the photo gallery. I'm currently working on a Perl script that extracts the tags my digital camera stores from the pictures, so I can display technical details for each photography. Also, I'm going to write some HTTP upload script, since I'm a lazy person and do not have FTP access everywhere.
What I would be interested in: What do you have to pay your ISP for your internet connection? Does it depend upon the time you're online? Or is it just a (monthly) payment with unlimited online time included? And how fast is your connection? I'm really curious about these...

Bye,
Marcus



JennyW
journeyman

Jun 27, 2001, 9:38 AM

Post #109 of 123 (7766 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus!!


In Reply To
Yes, I know (since about 5 Minutes... :-). At prohosting you can sign up for a 50 MB account with full CGI/SSI support. But: They don't have support for sendmail... As soon as I find a provider that offers everything and costs nothing, I'm going to tell you.

Wow! This is great! Thanks for the url, this will help me a lot!

Prohosting Writes (important text highlighted in red

In Reply To
Question: How do I use CGI scripts?
Answer: Here are some key points to remember when working with CGI scripts.

&#61623; You can run CGI scripts from anywhere within your directory structure, however, we have created a cgi-bin folder for organizational purposes.
&#61623; File names must end in .cgi or .pl to work propperly
&#61623; Set the permissions(chmod) on ALL CGI scripts to 755(rwx rx rx) regardless of what your CGi scripts instructions direct you to do.
&#61623; Set the permissions(chmod) on ALL directories to 755(rwx rx rx) regardless of what your CGi scripts instructions direct you to do.

&#61623; Upload your CGI scripts in ASCII mode. If you upload them in Binary mode they will not work.


Is it OK to IGNORE the permission requirements that my Poll readme file directs me to apply to my .cgi scripts?

Also, thanks for posting my SSI test with your webspace!

Iíve signed up with Prohosting, but first I have another question for you!

===================================================

I found a .cgi script for a Guestbook. Now, so far Iím doing pretty well (I think), well actually, Iím not doing the best, I need your assistance.
I donít like incorporating two topics (Poll / Guestbook) in the same post (because it gets the posts a bit messy), but Iím gonna do it just this once.

After I uploaded my Guestbook scripts I was directed to point to my setup.cgi url and key in some setup information.

I successfully filled out all of the fields, except for this oneÖ


In Reply To
Server location of listings.html, main_layout.html, problem.html and thanks.html
Fictional Example: /home/yourdomain/www/guestfriend

What is the Server Location? I know what URL Location is, but not Server.

Also, when viewed, the .cgi scripts the Guestbook zip file supplied me with were all jumbled. For example, the whole script was just bunched up into a clump.
I wanted your opinion as to why these scripts looked like this so I made them into .txt files and uploaded them to my webspace. After uploading, the scripts became readable (just like all the other scripts Iíve shown you).

Iíll have to attach a script (to perlguru) for you. I will do that later so you can see what Iím talking about.

Whatís the most populated city in Germany? How many people live there?

I love digital cameras, but theyíre so expensive. When they get down to my price range then Iíll have to think about picking one up, but that wonít be for a while.


In Reply To
What do you have to pay your ISP for your internet connection?

I pay $40 a month.


In Reply To
Does it depend upon the time you're online? Or is it just a (monthly) payment with unlimited online time included?

I have unlimited monthly access.


In Reply To
And how fast is your connection?

I run my internet connection through cable. Iím not too sure what the exact speed is. I think itís like 300 or something?

Youíre the best Marcus!
Jenny



mhx
Enthusiast / Moderator

Jun 27, 2001, 11:27 AM

Post #110 of 123 (7764 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

I've been searching all day for a free webhoster that provides CGI, SSI, FTP and sendmail, but I gave up. Seems that you have to combine the netfirms and the prohosting account. I'm going to use the prohosting account for my photo gallery, since there's more space and no real need for email. Even better if the URL helped you, too. Smile
Concerning the file permissions, I'd rather trust the provider than the script author. The script author isn't wrong, but he cannot know how your server is configured. The guys at prohosting should know it.

In Reply To
What is the Server Location? I know what URL Location is, but not Server.

The server location is, well, simply the location of that file on the server. I guess this will not actually help you...
To clarify this, think of your own computer, where you have installed Apache (I think you have). There's a directory on your harddisk where you put the files that you can access by typing a URL like http://localhost/jenny.html. Let's say that jenny.html is located in c:\webserver\www\jenny.html. Then the red one is the URL and the green one is the Server Location. That was hard to explain, I hope you got it.
Since most webservers are currently running some sort of UNIX, the directory you have been assigned is most likely to be located somewhere in the /home directory.
Anyway, I don't think you actually need the server locations. I guess you can also use relative locations instead. Which means, if your CGI-files are in /home/some/where/cgi-bin/ and the HTML files are in /home/some/where/, you don't have to use /home/some/where/listings.html, but can also use ../listings.html.
Some providers don't allow relative addressing, but many do allow it. Don't care about the absolute server location unless you need it.

In Reply To
Also, when viewed, the .cgi scripts the Guestbook zip file supplied me with were all jumbled. For example, the whole script was just bunched up into a clump.

I don't think you have to post the file, I can imagine why they looked that way. I'd guess these files we're in UNIX format, and you tried to open them with Notepad. If this was (more or less) the case, try to open such a file with WordPad. If it looks normal then, my thought was right, and you don't have to attach a file.

In Reply To
Whatís the most populated city in Germany? How many people live there?

It's definetely not Hannover, although it's quite a big city (they have half a million citizens). The most populated cities are Berlin (3.4 million) and Hamburg (1.6 million). I live in Gšrtringen, which is in the south-west of Germany, quite close to France. We've got less than 5000 people living here.

In Reply To
I love digital cameras, but theyíre so expensive. When they get down to my price range then Iíll have to think about picking one up, but that wonít be for a while.

Yes, they're nice toys, and yes they're expensive. But they still can't reach the quality of my 'analogue' (or as a friend of mine would call it 'chemical') cameras. Do you have a normal camera?
The $40 are a fair price I think. A similar connection in Germany is slightly more expensive. Currently, I have to pay less than one cent per minute, which is ok for me since I have internet access at work and only need it when I'm at home. Normally my phone bill (including internet) is less than $20.

Bye,
Marcus



JennyW
journeyman

Jun 28, 2001, 6:42 AM

Post #111 of 123 (7749 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hello Marcus!

PROHOSTING

I canít upload to my Prohosting account.

Every time I try to upload a file I receive this message (my files wonít upload)Ö


Code
Connected to 2093.90.125.203 port 59438


Code
STOR index.html


Code
503 No PORT command issue first

Do you know what could be wrong?
====================================
GUESTBOOK


In Reply To
To clarify this, think of your own computer, where you have installed Apache (I think you have). There's a directory on your harddisk where you put the files that you can access by typing a URL like http://localhost/jenny.html. Let's say that jenny.html is located in c:\webserver\www\jenny.html. Then the red one is the URL and the green one is the Server Location. That was hard to explain, I hope you got it.

Just to let you know, this was a darn good explanation!

However, I think I need to know the Server Location of where my files are.

If you go to the link below (setup.cgi page) youíll see the setup requirements for my Guestbook. (Please donít submit any info. on this form!)

http://jennyw4.netfirms.com/cgi-bin/setup.cgi

The third field on the page (above) displays the followingÖ

Server location of listings.html, main_layout.html, problem.html and thanks.html
Fictional Example: /home/yourdomain/www/guestfriend

Now, I entered ../ (the relative location you taught me) in the field above, and my setup.cgi script said that I successfully went through the setup procedure.

So I went to check out my guestbook.cgi page. This is the page where people are suppose to be able to sign my guestbook, but nothing showed up on the page Ė it was blank.

Hereís the url of my blank Guestbook pageÖ

http://jennyw4.netfirms.com/cgi-bin/guestbook.cgi

I figure I need the exact Server Location to point to the exact path. What do you think? Do you think thatís the case?

Hereís the Guestbooks Readme.txt file. I donít know if you need it or not, but here it isÖ

http://jennyw4.netfirms.com/text_files_for_viewing_only/readme.txt
====================================
EDITING


In Reply To
I don't think you have to post the file, I can imagine why they looked that way. I'd guess these files we're in UNIX format, and you tried to open them with Notepad. If this was (more or less) the case, try to open such a file with WordPad. If it looks normal then, my thought was right, and you don't have to attach a file.

You were right! I opened the .cgi files in Wordpad and the scripts displayed properly (organized).

When editing / saving .cgi or .html files does it matter whether I use WordPad or Notepad?

Whatís the difference between the two (Wordpad & Notepad)? Will I have to upload differently if I use Wordpad?


In Reply To
Yes, they're nice toys, and yes they're expensive. But they still can't reach the quality of my 'analogue' (or as a friend of mine would call it 'chemical') cameras. Do you have a normal camera?

Yes, I have a normal Samsung camera. I donít have to set apertures or F16ís. It has a small zoom lens and does everything itself Ė Iím not too professional when it comes to photography!

Bye Marcus,
Jenny



mhx
Enthusiast / Moderator

Jun 28, 2001, 8:25 AM

Post #112 of 123 (7745 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

first, are you sure this was the output:

Code
Connected to 2093.90.125.203 port 59438

If so, the IP-address is definetely wrong. Each of the four numbers can be at most 255, so I'd guess there's a typo and you meant 203. (Quiz: Try to think of why I say 203 and not 209 or something else...)

Uploading to prohosting's account was absolutely fine when I tried. Did you enter the IP-address or did you enter the hostname of the server (mine is odin.prohosting.com)?


In Reply To
What do you think? Do you think thatís the case?

Maybe. At least, I'd give it a try. Run the following CGI-script on the server, it should give you the path to your cgi directory.

Code
#!/usr/bin/perl -w 
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use Cwd;
use strict;

print header, start_html, h1( cwd ), end_html;

You can modify the directory to point where your files are located. If your 'cgi-bin' and 'www' directories are in the same directory, just replace cgi-bin with www.

In Reply To
Whatís the difference between the two (Wordpad & Notepad)? Will I have to upload differently if I use Wordpad?

The difference is simple. Notepad is just an ASCII editor, while WordPad is a (very) simple version of Word. Unfortunately, Notepad requires files to be in DOS format to display correctly. I personally wouldn't use WordPad for editing source code in general. I'd recommend getting an Editor that supports the Unix format instead. You can give it a try with WordPad, but always remember to save your files in ASCII format, not RTF or Word-Format. You have to upload your files in ASCII mode, as always.

In Reply To
Yes, I have a normal Samsung camera. I donít have to set apertures or F16ís. It has a small zoom lens and does everything itself Ė Iím not too professional when it comes to photography!

I've also started with a pocket camera about fifteen years ago. It didn't even have a zoom. Now, I got two Minoltas from the Dynax series (they call it Maxxum in USA), the 9xi and the 700si, as well as my digital Nikon Coolpix 995. I like them in exactly this order. If you've used the 9xi once, you're 100% addicted! It feels and sounds absolutely great. Smile

Bye,
Marcus



JennyW
journeyman

Jun 28, 2001, 10:34 AM

Post #113 of 123 (7742 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi mhx,

POLL

In Reply To
first, are you sure this was the output:
Connected to 2093.90.125.203 port 59438
If so, the IP-address is definetely wrong. Each of the four numbers can be at most 255, so I'd guess there's a typo and you meant 203.

Iím absolutely positive that was the output. Iím gonna email Prohosting and ask them what could be wrong.


In Reply To
Did you enter the IP-address or did you enter the hostname of the server (mine is odin.prohosting.com)?

I entered the host name Ė odin.prohosting.com


In Reply To
(Quiz: Try to think of why I say 203 and not 209 or something else...)

Is it because 9 (or some other number) is a randomly generated number used for security purposes?

GUESTBOOK

In Reply To
#!/usr/bin/perl -w
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use Cwd;
use strict;

print header, start_html, h1( cwd ), end_html;

Iíll run the script above, edit the Guestbook setup file and tell you my results!


In Reply To
If you've used the 9xi once, you're 100% addicted! It feels and sounds absolutely great.

Wowee! You sound like a real pro when it comes to cameras! What do you enjoy doing more: Photography or Perl?

Until next time!
Jenny



mhx
Enthusiast / Moderator

Jun 28, 2001, 11:39 AM

Post #114 of 123 (7741 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,


In Reply To
Iím absolutely positive that was the output. Iím gonna email Prohosting and ask them what could be wrong.

That's really odd. As I said, I didn't have any problems. When I'm back home I'll have a look at what the prohosting server means when I'm logging in.

In Reply To
Is it because 9 (or some other number) is a randomly generated number used for security purposes?

No. Have a look at the number 2093. If you made a typo, the only two numbers that you could have hit with one finger at the same time are 9 and 0. So either of them would have been wrong. Since, as I said, the number can be at most 255, 293 isn't possible. That leaves us with the 0 and that's why I guessed 203. Unfortunately, you didn't make a typo and this weird address must have some other reason. Wink

In Reply To
Wowee! You sound like a real pro when it comes to cameras! What do you enjoy doing more: Photography or Perl?

Mmmh, well, that's hard. I like both of them very much. The problem is, there are some other things that I also like very much (collecting CDs and DVDs, or cooking, to name just a few). Fortunately, Perl and Photography are completely different things, so when you're tired of the one thing, the other thing may just be the right to do. If the weather is fine, I really enjoy Photography more, if I hear the raindrops banging against my window I put the music on and write some Perl (or treat my computer in some other way).

Hope to hear from you,
Marcus



JennyW
journeyman

Jun 29, 2001, 6:06 PM

Post #115 of 123 (7724 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus! The weekend is here! I love it!!!

PROHOSTING

I figured out how to upload scripts (using FTP) to Prohosting! I checked out their FAQ page and used the following infoÖ


In Reply To
7. When I FTP, I get the error "503 error, no port command issued." What's wrong?
In your FTP application, look for a setting called Passive Transfer mode, or PASV mode, and enable it, or disable it... make it the opposite of what it is, and the FTP should work.
Normally, PASV mode enables FTPing through some firewall setups. I couldn't find a reason for the "no port command" error, however, in looking for the answer, I found a site that goes into boring technical detail as to what PASV mode does (but I won't bother you with that URL here).

I disabled the PASV mode and my files uploaded!
=====================================
POLL

Since I can now upload to Prohosting I was able to test my Poll script. It worked! Actually it worked great!!

Iíll most likely have a few questions for you, regarding my poll in the very near future.
=====================================
GUESTBOOK

I uploaded and executed the following script you gave meÖ

#!/usr/bin/perl -w
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use Cwd;
use strict;

print header, start_html, h1( cwd ), end_html;


Here were my resultsÖ

/home/d01/sec/s20/a0004k5s/cgi-bin

Hereís the url to the script (displays the results listed above)Ö

http://jennyw4.netfirms.com/cgi-bin/path_to_server.cgi

I imported /home/d01/sec/s20/a0004k5s/www into my setup.cgi file. I sent the info. and it accepted the results.

Hereís the pageÖ

http://jennyw4.netfirms.com/cgi-bin/setup.cgi

Now, my readme file directs me to view my guestbook.cgi page. As you remember last time, when I entered ../ and viewed my guestbook.cgi file nothing showed up on the page.

Well, the opposite occurred this time. I was able to see my guestbook.cgi page. However, thereís still a big problem.

When I make an entry in the guestbook and select the Sign Guestbook button I receive one of two messages:


In Reply To
1. You are getting this error because:
There is no index.html file
or
You do not have the proper access permissions

I have an index.html file


2. HTTP Error 403 Ė Forbidden
Internet Explorer

Why do you think my guestbook isnít working?

Hereís the link to my guestbook.cgi pageÖ

http://jennyw4.netfirms.com/cgi-bin/guestbook.cgi

I donít know if this is necessary, but hereís the readme.txt file for my guestbookÖ

http://jennyw4.netfirms.com/text_files_for_viewing_only/readme.txt
=====================================
In an unrelated issueÖWhat does Remotely Hosted mean? I keep hearing this term every now and then.
=====================================

In Reply To
The problem is, there are some other things that I also like very much (collecting CDs and DVDs, or cooking, to name just a few).

I loooove listening to music.What are your favorite bands?
You like movies too? What are a few of your favorite movies?


I love The Beatles. My favorite album is Abbey Road. Polythene Pam is my favorite song on the album!

Iím gonna go see A.I. now!

See ya later!!
Jenny



mhx
Enthusiast / Moderator

Jun 29, 2001, 11:03 PM

Post #116 of 123 (7722 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

I'm glad you figured out how to upload your files. I didn't have to configure anything. Also glad to hear your poll is working fine.

The guestbook thing is quite strange. Well, at least my server path script worked as I expected Smile. I've downloaded the guestbook and installed it locally and on netfirms, where you can also test it. I did the following to make it work:

1. I created subdirectories named guestfriend in both the www and the cgi-bin directories
2. I put the following files into cgi-bin/guestfriend/

Code
admin.cgi 
guestbook.cgi
setup.cgi
setup.cfg
data.txt

2. I changed the permissions of all .cgi files to 755
3. I put the following files into www/guestfriend/

Code
listings.html 
logo.gif
main_layout.html
problem.html
thanks.html

4. I executed cwd.cgi on my server and got

Code
/home/d01/sec/s24/a0002e0t/cgi-bin/

5. I executed setup.cgi and entered the following information
The URL location of the CGI scripts

Code
http://mhx.netfirms.com/cgi-bin/guestfriend

URL location where listings.html, main_layout.html, problem.html and thanks.html are located

Code
http://mhx.netfirms.com/guestfriend

Server location of listings.html, main_layout.html, problem.html and thanks.html

Code
/home/d01/sec/s24/a0002e0t/www/guestfriend

Image Parser

Code
Y

6. That's it. The script works absolutely perfect. (Although I'm not going to use it...)

I can't imaging what's wrong with your setup. Best thing would be to try to perform exactly the steps I described and see if it works.


In Reply To
What does Remotely Hosted mean?

That's good. I thought you were the native speaker? Wink I think it's nothing special, IMO just means that your page is hosted (kept) not on your computer, but remotely (far away, e.g. at netfirms).

Bye,
Marcus



JennyW
journeyman

Jul 1, 2001, 11:42 AM

Post #117 of 123 (7708 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus,

GUESTBOOK

In Reply To
I can't imaging what's wrong with your setup. Best thing would be to try to perform exactly the steps I described and see if it works.

I donít know what could be wrong? I followed your steps exactly. Now when I go to my guestbook.cgi page I get a blank page again. I donít get it.

Hereís the url to my blank guestbook.cgi page:

http://jennyw4.netfirms.com/cgi-bin/guestfriend/guestbook.cgi

The only thing that was different was your path to the server, compared to mine.

You had: /home/d01/sec/s24/a0002e0t/cgi-bin/
I had: /home/d01/sec/s20/a0004k5s/cgi-bin
I tried both paths and was still unsuccessful.

In Reply To
My Guestbookís readme file writes:
If you are going to use Java Script in the .html files please turn off the image parser in setup.cgi

I have Java Script I want to apply to my guestbookís html files, but if I turn off the image parser (N) in the setup.cgi page doesnít that mean that I will no longer be able to add my own code to the guestbookís html files?
==========================================
POLL

My poll seems to be working wonderfully! However, I have a very small issue at hand.

Hereís the url to my poll_it pageÖ

http://odin.prohosting.com/jennyw/

Now, make a selection, submit it and wait for the page to reload and give you the results.

The resultsí text is in black, but I want it to show up in white. I adjusted all the rest of the text to display in white by editing my _ssi_poll.html page.

I think the reason the text of the results displays in black is because itís generated within the poll_it_ssi.cgi script.
I tried to locate where I could change the font in the cgi script, but was unsuccessful.

Do you know where or how I can change the font from black to white?

If you need them: here are the .txt (cgi) documents for my polls pages:

http://jennyw3.netfirms.com/text_files_for_viewing_only/poll_it_ssi.txt

http://jennyw3.netfirms.com/text_files_for_viewing_only/Poll.txt

Having a great weekend! Hoping you are too!
Jenny



mhx
Enthusiast / Moderator

Jul 1, 2001, 2:11 PM

Post #118 of 123 (7703 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,


In Reply To
I donít know what could be wrong? I followed your steps exactly. Now when I go to my guestbook.cgi page I get a blank page again. I donít get it.

I don't know either. As you can see from the link in my last post, it worked fine for me the way I described it. Have no idea, sorry :-(

In Reply To
Do you know where or how I can change the font from black to white?

That should be easy. You said you already modified your _ssi_poll.html file? Actually, you also have to adjust the color for the results in this file. Here's the section you have to edit and the changes you have to apply are in red.

Code
   >!-- insert : $show_results$ --< 
>!-- def : poll_results --<
>TR<>TD< >Font Face="Verdana,Arial" Size=2 Color="#FFFFFF"<
$image_percent$ $percent$ >BR< $poll_option$ >/TD<>/TR<
>!-- /def : poll_results --<

I have reversed the angle brackets because the forum seemed to have problems with displaying the original code. Of course, you don't have to change these.
My weekend was fine so far, unfortunately it's getting closer to Monday ;-)

-- Marcus



JennyW
journeyman

Jul 2, 2001, 11:34 AM

Post #119 of 123 (7691 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hiee!!

GUESTBOOK


In Reply To
I don't know either. As you can see from the link in my last post, it worked fine for me the way I described it. Have no idea, sorry :-(

Thatís ok. I didnít like the features of the Guestbook that much anyway.
Iím going to look for a new script. I have to find a script where I can add my own html to the Guestbook so it will look like the rest of my site!

===================================================

SERVER SIDE INCLUDES

I really like this SSI stuff and I think I can utilize it quite well.

I want to make a site that has loads of pages.
The borders, menu and logo of this site are all images and all appear on every page on my site.

Right now, if I donít use SSI and if I want to make changes to any re-appearing images on my site then Iíd have to edit those changes individually - on every single page.

However, if I do use SSI, then I can edit those images once and my changes will be applied to every page.

Iím not too sure how I can go about doing this. Do you know how I can get started?

Until next time!
Jenny

Ohh, I almost forgot, thanks for your help with the black text on my Poll. I applied the changes you posted and everything worked great.
Actually, I was a little angry with myself that I didnít notice that font tag when editing all the other font tags. If I noticed it I definitely would have tried making the font color adjustment.

Thanks so much!



mhx
Enthusiast / Moderator

Jul 2, 2001, 11:48 AM

Post #120 of 123 (7689 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,


In Reply To
Iím not too sure how I can go about doing this. Do you know how I can get started?

As I said, I'm no HTML guru. So I can't give you professional information on this topic. What you are trying to do sounds to me as if you should use frames in your HTML. Perhaps SSI can be useful as well, I don't have experience with that so much. If you don't know about frames and want to see how a site with frames looks, you can have a look at my super-outdated german homepage ;-) As you will see, there's a menu and some java applet on the left, and changing content on the right. I've only written the menu and such once, and used a frameset to display the menu separated from the content. If you go to my absolutely outdated Y2K-page (also in german), you can see something similar.
If you think you like it, I can tell you more about frames. I've used no CGI or SSI or any other sophisticated technique on these pages.

Bye,
Marcus



JennyW
journeyman

Jul 3, 2001, 6:56 PM

Post #121 of 123 (7662 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus!

GUESTBOOK

Well I found another guestbook, but this oneís a little more complicated to configure.

Iím having quite a bit of problems running the script.
First, Iím receiving this message when running itÖ

In Reply To
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, Your Webmaster and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

I donít know what I did to generate this error?

The script I got is called Guestex. You can view it here if you need to:

http://www.cgihk.com/scripts/guestex/

Hereís the link to the readme file for this script:

http://jennyw4.netfirms.com/guestex/for_viewing_only/readme.html

Here are the .cgi / .pl scripts for this guestbook.
Below are two of the same scripts, except one of them has my changes implemented.

Original:

http://jennyw4.netfirms.com/guestex/for_viewing_only/guestex_original.txt

My changes:

http://jennyw4.netfirms.com/guestex/for_viewing_only/guestex.txt

Hereís a .pl file I didnít edit at all:

http://jennyw4.netfirms.com/guestex/for_viewing_only/guestex.pl.txt

Hereís a few places I think I made errors in (refer to readme link):

2. Editing options

$guestex
# Path to the core part of Guestex, guestex.pl


$guestdata
# Path to the data file

$header
# Path to the HTML header


$footer
# Path to the HTML footer

$rec_temp
# Path to the Record template


$filter
# Domain filter, strongly recommended to set this to your server
# Set to 1 to enable, 0 not to disable

@domains
# Domain filter, strongly recommended to set this to your server
# So that people cannot edit the submission form to perform any unwanted actions
# For multiple domains, write like this -> ("astronomy.org.hk", "anothersite.com")


I donít know where else I could have gone wrong. I guess in many places. Iím unsure. I know this is a big post, so donít rush to get back. I know youíre busy, and I appreciate all the help youíve already generously given to me.

Ohh, I almost forgot two important things...

4. Installing cgi-lib.pl in the readme file writes the following:

In Reply To
Download cgi-lib.pl if you don't have it. Place it in the same directory with quirex.cgi and set its permission to 755.

The problem is quirex.cgi isnít the script Iím working with, Iím testing Guestex.cgi.

Do you think this is a readme file error?

Also,

5. Setting permissions in the readme file writes the following:

In Reply To
Upload all the files. Set their permissions as shown below:
chmod 755 guestex.cgi
guestex.pl

chmod 666 guestex.dat

chmod 644 header.txt
footer.txt
record.txt

The problem here is the readme file doesnít tell me what directory to put these files in.
Also, there are more files involved with this Guestbook - HTML and GIF files, but Iím not told where to place them.
==================================================
SERVER SIDE INCLUDES


In Reply To
What you are trying to do sounds to me as if you should use frames in your HTML.

Iím quite familiar with frames and have tested with them several times in the past. Iím not a big fan of them. They would not suit my sites needs. I believe I can heavily benefit with the actions of SSI. However, thanks for the frames suggestion. Iím glad you mention everything thatís on your mind, because that way youíll be able to understand thoroughly what the person your writing to is looking for. Youíre very astute!

Do you know of any SSI forums?

Thanks,
Jenny



mhx
Enthusiast / Moderator

Jul 4, 2001, 10:57 AM

Post #122 of 123 (7655 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

let's go directly to the options in your configuration file. I assume you have the gifs uploaded to www/guestex/ and all the other stuff (except for the html's) to cgi-bin/guestex/.
I'm quite sure one of the problems - if not the only one - is the paths in your config file. Either, you should use just the following:

Code
#################################### 
# Path to the core part of Guestex, guestex.pl
$guestex = "guestex.pl";

####################################
# Path to the data file
$guestdata = "guestex.dat";

####################################
# Path to the HTML header
$header = "header.txt";

####################################
# Path to the HTML footer
$footer = "footer.txt";

####################################
# Path to the Record template
$rec_temp = "record.txt";

or the full server paths (as you recall from an earlier post):

Code
#################################### 
# Path to the core part of Guestex, guestex.pl
$guestex = "/home/ wherever /cgi-bin/guestex/guestex.pl";

####################################
# Path to the data file
$guestdata = "/home/ wherever /cgi-bin/guestex/guestex.dat";

####################################
# Path to the HTML header
$header = "/home/ wherever /cgi-bin/guestex/header.txt";

####################################
# Path to the HTML footer
$footer = "/home/ wherever /cgi-bin/guestex/footer.txt";

####################################
# Path to the Record template
$rec_temp = "/home/ wherever /cgi-bin/guestex/record.txt";

After adjusting this, the script should work. At least this should be a better basis to search for other errors...

In Reply To
The problem is quirex.cgi isnít the script Iím working with, Iím testing Guestex.cgi.
Do you think this is a readme file error?

Yes I think the author just left some copy/paste text unchanged here. As I just see your writing of guestex.cgi, always be sure the case of the file names is correct when uploading. It's normally best to keep everything in lowercase. While this doesn't matter if you use Windows, it matters after uploading to a Unix server. Wrong/mixed case may also cause severe errors.

In Reply To
The problem here is the readme file doesnít tell me what directory to put these files in.
Also, there are more files involved with this Guestbook - HTML and GIF files, but Iím not told where to place them.

I've put a note at the top where I assume those files were placed.

Bye,
Marcus



JennyW
journeyman

Jul 7, 2001, 3:20 PM

Post #123 of 123 (7637 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus-hx!

In Reply To
As I just see your writing of guestex.cgi, always be sure the case of the file names is correct when uploading. It's normally best to keep everything in lowercase. While this doesn't matter if you use Windows, it matters after uploading to a Unix server. Wrong/mixed case may also cause severe errors.

Ok, Iíll start from the top!

I changed the case of all of my files (except the one html file Ė test.html) before I uploaded. The reason I changed the case was for the following reasons:

1. Netfirms.com writes the following on their websiteÖ


In Reply To
You must place all your html and image files in the 'www' directory. Only files placed in the 'www' directory can be viewed on your website. Keep all filenames in lowercase characters. Your main page should be called index.html or index.htm.The webserver first looks for index.html and if not there it looks for index.htm

2. My guestex files were written like this when unzipped and viewed on a Windows platform:

Guestex.cgi
Header.txt
Header.txt etc. etc.

3. And the funny thing is when I viewed those same files in WSFTP they looked like thisÖ

GUESTEX.CGI
HEADER.TXT
HEADER.TXT etc. etc.

4. So, any files that had capital letters I changed to small caps, since Netfirms asks files to be in lower caseÖ

guestex.cgi
header.txt
header.txt etc. etc.

With the above file names (small caps) I made the adjustments you recommended in your last post, my tests were unsuccessful.

So, I thought Ė letís start from the beginning! I erased everything and unzipped the .zip file again, BUT this time I left the file names at there original state (with capital letters: #2 and #3 - above).


In Reply To
let's go directly to the options in your configuration file. I assume you have the gifs uploaded to www/guestex/ and all the other stuff (except for the html's) to cgi-bin/guestex/.
I'm quite sure one of the problems - if not the only one - is the paths in your config file. Either, you should use just the following:

####################################
# Path to the core part of Guestex, guestex.pl
$guestex = "guestex.pl";


or the full server paths (as you recall from an earlier post):
####################################
# Path to the core part of Guestex, guestex.pl
$guestex = "/home/ wherever /cgi-bin/guestex/guestex.pl";

After adjusting this, the script should work. At least this should be a better basis to search for other errors...

Ok, so as I wrote, without making adjustments to the file names, I tested the two options you recommended in your last post), but I was still unsuccessful.

Iím stumped?


Below is a list of all of my files. I placed them in the following directories (I made guestex directories in the www and cgi-bin directories):

cgi-bin/guestex

Guestex.cgi
Guestex.dat
Guestex.pl
Footer.txt
Header.txt
Record.txt

www/guestex

test.html
Ball.gif
Ballhalf.gif

In my last post I thought I had to access this file to view my guestbookÖ

http://jennyw4.netfirms.com/cgi-bin/guestex/GUESTEX.CGI

But later I learned that I should be using this file, at least I think I should, Iím kinda confused.

http://jennyw4.netfirms.com/guestex/test.html

But when I access the url above and click submit I receive the GUESTEX.CGI link and then I get this message:


In Reply To
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, Your Webmaster and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

I donít even know if I should be accessing test.html?

The readme file tells me to test the script like this, but I donít know what it means?


In Reply To
- You can view the guestbook with the URL
http://www.mysite.com/cgi-bin/guestex.cgi?page
where page is the page number

Hereís the full readme file:

http://jennyw4.netfirms.com/guestex/for_viewing_only/readme.html

Hereís my path to my cgi-scripts in my test.html file:


Code
<form action="http://jennyw4.netfirms.com/cgi-bin/guestex/GUESTEX.CGI" method=post>

You can view my source at: http://jennyw4.netfirms.com/guestex/test.html

Here are my cgi-scripts:

http://jennyw4.netfirms.com/guestex/for_viewing_only/Guestex.cgi.txt

http://jennyw4.netfirms.com/guestex/for_viewing_only/Guestex.pl.txt

Hereís the original Guestex.cgi file, without my modifications:

http://jennyw4.netfirms.com/guestex/for_viewing_only/guestex_original.txt


I canít seem to figure out whatís going on. What do you think?

Thanks,
Jenny


First page Previous page 1 2 3 4 5 Next page Last page  View All
 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives