|
-
Feb 8th, 2010, 07:11 PM
#1
Thread Starter
Frenzied Member
Addition script
Can someone please help me to get this piece of code to work... all i get is a 'Wait' displayed when i run it off a server
Code:
#!/usr/bin/perl
$lock_dir = 'Total';
$d = mkdir $lock_dir, 0777;
if ($d == 1 ){
open(FILE,"Total.txt");
$oldCount=<FILE>;
close(FILE);
open(FILE,">Total.txt");
$newCount=$oldCount+1;
print FILE "$newCount\n";
close(FILE);
rmdir $lock_dir;
} else {
$newCount = 'Wait';
}
print "Content-type: text/plain\n\n$newCount\n";
-
Feb 8th, 2010, 07:25 PM
#2
Re: Addition script
I don't know perl, but are you sure it is creating the directory properly?
Looks to me it is checking if the directory was created successfully, if not it will go to the else.
-
Feb 8th, 2010, 11:28 PM
#3
Thread Starter
Frenzied Member
Re: Addition script
The strange thing is that it works on my own server XAMPP..but not on my webpagenotification.onlinewebshop.net server (this is a free hosted site)
Do you think the free site would have some sort of restrictions?
-
Feb 9th, 2010, 12:27 AM
#4
Re: Addition script
Be sure you've allowed write permission for your script - ie, the directory in which you're trying to create a directory, should have permissions set to 777. Your host may have a restriction, but they usually don't care if you create directories in your own web space...
-
Feb 9th, 2010, 12:39 AM
#5
Re: Addition script
What do you want the code to achieve?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Feb 9th, 2010, 01:18 AM
#6
-
Feb 9th, 2010, 02:55 AM
#7
Thread Starter
Frenzied Member
Re: Addition script
Can i give one of you my ftp logon and password for my site to help me set it up... im pretty sure that i have everything correct... but it still wont work.
-
Feb 9th, 2010, 09:14 AM
#8
Re: Addition script
pm it to me if you'd like, I'll take a look later today.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|