Re: [PHP] move_uploaded_file() does not return any value or warning

2011-10-14 Thread Partha Chowdhury
On 15/10/11 08:35 AM, Simon J Welsh wrote: Assuming you did $move_uploaded_file = move_uploaded_file($filename, $destination);, then isset($move_uploaded_file) will always be true. isset() just checks if the variable you past to it is set, not if it has a non-false value. You could simply use

Re: [PHP] move_uploaded_file() does not return any value or warning

2011-10-14 Thread Simon J Welsh
On 15/10/2011, at 4:01 PM, Partha Chowdhury wrote: > Then i set a check for the return value of move-uploaded_file. >> if(isset ($move_uploaded_file)): >> echo ""success; >> else: >> echo "error in uploading"; >> endif; > But it does not print anythi

Re: [PHP] move_uploaded_file

2009-12-12 Thread Carl Furst
Depends on the configuration. If I have a bunch of web sites and they are all using files created, written and executed by the apache user, when the apache process sudo execs the php from a specific web root I want it to stay in that root. I don't want it to be able to write files to another w

Re: Re: [PHP] move_uploaded_file

2009-12-12 Thread Ashley Sheridan
On Sat, 2009-12-12 at 09:42 -0500, Carl Furst wrote: > It's also a security flaw... php should be chrooted to the webroot! Or > it should be chrooted to the users home directory. Especially on windows > systems where security is not so strict. > > My 2 cents, > Carl. > > Roberto wrote: > > Hi Jo

Re: Re: [PHP] move_uploaded_file

2009-12-12 Thread Carl Furst
It's also a security flaw... php should be chrooted to the webroot! Or it should be chrooted to the users home directory. Especially on windows systems where security is not so strict. My 2 cents, Carl. Roberto wrote: > Hi Joseph, > > I'm perfectly fine with the concepts of absolute/relative path

Re: [PHP] move_uploaded_file

2009-12-12 Thread Ashley Sheridan
On Sat, 2009-12-12 at 11:49 +, Roberto Aloi wrote: > This is exactly what I mean. > Documentation should never leave room to interpretation. > At least, this is what I think. > > Roberto Aloi > > On 11 Dec 2009, at 22:36, Ashley Sheridan > wrote: > > > On Fri, 2009-12-11 at 22:14 +,

Re: [PHP] move_uploaded_file

2009-12-12 Thread Roberto Aloi
This is exactly what I mean. Documentation should never leave room to interpretation. At least, this is what I think. Roberto Aloi On 11 Dec 2009, at 22:36, Ashley Sheridan wrote: On Fri, 2009-12-11 at 22:14 +, Roberto wrote: Hi Joseph, I'm perfectly fine with the concepts of absolu

Re: [PHP] move_uploaded_file

2009-12-11 Thread Ashley Sheridan
On Fri, 2009-12-11 at 22:14 +, Roberto wrote: > Hi Joseph, > > I'm perfectly fine with the concepts of absolute/relative path and > webroot, trust me. > For me it was just unclear from the documentation the fact that the > "target path" in the move_uploaded_file function was "absolute" with >

Re: [PHP] move_uploaded_file

2009-12-11 Thread Roberto
Hi Joseph, I'm perfectly fine with the concepts of absolute/relative path and webroot, trust me. For me it was just unclear from the documentation the fact that the "target path" in the move_uploaded_file function was "absolute" with respect to the file system and not to the "webroot". At the begi

Re: [PHP] move_uploaded_file

2009-12-11 Thread Joseph Thayne
When used in PHP, an absolute path does not go off the web root. In Premise 3 below, an absolute path of "/upload" will NOT bring up the directory "/home/prof3ta/projects/moodle/htdocs/upload" but rather simply "/upload" In Windows terms, an absolute path would be "C:\upload" versus "C:\home\

Re: [PHP] move_uploaded_file

2009-12-11 Thread Roberto
HI, Premise 1: echo exec("pwd"); -> "/home/prof3ta/projects/moodle/htdocs/feedback_tool" Premise 2: I have an "upload" folder with 777 permissions under: /home/prof3ta/projects/moodle/htdocs/upload Premise 3: The server root is obviously htdocs: /home/prof3ta/projects/moodle/htdocs This said, t

Re: [PHP] move_uploaded_file

2009-12-11 Thread Joseph Thayne
You should be able to use either an absolute or relative path. In the code below, the path specified is absolute (it starts with /). If you want it to be relative to your current directory, change the line to: $uploads_dir = 'uploads'; or $uploads_dir = '../uploads'; So basically, it all dep

