Re: [PHP] php File upload

2008-08-07 Thread Per Jessen
Tom wrote: > Hi, > > on a linux system (Suese 10.2) with 1 GB memory its not possible to > upload via http a 1 Gb File. Thats no limit problem on my php > config. i can look the mem stats when uploading and the growing tmp > file. If the temp file has 900 MB, Main Memory free is 0 and the > scr

[PHP] php File upload

2008-08-06 Thread Tom
Hi, on a linux system (Suese 10.2) with 1 GB memory its not possible to upload via http a 1 Gb File. Thats no limit problem on my php config. i can look the mem stats when uploading and the growing tmp file. If the temp file has 900 MB, Main Memory free is 0 and the script aborts and php dele

Re: [PHP] File Upload Security

2008-04-11 Thread Wolf
Al wrote: One of my sites has been hacked and I'm trying to find the hole. The hack code creates dirs with "nobody" ownership, so it's obvious stuff is not via ftp [ownership would be foo] Site is virtual host, Linux/Apache I'm concerned about a file uploader my users use to upload photos.

Re: [PHP] File Upload Security

2008-04-11 Thread Bojan Tesanovic
I would recommend something more strong http://www.php.net/manual/en/function.exif-imagetype.php or if you dont have exif http://www.php.net/manual/en/function.getimagesize.php will do also a trick. One more thing, you are also allowing .txt and .css which may be potential hole, as Apache can

Re: [PHP] File Upload Security

2008-04-11 Thread Al
The hack puts this .htaccess in dozens of dirs RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://([a-z0-9_\-]+\.)*(google|msn|yahoo|live|ask|dogpile|mywebsearch|yandex|rambler|aport|mail|gogo|poisk|alltheweb|fireball|freenet|abacho|wanadoo|free|club-internet|aliceadsl|alice|skynet|terra|ya

Re: [PHP] File Upload Security

