Newbie Needs Help

Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2005
Posts: 12
Reputation: fareen is an unknown quantity at this point 
Solved Threads: 0
fareen fareen is offline Offline
Newbie Poster

Re: Newbie Needs Help

 
0
  #11
May 7th, 2005
Hi,
Thanks a lot.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 12
Reputation: fareen is an unknown quantity at this point 
Solved Threads: 0
fareen fareen is offline Offline
Newbie Poster

Re: Newbie Needs Help

 
0
  #12
May 9th, 2005
Hi Comatose


I'll start building some code............
I'll start working on that tonight.........
Desperately waiting!!

Fareen
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Newbie Needs Help

 
0
  #13
May 9th, 2005
Fareen,

The code is almost done, actually. There are 2 issues, left however, that I am working on resolving. One of those is setting a session cookie, which shouldn't be any kind of problem, but I still need to code that peice. The other, is having the links to the files work to download them. I can fix that issue also, but I'll need a little bit more time. Also, have you modified the password file to contain the business code at the end of the passfile?

Also, the page is very very plain, that will require your HTML touches to make it work for you and your company, but right now this is what I have:

http://www.aftermath.net/~coma/cgi-bin/business.pl

Username, Password: test test
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 12
Reputation: fareen is an unknown quantity at this point 
Solved Threads: 0
fareen fareen is offline Offline
Newbie Poster

Re: Newbie Needs Help

 
0
  #14
May 9th, 2005
Hi,
That Works GREAT.
I don't have words to express.
Thanking you in advance.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Newbie Needs Help

 
0
  #15
May 9th, 2005
alright, it's done. I'm attaching the perl source code. There is 1 spot that you need to focus some attention to... I have my aliases set up to default over-write anything that I try to copy. So, if I try to copy a file to say /home/coma, and the same filename already exists there, my linux setup will automatically over-write the one that's already there. You need to setup your box's alias for whomever the account is that will be running this script to automatically over-write should the file exist. Anyway, I've attached the mock passfile, and the perl file in a .zip file. Let me know how it goes.
Attached Files
File Type: zip business.zip (2.2 KB, 6 views)
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 12
Reputation: fareen is an unknown quantity at this point 
Solved Threads: 0
fareen fareen is offline Offline
Newbie Poster

Re: Newbie Needs Help

 
0
  #16
May 11th, 2005
Hi Comatose,

I get this error:

[Thu May 12 03:20:21 2005] [error] [client 127.0.0.1] Prototype mismatch: sub main::head vs ($) at /var/www/bank/cgi-bin/business.pl line 5
[Thu May 12 03:20:21 2005] [error] [client 127.0.0.1] Died at /var/www/bank/cgi-bin/business.pl line 319.
[Thu May 12 03:20:23 2005] [error] [client 127.0.0.1] Prototype mismatch: sub main::head vs ($) at /var/www/bank/cgi-bin/business.pl line 5, referer: http://www.mysite.com/cgi-bin/business.pl
[Thu May 12 03:20:25 2005] [error] [client 127.0.0.1] Prototype mismatch: sub main::head vs ($) at /var/www/bank/cgi-bin/business.pl line 5, referer: http://www.mysite.com/cgi-bin/business.pl
[Thu May 12 03:20:25 2005] [error] [client 127.0.0.1] sh: line 1: ffile: Permission denied, referer: http://www.mysite.com/cgi-bin/business.pl
[Thu May 12 03:20:25 2005] [error] [client 127.0.0.1] I suck at /var/www/bank/cgi-bin/business.pl line 260., referer: http://www.mysite.com/cgi-bin/business.pl
[Thu May 12 03:20:25 2005] [error] [client 127.0.0.1] Premature end of script headers: business.pl, referer: http://www.mysite.com/cgi-bin/business.pl

I installed the
perl -MCPAN -e'install LWP:imple'
but still i get above error. Please help.
fareen
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Newbie Needs Help

 
0
  #17
May 11th, 2005
I'm willing to bet that the protocol mismatch is because you are supposed to be using https, and you are using http, I could be mistaken, so give it a shot and let me know.

Also, you don't need LWP, and if you don't want to have it installed (thought it is extremely handy) you can remove that from your server, along with the line of: use LWP, because it's not required. In fact, make sure that you take out the use LWP:imple, because not only is not needed, I think it's causing problems on your system.

Also, did you make sure to change all the variables at the top of the script, so that they point to your folders, and https paths? Make those changes, and if there is still problems, attach the .pl file in an e-mail to me.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 12
Reputation: fareen is an unknown quantity at this point 
Solved Threads: 0
fareen fareen is offline Offline
Newbie Poster

Re: Newbie Needs Help

 
0
  #18
May 13th, 2005
Hi Comatose,
I beg your pardon.
I have realised my mistake and your script is perfect. Its PERFECT
One more ?
When (text) files are open in the browser and clicked the data is displayed in the browser , but when right clicked to Save Link Target As it does not download and save the file. Please this is very important. When the branches wants to download the particular file they will just right click and save the file on their machine.
I will be highly thankfull for this.
Hoping for a favourable reply.
Thanking you in advance.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Newbie Needs Help

 
0
  #19
May 13th, 2005
*Yikes*

I'll see what I can do.... let me give you the breakdown of WHY it is this way. The decision then will be yours to make regarding the use of such. The files that the people of the branches want to download (those are in some other folder... like: /var/www/bank/reports/*) Those paths, as far as I know, are NOT accessible to someone surfing the web. In order to make those files accessible, the program copies the file from it's original location, and saves it onto the root of the webserver, but it only does so, AFTER they click the link (the actual HREF of the link, points to the CGI, with the filename as a parameter). When the CGI see's this, (the person clicked a filename) it copies the file to the web server directories, and then redirects the browser to the newly copied file. This was made to aid in security and privacy of those files. However, It is entirely too possible for me to copy all the files to the webserver folders when the links are created, and simply HREF those.... that choice is yours...
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 12
Reputation: fareen is an unknown quantity at this point 
Solved Threads: 0
fareen fareen is offline Offline
Newbie Poster

Re: Newbie Needs Help

 
0
  #20
May 14th, 2005
Hi,
I am glad & highly thankfull to you for showing me your willingness to see into the subject.
Thanks a lot for the explanation. You are great.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 5730 | Replies: 21
Thread Tools Search this Thread



Tag cloud for Perl
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC