Jump to content

lilsadam

Members
  • Posts

    11
  • Joined

  • Last visited

lilsadam's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Gotcha. That makes perfect sense. The host server won't let me create (I'm using html browser) folders in the top level of files (along with the www) folder, so I've messaged support for help on doing this. Asa I get back from vacation, I'll be with you guys. Thanks for all your help on this, David! Take care, ~Adam
  2. I wanted to try and create the directory just as you said, but when I tried to add the folder "Home" to the root of my free server, it wouldn't let me, so I went into one of the premade folders "sys" and created the filestructure in there. I know we're working with servers you're not familiar with. If I switch over to your servers today (paid), do you think you could help me out? I'm willing to complete the signup right now. I just hope this all works. ~Adam
  3. Hi David, Actually, the first time the script encounters a new/unknown username and password combo, it creates a file for it. Then, if a command to call that username in the future is made, the password is checked, and then the data retrieved. The problem is that the directory I'm trying to write to has permissions, yet the script doesn't want to do that.....In the directions, it says: I don't know exactly where to put the directory (besides not in the /www/lilsadam.cogia.net folder <--which I assume is the root). RWD Access? Any ideas? ~Adam
  4. Maybe I will join!! Probably after I get back from vacation (which is why I'm setting up this GPS script......we leave on Saturday) One last quick question: I was following these steps to "test" my script: And I'm getting quite a few different errors: You can try the different url combinations here: http://servername/netgps.pl http://servername/netgps.pl?un=joe&pw=bloggs http://cogia.lilsadam.net/netgps.pl?un=joe...202,11.8,E,S*07 http://servername/netgps.pl?un=joe&pw=bloggs http://servername/netgps.pl?un=joe&pw=bloggs33 Then if you search the script for these errors, the always occur after a call for "FNAME" like here: >#---------------------------------- # Remote is calling, supplying coords. sub remote() { if (-e "$filedir$filename") { my $filecont = ''; my $pwd2 = ''; open FNAME, "$filedir$filename" or &failed("Proc error: RCV-FN1"); $filecont = <FNAME> or &failed("Proc error: RCV-FN2"); close FNAME or &failed("Proc error: RCV-FN3"); ($pwd2,) = split /\@/, $filecont; if ($pwd2 ne $password) { &failed("Incorrect password/unknown username."); } } open FNAME, ">$filedir$filename" or &failed("{Proc error: REM-FN1"); print FNAME "$password\@$coords\n" or &failed("Proc error: REM-FN2"); close FNAME or &failed("Proc error: REM-FN3"); } #---------------------------------- Thanks for looking at this again. You guys really are a great support site. ~Adam
  5. YOU ROCK DAVID!!!!!!!!! It works now. This is great. Thanks^100000000. I really appreciate this. Take care, ~Adam
  6. Perhaps this might provide some kind of help? I don't know what the /usr/bin/perl directory means when it talks about it...maybe it's something I should be looking for.... ~Adam
  7. I looked on the help file for the host, and yes, it allows executable scripts in any directory.
  8. Yes, it's set at 0755.
  9. Hey again, I modified the script to read as follows: ># ----- User defined my $filedir = '/sys/Home/Users/lilsadam/'; # NOT in the webroot! my $maxlength = 10; # max length of usernames I know the folder at /sys/Home/Users/lilsadam/ is there and has 755 permissions. But when I navigate to the pearl script using a web browser to http://lilsadam.cogia.net/netgps.pl, I get the following error: I check the error logs and they read: Any other ideas? Thanks again for your help, ~Adam
  10. The GPS2 folder needs to be created outside of or above your www directory. Once you've picked a location and created the directory, then you need to edit the script so $filedir contains the path of that directory. Example: >my $filedir = '/home/users/lilsadam/GPS2'; # NOT in the webroot! <{POST_SNAPBACK}> Will do. Thanks for the welcome!!! I'll let you know how it turns out. ~Adam
  11. Hi Everyone, I'm trying to install this Perl script that will be a webserver for a program called NetGPS. Basically, a client sends GPS coordinates to this server and then any computer (with the username and password) can retrieve them from it. Here's the code for the perl script: >#!/usr/local/bin/perl # netgps.pl # Robert Pepper <robert@peppernet.org> # Version 1.1 # Use at your own risk. Email problems to root@127.0.0.1 # ----- User defined my $filedir = '/your/file/path/'; # NOT in the webroot! my $maxlength = 10; # max length of usernames # ----- Other variables, don't mess with them my $username = ''; my $password = ''; my $mode = ''; my $result = 1; my $returncode = ''; my $coords = ''; my $filename = ''; my %FORM = ''; #----------------------------------- (Unnecessary code removed by TCH-David.) And here are the directions for installing the script: I am slightly confused as to step one (I want to install the script in the root, right? and then pick a directory that is outside of the root.....?). Right now, I have the script installed to the root in my webpage: >http://lilsadam.cogia.net/ with it pointing to the GPS2 folder also in the root. I know that isn't right, but what should I do? Also, I've already changed all the permissions to 755. The error log reads right now: Well, I hope I haven't given too much information (or not enough). Thank you So much for your help in advance. Take care, ~Adam
×
×
  • Create New...