PDA

View Full Version : PHP Upload using the TMPDIR


SneakyDave
05-11-1999, 03:41 PM
I'm trying to use a script I threw together to see how easy it is to use a form to upload a file to the server.

After reading some of the documentation from php.net, it says that the file to upload is saved in the PHP temporary directory (which seems to be /big/dom/tmp/ on FQ).

I want to take the temporary file and copy it to where it belongs, but it says I don't have access to that directory.

Is it possible to change the temporary directory where the temp file is saved, or is it even possible to use PHP to copy a file from that directory into its "appropriate" directory?

Thanks for your time

Sneaky

SneakyDave
05-11-1999, 04:12 PM
Seems like maybe its a "feature" of the SAFE MODE parameter?

Terra
05-11-1999, 07:43 PM
Yep, this one is a major thorn in my side...

I've tried to massage the PHP3 core code to allow this to happen, but the domino effect keeps kicking in...

--
Terra
--Fix one thing, break another, fix it, break the original fix, fix that, break the whole darn thing--
FutureQuest

Justin
05-11-1999, 08:30 PM
I struggled for weeks and actually started to hate php for a while - that was my first php idea when I first learned it. I though I was doing something wrong for the longest time...

Then I got into other stuff, like mail forms, etc, and couldn't figure why everything worked except for that - I was going nuts!

You're not alone :)

------------------
Justin Nelson
FutureQuest Support

SneakyDave
05-12-1999, 10:23 AM
This may be a dumb question, but would I be able to run a little Perl script inside of the PHP that would just perform the COPY, or wouldn't that work either?

I assume it wouldn't because the execution is still in PHP?

Thanks
Sneaky

pdstein
05-12-1999, 10:42 AM
Uh oh :(

I signed up with FQ last week and have just started transfering my site.[nbsp][nbsp]It relies quite heavily on the file upload support of PHP, allowing clients to upload their own graphics through a form.[nbsp][nbsp]I also use it myself, to update files when I can't FTP.

I need the file upload support or need to find another way to transfer files without using FTP.[nbsp][nbsp]So, far I'm quite impressed with the tech support at FQ.[nbsp][nbsp]I'm confident if anyone can come up with a solution it's you guys. :)

Does anyone know if PHP can read mail?[nbsp][nbsp]Would it be possible to have it parse a mail message and move an attached file into a local directory?

- Paul

pdstein
05-12-1999, 11:03 PM
Terra,

Are you going to make another effort to support the file upload or have you given it up as a lost cause?

I don't mean this to sound like a threat, but the truth is that I really need the file upload capability otherwise it's probably not worthwhile for me to stay with FQ.[nbsp][nbsp]I'd be really bummed if I had to move again, since you've got so many other great features.

- Paul

Terra
05-12-1999, 11:05 PM
There is an alternative that may work for you...

Contact me via email...

--
Terra
sysAdmin
FutureQuest

Terra
05-20-1999, 09:50 AM
I am testing some work-arounds that may tunnel underneath this problem...[nbsp][nbsp]More details will surface soon...

--
Terra
--Black gold, Texas tea--
FutureQuest