Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-16-2001, 06:06 PM   #1
Rip
Confirmed User
 
Join Date: Jan 2001
Location: somewheres wet
Posts: 1,456
Perl frustrations

I dunno how may people here write their own scripts, but if you do -
don't you just hate it when you think up this really great script, you get to work on a coding frenzy only to find the script isn't working
2 hours later after 4 diet cokes and two or three debugging headaches you go for a walk

come back, sratch your butt, look at the code, and a light bulb appears above your head... you scroll up the page, examine the variables thinking that you have mis-spelled something, only to find an erroneous missing semi colon, you add the semi colon and everything works

I suppose it could be worse and nothing works even after you fix the semi colon

------------------
Make dirty money from your surfers Dirty Gold
Jack Thumbs TGP Search Engine Driven TGP - Pages LISTED INSTANTLY
Rip is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-16-2001, 06:12 PM   #2
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
go with php

its similar to perl but much easier to catch your errors

my 2 cents

------------------
Best Free CJ script

icq: 6757061
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-16-2001, 06:53 PM   #3
Mark
Confirmed User
 
Join Date: Jul 2001
Posts: 600
Yep!

But '-w' and 'use Diagnostics' etc. can help spot those little annoyances..


-------------------------------------------
Start Your Own Adult Search Engine - FREE http://www.pussify.com

Mark is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-16-2001, 07:21 PM   #4
Phil21
Confirmed User
 
Join Date: May 2001
Location: ICQ: 25285313
Posts: 993
uh.. perl has one of the best error outputs I've ever seen. Try coding C!

A missing semicolon would have been caught by the interpreter and reported as such. You ARE running your non-working scripts on the command line right?

-Phil
Phil21 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-16-2001, 07:30 PM   #5
Rip
Confirmed User
 
Join Date: Jan 2001
Location: somewheres wet
Posts: 1,456
The problem I run into, is when I expand the script to "write" files to the server, then I run into problems, I have to "test" the script on my server and can't seem to run it on the desktop without a file folder renaming campain

maybe there is a better way to do this?
Rip is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-16-2001, 07:41 PM   #6
Phil21
Confirmed User
 
Join Date: May 2001
Location: ICQ: 25285313
Posts: 993
Yes and no..

do you have ssh (or telnet) access to your host? If so, you can ssh in, and run the script there. All errors will be dumped to stdout, which is your terminal.

alternatively, print the HTTP header at the VERY top of the script right after your #!/usr/bin/perl line so *most* errors will be output to the web browser. Then comment out that print statement when the script is working.

-Phil
Phil21 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2001, 04:24 AM   #7
TheFLY
So Fucking Banned
 
Join Date: Jan 2001
Location: http://www.thefly.net/ --- Quit your job and live off steady traffic.
Posts: 11,856
Phil!

Yeah man I upload all my Perl code right onto the server and test it there... Even when traffic is running through it! As soon as I upload it, I do a "perl -c file.cgi" -- never tried the -w switch -- maybe it's useful? ;)

Once you get used to coding in Perl (or programming in general) you will usually get your code all right the first time -- and if anything goes wrong, you can usually figure out the problem quickly because most programming errors are easily spotted just like you said -- missing semi-colon, unmatched {'s, and non-escaped HTML quotes and email addresses ;) \" and \@

Besides women, a good beer, or a juicy hamburger, there's nothing more satisfying than coding an entire program in Perl, uploading it, and having it pass the perl -c test the first time w/o errors ;)

hehe

PHP is very cool too but not nearly as powerful as Perl. Use both!

------------------
...from the nectar of the Bone flows all that clicks...
TheFLY is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2001, 04:37 AM   #8
TheFLY
So Fucking Banned
 
Join Date: Jan 2001
Location: http://www.thefly.net/ --- Quit your job and live off steady traffic.
Posts: 11,856
In the rare event that the script has no errors, yet it still does not work -- you can also add in code that will email you debug information... what is also fun is finding the email address of your cell phone and having info sent to you that way...

I used to get hourly hit reports to my cell phone before I got tired of watching the stats ;) For example if you are worried about your script crashing while you are away on a trip -- emailing errors to your cell phone could save your ass! (I think I got that idea from the hotmail programmers).

You can also output debug info to a file... Also let's say someone is trying to cheat your script -- you can set up some code to track an individual IP and log all of that person's activities w/o them knowing...

------------------
...from the nectar of the Bone flows all that clicks...
TheFLY is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2001, 05:31 AM   #9
Mark
Confirmed User
 
Join Date: Jul 2001
Posts: 600
You could also try adding the following somewhere near the top of the script..

use CGI::Carp qw(fatalsToBrowser);

Mark is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2001, 06:56 AM   #10
Susan
Confirmed User
 
Join Date: Feb 2001
Location: Amost UK central
Posts: 772
Rip

Build yourself a cheap Linux or FreeBSD box setup sql sendmail and all the stuff you need to develop your scripts offline.
Susan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2001, 05:10 PM   #11
Rip
Confirmed User
 
Join Date: Jan 2001
Location: somewheres wet
Posts: 1,456
That's a good idea Susan

But I am extremely happy today, since I have my script working, I am sure lots of other people have stuff like this already, but it will save me a great deal of work and time.

It updates, and writes 1,344 headers and footers over 24 domains in a minute or so. For me this means I can update all those little free sites are going to be a lot easier to change and update banners and stuff I just have to load it on another server, but it works good so that will be no trouble

The biggest problem is that when I make free time, I usually think up something to waste it on pretty quickly

------------------
Make dirty money from your surfers Dirty Gold
Jack Thumbs TGP Search Engine Driven TGP - Pages LISTED INSTANTLY
Rip is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-18-2001, 12:12 AM   #12
Rod
Confirmed User
 
Join Date: Apr 2001
Location: MTL, QC, CAN
Posts: 1,243
I think that perl is the best way to make your own script, if there isn't a shitload of traffic running into it...

It's really easy to debug I must say
And not really hard to build decent scripts into it

Well, with my book hehe

Rod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.