2008-04-11 Thread mike
How was it "hacked"? That will help determine what kind of exploit might have been used. On 4/11/08, Al <[EMAIL PROTECTED]> wrote: > One of my sites has been hacked and I'm trying to find the hole. The hack > code creates dirs with "nobody" ownership, so it's obvious stuff is not via > ftp [own

[PHP] File Upload Security

2008-04-11 Thread Al
One of my sites has been hacked and I'm trying to find the hole. The hack code creates dirs with "nobody" ownership, so it's obvious stuff is not via ftp [ownership would be foo] Site is virtual host, Linux/Apache I'm concerned about a file uploader my users use to upload photos. Can anyone s

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Sukhwinder Singh
t;Jim Moseby" <[EMAIL PROTECTED]> Cc: "'Sukhwinder Singh'" <[EMAIL PROTECTED]>; Sent: Saturday, June 09, 2007 5:15 AM Subject: RE: [PHP] File Upload - post_max_size and upload_max_filesize in GBs On Thu, June 7, 2007 10:52 am, Jim Moseby wrote: Rumor has i

RE: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 10:52 am, Jim Moseby wrote: > Rumor has it that uploaded files are stored in memory before being > committed > to disk. If so, the amount of free RAM available to PHP would be the > limit > to the filesize regardless of the ini file settings. I think you have to go pretty far

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Robert Cummings
On Fri, 2007-06-08 at 10:53 -0400, tedd wrote: > At 4:35 PM +0100 6/7/07, Stut wrote: > >You need to look into maybe a java applet, or just plain > >FTP/SFTP/SCP for files that big. HTTP was never designed to handle > >uploading files of that size. For a start there is no facility to > >restart

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Stut
tedd wrote: At 4:35 PM +0100 6/7/07, Stut wrote: You need to look into maybe a java applet, or just plain FTP/SFTP/SCP for files that big. HTTP was never designed to handle uploading files of that size. For a start there is no facility to restart the upload should it get interrupted and fail.

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread tedd
At 4:35 PM +0100 6/7/07, Stut wrote: You need to look into maybe a java applet, or just plain FTP/SFTP/SCP for files that big. HTTP was never designed to handle uploading files of that size. For a start there is no facility to restart the upload should it get interrupted and fail. -Stut -St

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Stut
Sukhwinder Singh wrote: You don't appear to have read what I said. A Java applet can use FTP to upload the file - PHP does not get involved in that part. Once the upload is complete the applet can POST to your PHP file giving it information like where it's put the file and this other informatio

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
nder Singh" <[EMAIL PROTECTED]> Cc: Sent: Friday, June 08, 2007 2:10 AM Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs Sukhwinder Singh wrote: Even java applets have to hand over the file to some script, in this case php and php will get it in $_FILES

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut
Sukhwinder Singh wrote: Even java applets have to hand over the file to some script, in this case php and php will get it in $_FILES array it seems (in case of japplet). so the problem will remain. Not at all true. A Java applet can use FTP to handle the upload and still pass meta data about

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
w. Thanks for replying. Sukhwinder Singh - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Sukhwinder Singh" <[EMAIL PROTECTED]> Cc: Sent: Friday, June 08, 2007 1:28 AM Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in G

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut
the file from a Java applet. -Stut - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Sukhwinder Singh" <[EMAIL PROTECTED]> Cc: Sent: Thursday, June 07, 2007 8:56 PM Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

RE: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Jim Moseby
> > > Rumor has it that uploaded files are stored in memory before being > > committed > > to disk. If so, the amount of free RAM available to PHP > would be the limit > > to the filesize regardless of the ini file settings. > > I don't think that is the case. File is written to temp > directo

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
php will get it in $_FILES array it seems (in case of japplet). so the problem will remain. - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Sukhwinder Singh" <[EMAIL PROTECTED]> Cc: Sent: Thursday, June 07, 2007 8:56 PM Subject: Re: [PHP]

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
gt; To: "Sukhwinder Singh" <[EMAIL PROTECTED]> Cc: "Jim Moseby" <[EMAIL PROTECTED]>; Sent: Thursday, June 07, 2007 9:16 PM Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs Sukhwinder Singh wrote: Rumor has it that uploaded files a

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut
Sukhwinder Singh wrote: Rumor has it that uploaded files are stored in memory before being committed to disk. If so, the amount of free RAM available to PHP would be the limit to the filesize regardless of the ini file settings. I don't think that is the case. File is written to temp director

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
IL PROTECTED]> Sent: Thursday, June 07, 2007 8:59 PM Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs A beeter method is to send the file via ftp. I think most browsers allow this. And for example store the file in a user specific file. Then the user, via a web i

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
also have to update database to associate that file with some user etc. It needs to be web based. Sukhwinder Singh - Original Message - From: "Jim Moseby" <[EMAIL PROTECTED]> To: "'Sukhwinder Singh'" <[EMAIL PROTECTED]>; Sent: Thursday, June

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut
Message - From: "Stut" <[EMAIL PROTECTED]> To: "Sukhwinder Singh" <[EMAIL PROTECTED]> Cc: Sent: Thursday, June 07, 2007 8:35 PM Subject: Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs Sukhwinder Singh wrote: I want to allow uploading of h

RE: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Jim Moseby
> > Hello, > > I want to allow uploading of huge video files, which may be > as big as 4 GB. But when I try to set > > post_max_size = 4G > upload_max_filesize = 4G > > in php.ini, it doesn't work and everything in post (posted > data) is ignored. > > I get a warning about size of posted da

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
. Any utility which allows this? Thanks, Sukhwinder Singh - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Sukhwinder Singh" <[EMAIL PROTECTED]> Cc: Sent: Thursday, June 07, 2007 8:35 PM Subject: Re: [PHP] File Upload - post_max_size

Re: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Stut
Sukhwinder Singh wrote: I want to allow uploading of huge video files, which may be as big as 4 GB. But when I try to set post_max_size = 4G upload_max_filesize = 4G in php.ini, it doesn't work and everything in post (posted data) is ignored. I get a warning about size of posted data greater

[PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-07 Thread Sukhwinder Singh
Hello, I want to allow uploading of huge video files, which may be as big as 4 GB. But when I try to set post_max_size = 4G upload_max_filesize = 4G in php.ini, it doesn't work and everything in post (posted data) is ignored. I get a warning about size of posted data greater than some negativ

Re: [PHP] File Upload Security and chmod

2006-09-27 Thread Andy Hultgren
Well, seeing as I have no directory anywhere in my file structure called "/tmp" and yet my file uploads are still working, it would appear that my temporary file upload directory "/tmp" given by php_info() is somewhere outside of my root directory. So that's good news! That's were I'll be doing

Re: [PHP] File Upload Security and chmod

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 12:12 pm, Andy Hultgren wrote: > So I've been trying to figure out where php uploads files to > temporarily > store them before I move them to their permanent storage directory, > and I'm > having some difficulties: > > -- php_info() says the temporary file upload directo

Re: [PHP] File Upload Security and chmod

2006-09-27 Thread Andy Hultgren
So I've been trying to figure out where php uploads files to temporarily store them before I move them to their permanent storage directory, and I'm having some difficulties: -- php_info() says the temporary file upload directory is "/tmp" but I don't know if that's relative to my root directory

Re: [PHP] File Upload Security and chmod

2006-09-27 Thread Richard Lynch
On Wed, September 27, 2006 10:11 am, tedd wrote: >>So when you read advice to use 0777 you can immediately change that >> to >>0700, because the only access needed is for you, not your group, and >>not the "world" of other users on that machine. > > Excellent point -- thanks. This applies only to

Re: [PHP] File Upload Security and chmod

2006-09-27 Thread tedd
At 6:43 PM -0500 9/26/06, Richard Lynch wrote: On Mon, September 25, 2006 3:58 pm, Andy Hultgren wrote: > -- Since I'm only allowing image uploads, I can strictly filter which files are allowed to be uploaded (with extension checks and get_image_size). Extension check is kinda useless... I

Re: [PHP] File Upload Security and chmod

2006-09-26 Thread Richard Lynch
On Mon, September 25, 2006 3:58 pm, Andy Hultgren wrote: > So I tried to implement the example code given in the php tmpfile() > documentation and it wouldn't do anything, which suggests that I don't > have > access to the /tmp directory. Also, the FAQ's section on my server's > website say that /

Re: [PHP] File Upload Security and chmod

2006-09-26 Thread Richard Lynch
The FTP will be slower, almost for sure. He's doing it because he can FTP in as himself, and not as the "nobody" user Apache runs as. Your webhost has you running as yourself already, so you can chmod your files at will in PHP. On Mon, September 25, 2006 2:11 pm, Andy Hultgren wrote: > Tedd, > >

Re: [PHP] File Upload Security and chmod

2006-09-25 Thread Andy Hultgren
Hey Tedd and Eric, Between the two of you and Richard Lynch's last post, I understand why I can use chmod() and mkdir() within php without having to use the ftp commands: I run on a server that is configured to run my php scripts as "username" (ie. me!) instead of as "nobody" (which is much more

Re: [PHP] File Upload Security and chmod

2006-09-25 Thread Andy Hultgren
Well, that didn't sound too good... So I tried to implement the example code given in the php tmpfile() documentation and it wouldn't do anything, which suggests that I don't have access to the /tmp directory. Also, the FAQ's section on my server's website say that /tmp is not shared between the

Re: [PHP] File Upload Security and chmod

2006-09-25 Thread tedd
Andy: It was never a question of speed for me -- it was a question of being able to change file permissions from within a php script so that I could create and write files safely. You see, I am *not* able to use chmod() within a php script at all regardless of what permissions the file and p

Re: [PHP] File Upload Security and chmod

2006-09-25 Thread Eric Butera
On 9/25/06, Andy Hultgren <[EMAIL PROTECTED]> wrote: Tedd, Thanks so much your thorough response - it's good to know that I'm not the only one trying to figure this out! I'm curious, in your code you use the PHP ftp functions, but I have used the PHP functions chmod() and mkdir() without estab

Re: [PHP] File Upload Security and chmod

2006-09-25 Thread Andy Hultgren
Tedd, Thanks so much your thorough response - it's good to know that I'm not the only one trying to figure this out! I'm curious, in your code you use the PHP ftp functions, but I have used the PHP functions chmod() and mkdir() without establishing an ftp connection. Is it faster to establish a

Re: [PHP] File Upload Security and chmod

2006-09-25 Thread tedd
At 9:32 PM -0600 9/24/06, Andy Hultgren wrote: Hi Tedd, Yes, when I browse to www.myDomain.com I get the index.html file, and so I have been leaving the .public_html/ directory alone since it is not my root. I'm curious, what you described is exactly what I'm trying to do - what permissions do

Re: [PHP] File Upload Security and chmod

2006-09-24 Thread Andy Hultgren
Hi Tedd, Yes, when I browse to www.myDomain.com I get the index.html file, and so I have been leaving the .public_html/ directory alone since it is not my root. I'm curious, what you described is exactly what I'm trying to do - what permissions do you set the parent folder at when you are finish

Re: [PHP] File Upload Security and chmod

2006-09-23 Thread tedd
At 7:19 PM -0600 9/22/06, Andy Hultgren wrote: For whatever reason when I ftp in using WinFtp I don't see public_html (it's hidden, don't know why; if I make a directory called ".public_html" it gets created and then disappears), but I can see my file structure from my host's website and so I kno

Re: [PHP] File Upload Security and chmod

2006-09-23 Thread Børge Holen
On Saturday 23 September 2006 01:27, you wrote: > Hi Borge, > > host/users/myDomain is the actual directory (and it's the root > directory), and I do not have access to higher directories. So > basically I do not have access to directories higher than my root > directory, which is unfortunate. Al

Re: [PHP] File Upload Security and chmod

2006-09-22 Thread Andy Hultgren
For whatever reason when I ftp in using WinFtp I don't see public_html (it's hidden, don't know why; if I make a directory called ".public_html" it gets created and then disappears), but I can see my file structure from my host's website and so I know that when I ftp in to myDomain.com this is wha

Re: [PHP] File Upload Security and chmod

2006-09-22 Thread Richard Lynch
I may have hit "send" too soon... Like, when you do FTP, do you see: index.htm page2.htm page3.htm right away? *OR*, do you see: public_html And then you do "cd public_html" and THEN you see the files? If you don't do "cd public_html" then I really don't think accepting file uploads is a Go

Re: [PHP] File Upload Security and chmod

2006-09-22 Thread Andy Hultgren
So pretty much there's nothing to be done about it? If I can get the chmod thing to make it so that you can't surf to your uploaded image afterwards and view it, I'd be happy with that solution. I'd like to stick with this host if I could. On 9/22/06, Richard Lynch <[EMAIL PROTECTED]> wrote: O

Re: [PHP] File Upload Security and chmod

2006-09-22 Thread Richard Lynch
On Fri, September 22, 2006 3:58 pm, Andy Hultgren wrote: > that as my root directory is simply www.myDomain.com and not > ".public_html/" and I am on a shared server where my root cannot be I got two words for you: Change Hosts -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailin

Re: [PHP] File Upload Security and chmod

2006-09-22 Thread Børge Holen
On Friday 22 September 2006 22:58, Andy Hultgren wrote: > Hi, > I am relatively new to php and am trying to set up a file upload > process for my website. I have read through the php security > documentation and a number of the security-related questions on these > lists and am attempting to imple

[PHP] File Upload Security and chmod

2006-09-22 Thread Andy Hultgren
Hi, I am relatively new to php and am trying to set up a file upload process for my website. I have read through the php security documentation and a number of the security-related questions on these lists and am attempting to implement as many of the measures as possible. One of the suggestions

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Wolf
True, but it checks it at the first attempt to upload, not when the file is done or partially uploaded. Granted, not what the OP asked for exactly, but better then what he has now and better then spending more time looking... Wolf Chris wrote: > Wolf wrote: >> In your form uploading script: >> #

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Chris
Wolf wrote: In your form uploading script: # individual file size limit - in bytes (102400 bytes = 100KB) $file_size_ind = "838860800"; // 819.2 MB $weight=$_FILES[fileupload][size]; if ($weight>$file_size_ind) { echo" ERROR: please get the file size less than ".$file_size_ind." BYTES (".rou

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Wolf
In your form uploading script: # individual file size limit - in bytes (102400 bytes = 100KB) $file_size_ind = "838860800"; // 819.2 MB $weight=$_FILES[fileupload][size]; if ($weight>$file_size_ind) { echo" ERROR: please get the file size less than ".$file_size_ind." BYTES (".round(($file_size

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Richard Lynch
On Wed, May 10, 2006 11:09 am, Phillip S. Baker wrote: > James Nunnerley wrote: > However you can set the max file size within the tag of HTML. > I forget the proper snytax and tag off the top of my head. > I am not sure the error it spits out as I have never tested that. > you can also use javasc

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Jochem Maas
Jay Blanchard wrote: [snip] Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! [/snip] PHP is server-side and cannot check anything client-s

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Phillip S. Baker
James Nunnerley wrote: Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! I'm not even sure this is a php question! Nope not a PHP que

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Duncan Hill
On Wednesday 10 May 2006 13:39, Jay Blanchard wrote: > [snip] > Is there anyway to check the size of a file before it starts uploading > it? > For instance, if the file is huge, and takes ages to upload, and is then > rejected by the server, the user will be somewhat annoyed! > [/snip] > > PHP is s

RE: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Jay Blanchard
[snip] Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! [/snip] PHP is server-side and cannot check anything client-side. You cold use somet

Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Barry
James Nunnerley schrieb: Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! I'm not even sure this is a php question! No you can't. No

[PHP] file Upload - checking file size before uploading

2006-05-10 Thread James Nunnerley
Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! I'm not even sure this is a php question! Cheers Nunners

Re: [PHP] php file upload permission query

2005-12-16 Thread Burhan
Angelo Zanetti wrote: thanks, but Im sure there is something that is messing up the file permissions that I can change before the upload, instead of trying to cure the problem by setting the chmod of the file after its uplaoded Check the following things: 1. umask settings on the director

Re: [PHP] php file upload permission query

2005-12-15 Thread Hristo Yankov
The remote PHP machine maybe forces the files to change their permission when uploaded. This would be security measure. And I think that if this is the case, you won't be able to change the permissions. === Hristo Yankov, Developer at Portellus, Inc. ICQ - 1

Re: [PHP] php file upload permission query

2005-12-15 Thread Hristo Yankov
Use chmod() on the uploaded file. === Hristo Yankov, Developer at Portellus, Inc. ICQ - 191445567 Yahoo! - yankov_hristo __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http

Re: [PHP] php file upload permission query

2005-12-15 Thread Angelo Zanetti
thanks, but Im sure there is something that is messing up the file permissions that I can change before the upload, instead of trying to cure the problem by setting the chmod of the file after its uplaoded Hristo Yankov wrote: Use chmod() on the uploaded file. =

[PHP] php file upload permission query

2005-12-14 Thread Angelo Zanetti
Hi all. I've got a PHP script which does file uploads. the files get uploaded fine but I see that the permission of the files are: 600 IE: Owner read and write. In order for me to use the files, I would have to set the permissions on each file, now for best practise would I set the permissio

[PHP] File Upload Max Size

2005-09-29 Thread Matt Palermo
Hello everyone. I'm basically building a PHP FTP client app. This app connects to an FTP server and allows the user to edit/delete files/permissions, etc. I've gotten to the point where I have started to create a file upload feature. The problem I have is that PHP only allows a 2mb maximum

[PHP] file upload

2005-06-20 Thread Han
Hello, I'm having a problem with a file upload. The following works on one server I use : - --- function add_me(){ global $filename; global $maxFileSize; global $yourdirectory; // put this in a file that is called by your w

Re: [PHP] file upload

2005-04-04 Thread Robby Russell
On Mon, 2005-04-04 at 17:07 +0300, William Stokes wrote: > Hello, > I might have asked this already but I am still ignorent ;-) > > How to check if a same name file already exists in a upload directory when > uploading new file? > > Thanks > -Will > http://www.php.net/file_exists -Robby --

RE: [PHP] file upload

2005-04-04 Thread Mike
> How to check if a same name file already exists in a upload > directory when uploading new file? > Use the file_exists() function (oddly named, I know). http://us4.php.net/manual/en/function.file-exists.php -M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP] file upload

2005-04-04 Thread Larry E . Ullman
I might have asked this already but I am still ignorent ;-) How to check if a same name file already exists in a upload directory when uploading new file? Use the appropriately named file_exists() function. L. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

