Re: [PHP] upload problem

2008-01-22 Thread Chris
nihilism machine wrote: any ideas why this does not work? 1) the field in the form might not be 'upload1'. 2) the file is too big to upload (> max_upload_size) 3) the /tmp folder might not be writable or full 4) the folder you're trying to write into is not writable (or the drive is full) 5)

Re: [PHP] upload problem

2008-01-22 Thread Daniel Brown
On Jan 22, 2008 8:01 PM, nihilism machine <[EMAIL PROTECTED]> wrote: > any ideas why this does not work? > > > class upload { > > function upload() { > upload::uploader(); > } > > function uploader() { > $FileName = basename($_FILES['upload1']

Re: [PHP] upload problem

2008-01-22 Thread Casey
On Jan 22, 2008, at 5:01 PM, nihilism machine <[EMAIL PROTECTED]> wrote: any ideas why this does not work? class upload { function upload() { upload::uploader(); } function uploader() { $FileName = basename($_FILES['upload1']['name']); if (move_uploaded_file($

Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Eric Trahan
Le 2007-05-08 à 16:50, Richard Davey a écrit : By how much is the difference? Are we talking a few bytes, a few megabytes, what? A 116Kb file produce a 68Kb file on the server. And a 152Kb file produce a 48Kb file on the server... If you then download the file again, is it corrupted, o

Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 2:12 pm, Eric Trahan wrote: > $error = $_FILES['uneimage']['error']; > > That doesn't seem work in PHP 4.1.2... I try it but $error is empty. > > > And the function move_uploaded_file($_FILES['uneimage']['tmp_name'], > $target_path) returns TRUE, so the upload work (in a way !)

Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Richard Davey
Eric Trahan wrote: $error = $_FILES['uneimage']['error']; That doesn't seem work in PHP 4.1.2... I try it but $error is empty. It just means there wasn't an error. And the function move_uploaded_file($_FILES['uneimage']['tmp_name'], $target_path) returns TRUE, so the upload work (in a way

Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Eric Trahan
$error = $_FILES['uneimage']['error']; That doesn't seem work in PHP 4.1.2... I try it but $error is empty. And the function move_uploaded_file($_FILES['uneimage']['tmp_name'], $target_path) returns TRUE, so the upload work (in a way !). The problem is the file that is upload doesn't match

Re: [PHP] Upload problem - final size is different

2007-05-08 Thread Richard Lynch
On Tue, May 8, 2007 11:30 am, Eric Trahan wrote: > The upload work. The user file is uploaded to my destination folder > (page5/) but the file is unreadable and the file size is smaller than > the original file size. > $tmp_name = $_FILES['uneimage']['tmp_name']; > $type = $_FILES['uneimage']['t

Re: [PHP] Upload problem

2003-07-28 Thread Jason Wong
On Monday 28 July 2003 21:47, Rosen wrote: > I have some problem with uploading files on server with PHP. > The upload is ok, but I must set directory permissions with FULL Access - > but this is not a good idea :(( > Have someone idea how I can do this with no setting permissions to full > acess

Re: [PHP] upload problem, urgent plz guy

2003-05-29 Thread Marek Kilimajer
Use move_uploaded_file() instead of copy() fr r wrote: i'm trying to do a very simple thing: upload image but it keep giving me this error although i gave permession on folder: Warning: open_basedir restriction in effect. File is in wrong directory in /var/www/vhosts/negoumelshasha.com/httpdocs/t

RE: [PHP] upload problem, urgent plz guy

2003-05-29 Thread Jay Blanchard
[snip] i'm trying to do a very simple thing: upload image but it keep giving me this error although i gave permession on folder: Warning: open_basedir restriction in effect. File is in wrong directory in /var/www/vhosts/negoumelshasha.com/httpdocs/test4.php on line 9 [/snip] Have you read and tr

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Lee P. Reilly
t is binary safe. > > Matt > - Original Message - > From: Lee P. Reilly <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, November 26, 2002 4:09 PM > Subject: Re: [PHP] Upload problem - PC, *nix, and Max EOL characters > > > > &g

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Matt Vos
No, fgets() reads to EOL, I use it all the time. fread() will read to EOF, if you let it, as it is binary safe. Matt - Original Message - From: Lee P. Reilly <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, November 26, 2002 4:09 PM Subject: Re: [PHP] Upload proble

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Lee P. Reilly
Actually, there appears to be a solution on the PHP.web [http://www.php.net/manual/en/function.fgets.php] "Note: The length parameter became optional in PHP 4.2.0, if omitted, it would assume 1024 as the line length. As of PHP 4.3, omitting length will keep reading from the stream until it reaches

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Lee P. Reilly
Hi, Thanks for the reply. I appreciate your help. fgets() reads to the EOF; not the EOL. Is there something similar to fgets() that I can use? Perhaps where I can state explicity read the file until you encounter and EOL char? Cheers, Lee Matt Vos wrote: > Loop an fgets() > > i.e. > $fp = fope

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Matt Vos
Loop an fgets() i.e. $fp = fopen($file) while ($filerow = fgets($fp,1024)) /* Read 1024 bytes or to EOL, whichever is first) */ { $filerow = str_replace("; ","", $filerow); $filerow = str_replace("# ","", $filerow); $filerow = str_replace("\r","", $filerow); $size = strlen($fil

Re: [PHP] Upload Problem

2002-10-13 Thread Sascha Cunz
Hi, as far as i can follow you, you want to: 1. copy a file from position a to position b. 2. read it from position b. 3. and delete it at position b. Why not read it directly from position a? So what about: $content = implode("", file($userfile)); Anyway: You should initialize $i in any

Re: [PHP] Upload Problem

2002-10-13 Thread Chris Hewitt
[EMAIL PROTECTED] wrote: > >Warning: Unable to open 'C:\\My Documents\\lyrics\\C_DTBS\\SLIME.TXT' for >reading: > Has the webserver got permission to read this file? It does not seem to be under the document root. >No such file or directory in /home/tabzilla/public_html/doadd.php >on line 89 >

Re: [PHP] upload problem...

2002-05-22 Thread Jas
Yeah I tried that as well, no dice, however here is what I the code that DID work. Hope this helps anyone that is trying to accomplish much of the same. Jas wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wednesday 22 May 2002 07:02, Jas wrote: > > Ok here is my error message:

Re: [PHP] upload problem...

2002-05-21 Thread Jason Wong
On Wednesday 22 May 2002 07:02, Jas wrote: > Ok here is my error message: > Warning: Unable to open '' for reading: No such file or directory in > upload_done.php on line 9 > > I have checked permissions on the folder and they are correct, my only > guess is that upon doing several checks, session

Re: [PHP] upload problem...

2002-05-21 Thread Jas
Ok that didn't work, so far if I select a file other than a .jpg it returns me an error which is what I need to happen, however if I select an image with a .jpg extension for upload it tells me the upload was successful but when I check the directory there is never anything there. Any other ideas

Re: [PHP] upload problem...

2002-05-21 Thread Gerard Samuel
Take a look at move_uploaded_file() http://www.php.net/manual/en/function.move-uploaded-file.php Jas wrote: >Ok here is my error message: >Warning: Unable to open '' for reading: No such file or directory in >upload_done.php on line 9 > >I have checked permissions on the folder and they are corr

RE: [PHP] Upload problem

2002-04-11 Thread Johnson, Kirk
Try putting a hidden field like below in your form. Set the value (bytes) to the size you want to be able to upload: Kirk > -Original Message- > From: Frédéric Mériot [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 11, 2002 1:48 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Upload pro

Re: [PHP] upload problem

2001-11-29 Thread Andrey Hristov
var_dump($HTTP_POST_FILES); HTH Andrey Hristov - Original Message - From: "Miguel Loureiro" <[EMAIL PROTECTED]> To: "php-gen" <[EMAIL PROTECTED]> Sent: Thursday, November 29, 2001 6:04 PM Subject: [PHP] upload problem > Hello all, > when I want to do an upload ( form ENCTYPE="multipart

Re: [PHP] upload problem (uid)

2001-04-11 Thread b0ld b0lb
CC: <[EMAIL PROTECTED]> >Subject: Re: [PHP] upload problem (uid) >Date: Tue, 10 Apr 2001 16:15:48 -0700 (PDT) > >Are you sure it is uid 0? Unless your Apache is running as root it should >be getting uploaded as the web server uid id. Use the >move_uploaded_file() function to m

Re: [PHP] upload problem (uid)

2001-04-10 Thread Rasmus Lerdorf
Are you sure it is uid 0? Unless your Apache is running as root it should be getting uploaded as the web server uid id. Use the move_uploaded_file() function to move the file into place. -Rasmus On Wed, 11 Apr 2001, b0ld b0lb wrote: > Hi, > > if i upload via http the tempfile is written with