[imp] attachment problem

Jason Keltz jas@cs.yorku.ca
Fri, 24 Nov 2000 11:56:44 -0500 (EST)


Okay.  I think I did it.  I think I finally figured out what's up with
attachments after a load of experimentation.

I don't think that /tmp is the problem after all.  (This certainly
surprise me!)

Forgetting about the upload_tmp_dir for a moment, if I change the tmpdir
function in compose.php3 to always return "/tmp", I get an error on
attaching files...  Change it to "/var/tmp" and it works!  However, change
it to return "/tmp1" (after creating the dir with same permissions as
/tmp) or "/blah" (same), it doesn't work either!

Looking at a trace of the server running, I can see that no matter what
directory I choose, the file is first written to /var/tmp.  The system
then tries to open the file in the *proper* location, but it's not there
because it's in /var/tmp.

Looking at "strings" from the php module, I see:

TMPDIR
/var/tmp/

.... and though I'm having a hell of a time trying to *prove* it, I think
that at *some* point during the attach file, TMPDIR gets set, but then
it's cleared?  I'm confused..

Any ideas?

Jas.

On Thu, 23 Nov 2000, Anil Madhavapeddy wrote:

> Jason Keltz wrote:
> > I figured it out!!
> >
> > This is one of those errors that lets you know it is time for a coffee
> > break.
>
> Great idea! :-)
>
> >
> > Configuration file path for the file php.ini should have been
> > /cs/local/lib/php
> >
> > Including the "php.ini" on the end, caused the system to choke because it
> > wanted to find:
> > /cs/local/lib/php/php.ini/php.ini
> >
> > To test this out, I created a php.ini directory, and copied php.ini to
> > that directory, and it worked.
> >
> > This wasn't even in the PHP FAQ.  I guess I'm the first person to make
> > this mistake.  Do I win a prize?
> >
>
> Well, you said you'd tested that the php.ini was being read by
> putting in the other loadmodule commands, so I assumed that was
> correct.  You could drop a line to the phpdoc people to request
> them to clarify it however (or put a note in the online annotated
> manual; these find their way back into the main documentation when
> reviewed)
>
> > This *still* doesn't explain why the default of /tmp does not work on
> > Sparc Solaris.  swapfs shouldn't make a difference to the underlying
> > program.
> >
>
> Hmm, no it shouldn't.  Something is screwy there.  If you are really
> interested in finding out, create a very simple PHP script to test
> file uploads independently of everything else, and start narrowing
> the problem down.
>
> --
>  Anil Madhavapeddy / "Oi luv moi brick!"
>  anil@recoil.org   /       - Father Jack
>
> --
> IMP mailing list: http://horde.org/imp/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>