[PHP] file upload

2005-04-04 Thread William Stokes
Hello, I might have asked this already but I am still ignorent ;-) How to check if a same name file already exists in a upload directory when uploading new file? Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file upload

2005-03-28 Thread Burhan Khalid
William Stokes wrote: Okl I can't reverse engineer that... I just need to know how to set the path. now I have it like this and it wont work. $fileame comes from a form. if (copy($filename, "/imagedir/" . $filename_name)) print "upload succesful!"; Don't use copy(), use move_uploaded_file() See

Re: [PHP] file upload

2005-03-24 Thread William Stokes
113.html >> take a look at this.. perhaps you can reverse engineer it >> >> >> >> >> >> "William Stokes" <[EMAIL PROTECTED]> >> 24/03/2005 09:18 >> >> To >> php-general@lists.php.net >> cc >> >> Subj

Re: [PHP] file upload

2005-03-24 Thread William Stokes
ROTECTED]> kirjoitti viestissä:[EMAIL PROTECTED] > http://www.hotscripts.com/Detailed/24113.html > take a look at this.. perhaps you can reverse engineer it > > > > > > "William Stokes" <[EMAIL PROTECTED]> > 24/03/2005 09:18 > > To > php-ge

Re: [PHP] file upload

2005-03-24 Thread Tristan . Pretty
http://www.hotscripts.com/Detailed/24113.html take a look at this.. perhaps you can reverse engineer it "William Stokes" <[EMAIL PROTECTED]> 24/03/2005 09:18 To php-general@lists.php.net cc Subject [PHP] file upload Hello, I'm (slowly) learning how to make a f

