php will return you four $vars to work with.
check this out.
http://www.php.net/manual/en/features.file-upload.php

then work with the tmp file and get done with it what needs to be done
before the script closes cause php will delete the file when the script is
done.

jim
----- Original Message -----
From: "M" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 2:45 PM
Subject: [PHP] OPEN_BASEDIR from user point of view (instead server admin)


> Hello, I posted a question some days ago, but no answers received. I
> notice many people discussing OPEN_BASEDIR apache restriction here, but
> all discussion are from server admin point of view.
>
> Let me ask question in another way:
>
> Is it possible to tell HTTP <FORM ....> command the complete path/name
> into local server for file being uploaded?. Note upload made by <input
> type=file  ..> command.
>
> The reason for this question is posted into my original question (below)
>
> Thanks
>
> Miguel
>
> ===================== previous msg posted at 10/12/01 =========
>
> Now a question about uploading files (.gif .jpg) using <form
> method=post> to be stored into Mysql blob fields.
>
> I hope somebody here having sites on www.blueboxinternet.com hosting
> company, because I have big trouble there I can't solve, and support
> says I first shoud read faq because they have lot of customers with no
> problems.
>
> I make industrial and commercial catalogs, so my customers should be
> able to send (upload) pictures of products and goodies directly from
> their HD to site, these pictures stored in Mysql tables and shown when
> customer pages are called by someone.
> The only way I know to perform this is
>
> <html>
> <Form action"myscript.php" method="POST" Enctype="MULTIPART/FORM-DATA">
> Enter filename <input type="file" name="myfile">
> <Input type="submit" name="upload" value="send">
> </form>
>
> <?PHP
>   if($upload)
>   {
>     $fp=Fopen ($myfile,"r");
>
>    /* here lot of commands to store file into mysql tables */
>     ...
>   }
> ?>
> </html>
>
> This script will store picture-file into some tmp directory on bluebox
> servers and will return tmp file name into $myfile var when script
> called again by 'form action' command. Then I can treat file and store
> in DB.
>
> This script worked fine on bluebox servers .... until NOVEMBER 1st ,
> when they made some important changes on their servers. When this change
>
> happened, my script began to receive this error:
>
> Warning: open_basedir restriction in effect. File is in wrong directory
> in
> /home/httpd/vhosts/meucatalogo.com/web_users/gratis/rest_prox.php on
> line 25
>
> Bluebox support says I am recording my files on tmp directory with owner
>
> 'someowner' and trying to read file with 'anotherowner' owner.
> I argue I have no control about owners and file modes into their servers
>
> (specially into their tmp directories), and that PHP performs this task
> in a transparent way for me. Thats to say, I have no tools to bypass
> this problem.
> Then they answer I shoud read faq.
>
> Case some of you have site using this (otherwise excellent web hosting)
> company, I would greatly appreciate what solution for upload files thru
> HTML forms there exists.
> =============================================
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to