Gossamer Forum
Home : General : Perl Programming :

Major Problem..

Quote Reply
Major Problem..
The open file and save that I have been using for some of my scripts have all of a sudden stopped saving the file...

Code:
open(FILE, ">> links.txt");
print FILE "$sitename | $url | $desc |", "\n";

open(MAIL, "|$mail_path -t") || die "Cant open $mail_path\n";
print MAIL "From: crashinto\@crashinto.com\n";
print MAIL "To: addurl\@crashinto.com\n";
print MAIL "Subject: New link added\n\n";
print MAIL "Website title: $sitename\n";
print MAIL "Address: $url\n";
print MAIL "Description: $desc\n";
close(MAIL);

close(FILE);
This will send me the email with the correct information of what link was added, but it will not print to links.txt

-------------
Jeremy
Quote Reply
Re: Major Problem.. In reply to
Possibly links.txt has become too big and you have hit your limit allowance with your web-host.

Try backing up links.txt to your local drive and starting from a blank links.txt again.

- Mark

Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Major Problem.. In reply to
Try:

open(FILE, ">> links.txt") || die "Can't open links.txt : $!";

...at least then you can see the reason Smile

Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Quote Reply
Re: Major Problem.. In reply to
Paul, I know that is what I should put in there, but when I did all it did was make a it a blank page for some reason.

And there is only a few links in links.txt so it not a big file.

It has worked before but all of sudden it's not and my host doesn't know anything.

-------------
Jeremy
Quote Reply
Re: Major Problem.. In reply to
You may want to close(FILE); before you open(MAIL..);

Thats just a side-point.

Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Quote Reply
Re: Major Problem.. In reply to
Nope that still didn't help it.. Could it just be the host's server?

My host is Liquid Web

-------------
Jeremy
Quote Reply
Re: Major Problem.. In reply to
Make sure you cover every possibility...

Code:
open(FILE, ">>/FULL/PATH/TO/links.txt") || die "Error : $!";
Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Quote Reply
Re: Major Problem.. In reply to
Nope that still didn't work...

-------------
Jeremy
Quote Reply
Re: Major Problem.. In reply to
...and you don't get any errors?

Code:
open(FILE, ">>/path/to/links.txt") || die "links.txt : $!";
print FILE "$sitename | $url | $desc |\n";
close(FILE);
That is DEFINITELY correct so if it doesn't work, email your host.

Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Quote Reply
Re: Major Problem.. In reply to
nope no errors, I emailed my host and they said they only check permissiions and paths to cgi to see if they work...

-------------
Jeremy
Quote Reply
Re: Major Problem.. In reply to
Hmm they don't sound very nice.

Tell them that the code is 100% correct so it is a server issue and if they don't help you'll leave and you'll tell all your friends not to sign up with them Smile.

Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Quote Reply
Re: Major Problem.. In reply to
just signed up with them sunday my last host was hit by that code red virus.

-------------
Jeremy
Quote Reply
Re: Major Problem.. In reply to
Mmm...big bugger Frown

Try Pauls suggestion! You never know where it may get you Smile

Andy

webmaster@ace-installer.com
http://www.ace-installer.com