[PHP] file upload

2005-03-24 Thread William Stokes
Hello, I'm (slowly) learning how to make a file upload stuff with php. Now I would like to know how to define the servers upload directory in the code? For example I have the upload script in folder /www in the www.domain.com server and I want upload the files to /www/uploads folder. So how do

Re: [PHP] File upload, suid directory and temporary dir

2005-02-11 Thread Richard Lynch
ADNET Ghislain wrote: > upload_tmp_dir/www/htdocs/upload /no value/ ^^^ / / *THIS* is the one that matters -+ Someh

Re: [PHP] File upload, suid directory and temporary dir

2005-02-09 Thread Richard Lynch
ADNET Ghislain wrote: > I am trying to make upload files to belong to the ftp user of the > website and not the apache user. > > As i run in module i tried to do this: > > 1/ create a temp dir on the website outside the documentroot, chown the > temp dir to my ftp user and allow the group to w

[PHP] File upload, suid directory and temporary dir

2005-02-09 Thread ADNET Ghislain
Hi, I am trying to make upload files to belong to the ftp user of the website and not the apache user. As i run in module i tried to do this: 1/ create a temp dir on the website outside the documentroot, chown the temp dir to my ftp user and allow the group to write,, put the same group as t

Re: [PHP] File upload difference between browsers