Re: [PHP] move_uploaded_file fails randomly with open_basedir and upload_tmp_dir

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 12:55 pm, Hugues De Keyzer wrote: > I'm having a weird problem on my web hosting provider's server. I'm > using drupal with the image module and the image_pub module to upload > a > series of pictures using Gallery Remote. This software uploads > pictures > one after the oth

Re: [PHP] move_uploaded_file locks?

2006-09-22 Thread Richard Lynch
On Wed, September 20, 2006 1:36 pm, Matthew H. North wrote: > Can't find this in the PHP docs, so: does anyone know whether > move_uploaded_file locks the target file during the process? > > If move_uploaded_file does a rename within the same filesystem this > isn't an > issue (on unix, anyway, the

Re: [PHP] move_uploaded_file locks?

2006-09-20 Thread Chris
Matthew H. North wrote: Can't find this in the PHP docs, so: does anyone know whether move_uploaded_file locks the target file during the process? If move_uploaded_file does a rename within the same filesystem this isn't an issue (on unix, anyway, the O/S just reassigns inodes rather than copy

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-03-01 Thread Chris
Aleksandar Skodric wrote: Hi, I have changed the directory to the same disk. Results are _much_ better! So nothing to blame on PHP, only my lack of knowledge about *nix-like system *blush* Thank all for the advice and help! It's not *nix systems - it's all operating systems. When you move a

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-03-01 Thread Aleksandar Skodric
Hi, I have changed the directory to the same disk. Results are _much_ better! So nothing to blame on PHP, only my lack of knowledge about *nix-like system *blush* Thank all for the advice and help! Cheers, Aleks PS. defining of php_value in virtual host of apache did not work, so I changed

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-02-28 Thread Chris
Aleksandar Skodric wrote: Hi, Yes, /tmp is on another disk then the final directory. I shall move it to the same disk (tmp_upload_dir) right now. Question: can I define tmp_upload_dir to be otherwise just for one host in apache conf, like: php_ini upload_tmp_dir /some/dir I'm guessing

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-02-28 Thread Aleksandar Skodric
Hi, Yes, /tmp is on another disk then the final directory. I shall move it to the same disk (tmp_upload_dir) right now. Question: can I define tmp_upload_dir to be otherwise just for one host in apache conf, like: php_ini upload_tmp_dir /some/dir I am not sure that this works for all PHP i

Re: [PHP] move_uploaded_file and CPU wait state (IO) - unsubscribe

2006-02-27 Thread Curt Zirzow
On Tue, Feb 28, 2006 at 11:08:30AM +0800, stone.wang wrote: > No usa to it http://php.net/unsub.php Yes fondu no be http://php.net/unsub.php > i do more If english isn't your first language try to explain that you are not clear how to remove yourself from the list, otherwise try emailing: [

Re: [PHP] move_uploaded_file and CPU wait state (IO) - unsubscribe

2006-02-27 Thread Curt Zirzow
On Tue, Feb 28, 2006 at 09:43:30AM +0800, stone.wang wrote: > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > unsubscribe > dont send to me Since you hijacked my

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-02-27 Thread Curt Zirzow
On Mon, Feb 27, 2006 at 06:39:13PM +0100, [EMAIL PROTECTED] wrote: > Hi, > > My first mailing, if I'm in wrong group or such, let me know ;) > > Here comes my question. I have implemented file uploads to my server. At the > end of upload, file is > beeing moved from /tmp to permanent directory.

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-02-27 Thread Chris
My first mailing, if I'm in wrong group or such, let me know ;) You've come to the right place :) Here comes my question. I have implemented file uploads to my server. At the end of upload, file is beeing moved from /tmp to permanent directory. However, whenever this happens, CPU goes berz

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-02-27 Thread Aaron Koning
Are you sure its the move_uploaded_file() function that is causing the delay? It could be the actual upload of the file itself. If it is the function causing the delay than try the rename() function instead. Also, I have used the copy() and unlink() functions and they work fast. Aaron On 2/27/06,

Re: [PHP] move_uploaded_file() access error

2004-09-12 Thread raditha dissanayake
Mike wrote: hi, there! I have a script that basically tries to upload a file to the server. But when the move_uploaded_function is called, it returns these errors: Warning: move_uploaded_file(../Main/ImgStiri/ceva.jpg): failed to open stream: Permission denied in /home/gotech/public_html/Nou/funct

Re: [PHP] Move_uploaded_file()

2004-08-18 Thread [EMAIL PROTECTED]
Thanks for the explaination!! That was the problem. One of the directories in the path did not have execute permissions. /T on 8/17/04 7:58, Jason Wong at [EMAIL PROTECTED] wrote: > Please do not top post. > > On Tuesday 17 August 2004 19:31, [EMAIL PROTECTED] wrote: > >> How do you do that

Re: [PHP] Move_uploaded_file()

2004-08-17 Thread Jason Wong
Please do not top post. On Tuesday 17 August 2004 19:31, [EMAIL PROTECTED] wrote: > How do you do that exactly - sorry for the stupid question - but the perms > for [Œabsolute_path¹]/ is already rwxrw-rw-. > > Let me know if you are referring to a different way to set permissions... 1) What is t

