HELP! subroutine is making me cry! 
Author Message
 HELP! subroutine is making me cry!

Hello -

I am writing a script which sends images via sendmail on user (form)
input. Everything works beautifully. However I must do some simple
logging of how many of each image the user chooses to send. I'm using a
simple sub which opens and increments a file. The subroutine works
perfectly when called alone - but will not open and write to the file
AFTER sending the image - it is just ignored.

Question:

is there something I must flush after closing my mail program?  - in
order to open and write to the count.txt file?

I have my successfull redirect in the mail subroutine and it's seemless
- but appending my <&count_this;> call seems to be ignored.

I've tried everything I can think of - now I will be fired and homeless
unless one of you super-heros assists!

relevant code available upon request - no suggestion to silly.

thank you - I love you!

jenifer west
P I X E L, Inc.

http://www.*-*-*.com/



Fri, 25 Feb 2000 03:00:00 GMT  
 HELP! subroutine is making me cry!

[ is that *ny.com mean that you are in New York City?  if so,
you might want to check out NY.pm <URL:http://ny.pm.org> - the
fledgling New York Perl M((o|u)ngers|aniacs)* user group :) ]

Quote:
>I am writing a script which sends images via sendmail on user (form)
>input. Everything works beautifully. However I must do some simple
>logging of how many of each image the user chooses to send. I'm using a
>simple sub which opens and increments a file. The subroutine works
>perfectly when called alone - but will not open and write to the file
>AFTER sending the image - it is just ignored.

are you sure that it is ignored (for instance, does open() return
an error and do you trap it?).

Quote:
>I have my successfull redirect in the mail subroutine and it's seemless
>- but appending my <&count_this;> call seems to be ignored.

a redirect huh?  do i smell CGI?

Quote:
>relevant code available upon request - no suggestion to silly.

well, how about the subroutine in question for starters?

--



Fri, 25 Feb 2000 03:00:00 GMT  
 HELP! subroutine is making me cry!

Quote:

>Hello -

>I am writing a script which sends images via sendmail on user (form)
>input. Everything works beautifully. However I must do some simple
>logging of how many of each image the user chooses to send. I'm using a
>simple sub which opens and increments a file. The subroutine works
>perfectly when called alone - but will not open and write to the file
>AFTER sending the image - it is just ignored.

>Question:

>is there something I must flush after closing my mail program?  - in
>order to open and write to the count.txt file?

>I have my successfull redirect in the mail subroutine and it's seemless
>- but appending my <&count_this;> call seems to be ignored.

>I've tried everything I can think of - now I will be fired and homeless
>unless one of you super-heros assists!

>relevant code available upon request - no suggestion to silly.

>thank you - I love you!

I'm sure you will get better help in this group, but I'm acting fast
to get in a suggestion on this one :)

To do this I will assume the subroutine works from a shell account on
a UNIX machine, but does not work when ran from the browser.  This may
be because you are writing to a directory owned by you.  Problem can
occur from browser if browser logs on as a different user, which is
what happens at my ISP.  It can be solved by either writing to a
directory that you make writable by the browser uid, or by enabling
setuid for the perl script via a C wrapper.  I won't go into details
unless you think I guessed the problem.

Sorry if I completely missed the mark.

Dave

|
| Please visit me at http://w3.one.net/~dlripber
|
| For reply by email, use:

|________



Sat, 26 Feb 2000 03:00:00 GMT  
 HELP! subroutine is making me cry!

Quote:
> I'm sure you will get better help in this group, but I'm acting fast
> to get in a suggestion on this one :)

> To do this I will assume the subroutine works from a shell account on
> a UNIX machine, but does not work when ran from the browser.  This may

> be because you are writing to a directory owned by you.  Problem can
> occur from browser if browser logs on as a different user, which is
> what happens at my ISP.  It can be solved by either writing to a
> directory that you make writable by the browser uid, or by enabling
> setuid for the perl script via a C wrapper.  I won't go into details
> unless you think I guessed the problem.

> Sorry if I completely missed the mark.

> Dave

Dave:

  Your guess should be true to my situation now.  I run the program
perfectly in my account or even the cgi-bin directory, but behavior
weirly on the brower, like, I can't open the text file to read and can't
pipe the data from a java program.

  Can you tell me how to set the uid up? I just got my feet wet in the
Unix system.

Thanks
Sue



Thu, 02 Mar 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. HELP! Subroutine is making me cry!

2. Another new programmer cries for HELP!

3. A Cry for Help - Cant get the hang of Mail::Address->parse

4. Newbies cry for help

5. Newbie cry for help!

6. A cry for help in building pTk :-(

7. Why am I getting an undefined subroutine error?

8. subroutine ref makes a script hang using strict

9. Making my subroutine more secure and efficient?

10. Making an lvalue subroutine for a tied scalar in XS

11. Ways of making this subroutine faster

12. Making an lvalue subroutine for a tied scalar in XS

 

 
Powered by phpBB® Forum Software