2005-02-01 Thread Marek Kilimajer
Graham Cossey wrote: I have a problem uploading a file in IE6 or Firefox1.0 but it works fine using Opera7.54. The problem is that I want to ensure that the file being uploaded is a CSV file, so I test the $_FILES['file']['type'] value. In Firefox & IE it is returned as "application/octet-stream" b

Re: [PHP] File upload difference between browsers

2005-02-01 Thread Richard Lynch
Graham Cossey wrote: > The problem is that I want to ensure that the file being uploaded is a > CSV file, so I test the $_FILES['file']['type'] value. That only ensures that somebody else can forge the type header being sent to you. Anybody with half a clue (okay, a clue and a half) could do that

[PHP] File upload difference between browsers

2005-02-01 Thread Graham Cossey
I have a problem uploading a file in IE6 or Firefox1.0 but it works fine using Opera7.54. The problem is that I want to ensure that the file being uploaded is a CSV file, so I test the $_FILES['file']['type'] value. In Firefox & IE it is returned as "application/octet-stream" but in Opera it is r

Re: [PHP] file upload error

2005-02-01 Thread Richard Lynch
Tom wrote: > Thanks for the replies. My manual was out of date, not that it would > have made any difference to this anyway as . > upload_tmp_dir variable was correctly set in the php.ini file, and I'd > restarted the web server several times. It seems however that the file > is getting cached

Re: [PHP] file upload error

2005-02-01 Thread Tom
Thanks for the replies. My manual was out of date, not that it would have made any difference to this anyway as . upload_tmp_dir variable was correctly set in the php.ini file, and I'd restarted the web server several times. It seems however that the file is getting cached somehow, and is no

Re: [PHP] file upload error

2005-01-31 Thread Marek Kilimajer
Tom wrote: Hi I have a very simple file upload form and script to handle it (copied verbatim from the php manual, except for the file target location and the script name). However, it always fails, with an error code in the _FILE array or 6. Does anyone know what this error is or what I am likely

[PHP] file upload error

2005-01-31 Thread Tom
Hi I have a very simple file upload form and script to handle it (copied verbatim from the php manual, except for the file target location and the script name). However, it always fails, with an error code in the _FILE array or 6. Does anyone know what this error is or what I am likely to have se

Re: [PHP] file upload

2005-01-20 Thread anirudh dutt
On Thu, 20 Jan 2005 13:30:35 +0100, M. Sokolewicz <[EMAIL PROTECTED]> wrote: > what you're doing is server => server > What the akshay wants is server => client > The only not yet posted other options are client => client (which is > essentially impossible with PHP, unless you use the server=>serve