Re: [PHP] Move_uploaded_file()

2004-08-17 Thread [EMAIL PROTECTED]
How do you do that exactly - sorry for the stupid question - but the perms for [Œabsolute_path¹]/ is already rwxrw-rw-. Let me know if you are referring to a different way to set permissions... Thanks for your help! /T on 8/16/04 23:52, Jason Wong at [EMAIL PROTECTED] wrote: > On Tuesday 17 Aug

Re: [PHP] Move_uploaded_file()

2004-08-16 Thread Jason Wong
On Tuesday 17 August 2004 09:38, [EMAIL PROTECTED] wrote: > Warning: move_uploaded_file([Œabsolute_path¹]/file.csv): failed to open > stream: Permission denied in [Œabsolute_path¹]/file.csv on line 83 Give php permissions to [Œabsolute_path¹]/ ? -- Jason Wong -> Gremlins Associates -> www.greml

Re: [PHP] move_uploaded_file

2003-12-05 Thread Burhan Khalid
Guido Schwab wrote: Hi! I'm using the function move_uploaded_file in order to upload images on a server. My problem: It's not possible to upload a *.bmp file. Maybe this is not possible with PHP's HTTP POST method, but I can't find a documentation. Does anybody knows, if it's possible to configur

Re: [PHP] move_uploaded_file, umask, and permissions

2003-12-01 Thread David T-G
Curt, et al -- ...and then Curt Zirzow said... % % Message-ID: <[EMAIL PROTECTED]> Mister Underhill, I presume? :-) I only just noticed this :-) % % * Thus wrote David T-G ([EMAIL PROTECTED]): % > % > I have set my umask to 117 (and I change it when making a directory) and % > I use move_up

Re: [PHP] move_uploaded_file, umask, and permissions

2003-11-30 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]): > Hi, all -- > > I have set my umask to 117 (and I change it when making a directory) and > I use move_uploaded_file to handle submitted files. > > The temporary file is mode 600 when it lands in /var/tmp but somehow gets > changed to 666 during the mov

Re: [PHP] move_uploaded_file, umask, and permissions

2003-11-30 Thread David T-G
Hi, all -- ...and then David T-G said... % ... % I have set my umask to 117 (and I change it when making a directory) and % I use move_uploaded_file to handle submitted files. ... % Must I really run chmod() on every move_uploaded_file() I process? Isn't % there a better way? Wow, it's not ofte

Re: [PHP] move_uploaded_file problem

2002-08-27 Thread @ Edwin
There could be a lot of different reasons why. Check the manual again (esp. the user's comments). I'm sure you'll find a lot of ideas. http://www.php.net/manual/en/features.file-upload.php Also, this has been discussed many times recently. I'm sure you'll find a lot too in the archives. :) -

Re: [PHP] move_uploaded_file() query

2002-01-25 Thread Jason Wong
On Saturday 26 January 2002 05:45, will hives wrote: > No I don't have a procedure to retrieve the new file name that's what I am > looking to do. I don't know how to write that new name into the database. You really need to learn to read the fine manual - chapter on "Handling file uploads".

Re: [PHP] move_uploaded_file() query

2002-01-25 Thread will hives
in article [EMAIL PROTECTED], Jason Wong at [EMAIL PROTECTED] wrote on 25/1/02 3:14 pm: > On Friday 25 January 2002 17:35, Will Hives wrote: > >> Sorry for my past ignorance using this news site forum I can only out this >> down to my lack of knowledge. >> >> I have been work on me first script

Re: [PHP] move_uploaded_file() query

2002-01-25 Thread Jason Wong
On Friday 25 January 2002 17:35, Will Hives wrote: > Sorry for my past ignorance using this news site forum I can only out this > down to my lack of knowledge. > > I have been work on me first script for some time now and have been making > good progress up until now. I have a script that adds a

Re: [PHP] move_uploaded_file and related question

2001-08-31 Thread Andrey Hristov
You have to move or delete your file so it have not te be in the /tmp after your script finishes or /tmp will get crowdy. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: "---" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Frida

Re: [PHP] move_uploaded_file - getting furthur ..still need help

2001-01-26 Thread Richard Lynch
If you are using NT, I think you can right-click on the images directory and make it writable by anybody. If you are using Win98, I think you're stuck. Win95, stuck. Win2K, who knows. WinME, who knows. Disclaimer: I didn't need it bad enough to *really* try that hard -- I was coding a quickie