Re: [PHP] file upload

2005-01-20 Thread M. Sokolewicz
Anirudh Dutt wrote: On Thu, 20 Jan 2005 12:26:07 +0100, Marek Kilimajer <[EMAIL PROTECTED]> wrote: akshay wrote: Hi all, I hv problem while file upload. I hv one server and multiple client. I want to upload a file from Server to client. how this is possible in PHP This is usualy called download. Is

Re: [PHP] file upload

2005-01-20 Thread anirudh dutt
On Thu, 20 Jan 2005 12:26:07 +0100, Marek Kilimajer <[EMAIL PROTECTED]> wrote: > akshay wrote: > > Hi all, > > I hv problem while file upload. > > I hv one server and multiple client. > > I want to upload a file from Server to client. > > how this is possible in PHP > > This is usualy called downl

Re: [PHP] file upload

2005-01-20 Thread Marek Kilimajer
akshay wrote: Hi all, I hv problem while file upload. I hv one server and multiple client. I want to upload a file from Server to client. how this is possible in PHP This is usualy called download. Is this what you want? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

[PHP] file upload

2005-01-20 Thread akshay
Hi all, I hv problem while file upload. I hv one server and multiple client. I want to upload a file from Server to client. how this is possible in PHP with regds, akshay -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] File Upload Problem

2004-12-20 Thread Richard Lynch
Wayne Donaho wrote: > I am trying to run a file upload using PHP as a CGI script and am running > into an odd error. > > The error I am getting is the dreaded Server Error -- Error 500 Premature > end of script headers: php.cgi Some more analysis ideas: On the very first line of your script, prin

[PHP] File Upload Problem

2004-12-18 Thread Wayne Donaho
I am trying to run a file upload using PHP as a CGI script and am running into an odd error. The error I am getting is the dreaded Server Error -- Error 500 Premature end of script headers: php.cgi Here is the diagnosis I have done. 1. The php.cgi executable deals with scripts correctly when us

Re: [PHP] File upload problems using Apache 1.3 on Debian stable

2004-12-13 Thread Michael Leung
Is it a permission error? I am facing the permission problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] File upload problems using Apache 1.3 on Debian stable

2004-12-13 Thread Richard Lynch
[EMAIL PROTECTED] wrote: > Hi, > I do indeed have the file upload code inside a class function. it's one > of those little things about PHP hadn't fully realised yet. Thanks for > the pointer! If I pass the relevant _FILE entry to that function and > work off that it solves the problem right? You

Re: [PHP] File upload problems using Apache 1.3 on Debian stable

2004-12-13 Thread [EMAIL PROTECTED]
Hi, I do indeed have the file upload code inside a class function. it's one of those little things about PHP hadn't fully realised yet. Thanks for the pointer! If I pass the relevant _FILE entry to that function and work off that it solves the problem right? Cheers, Tom Richard Lynch wrote: [E

Re: [PHP] File upload problems using Apache 1.3 on Debian stable

2004-12-10 Thread Richard Lynch
[EMAIL PROTECTED] wrote: > Hi, > I have been having problems trying to get file uploads working with > PHP in a Debian Linux enviroment. I have ensured that both the temporary > directory PHP uploads use has the appropriate permissions set, as well > as the folder I am attempting to copy the im

Re: [PHP] File upload problems using Apache 1.3 on Debian stable

2004-12-10 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote: Hi, I have been having problems trying to get file uploads working with PHP in a Debian Linux enviroment. I have ensured that both the temporary directory PHP uploads use has the appropriate permissions set, as well as the folder I am attempting to copy the images int

[PHP] File upload problems using Apache 1.3 on Debian stable

2004-12-10 Thread [EMAIL PROTECTED]
Hi, I have been having problems trying to get file uploads working with PHP in a Debian Linux enviroment. I have ensured that both the temporary directory PHP uploads use has the appropriate permissions set, as well as the folder I am attempting to copy the images into. When I called phpinfo

[PHP] Re: PHP File Upload Problem

2004-11-12 Thread Mike Walsh
"Mike Walsh" <[EMAIL PROTECTED]> wrote in message news:0%ald.9258 [ ... snipped ... ] > > ; Maximum allowed size for uploaded files. > upload_max_filesize = 1G > [ ... snipped ... ] It turns out that 1G is not a valid value for this directive. Not sure why I haven't run into this problem previ

<    1   2   3   4   5   6   7   >