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

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

2011-10-14 Thread Partha Chowdhury
Hello List. I am learning php and MySQL for my project work. I am trying to upload files to local server. First, a page is displayed on the browser to upload file Relevant code: After the user chooses a file and hit the submit button,the browser displays the content from the "uploads"

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

[PHP] move_uploaded_file

2009-12-11 Thread Roberto
Am I just drunk or blind or the documentation is simply wrong? >From the official doc (http://uk2.php.net/manual/en/function.move-uploaded-file.php): $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; $name = $_FILES["pictures"]["name"

Re: [PHP] php move_uploaded_file() filesize problem

2009-08-24 Thread Ralph Deffke
I would also be shure that u run into the srcipt time out time. of course there is one limit u can be a little bit under or a little bit above. measure the time with microtime() and compare it with the script time out settings and u will have the answer ralph_def...@yahoo.de ""Thomas Gabrielsen"

Re: [PHP] php move_uploaded_file() filesize problem

2009-08-24 Thread Thomas Gabrielsen
"Ryan Cavicchioni" wrote in message news:20090824205810.gc32...@mail.confabulator.net... On Mon, Aug 24, 2009 at 09:54:03PM +0200, Thomas Gabrielsen wrote: Hi I have a problem with uploading files that are bigger than the Master Value allow me to, which is 32 MB. I've set the max_upload_file

Re: [PHP] php move_uploaded_file() filesize problem

2009-08-24 Thread Ryan Cavicchioni
On Mon, Aug 24, 2009 at 09:54:03PM +0200, Thomas Gabrielsen wrote: > Hi > > I have a problem with uploading files that are bigger than the Master > Value allow me to, which is 32 MB. I've set the max_upload_filesize and > max_post_size in a .htaccess file and the phpinfo() reports the new local

Re: [PHP] php move_uploaded_file() filesize problem

2009-08-24 Thread Ryan Cavicchioni
On Mon, Aug 24, 2009 at 09:54:03PM +0200, Thomas Gabrielsen wrote: > Hi > > I have a problem with uploading files that are bigger than the Master > Value allow me to, which is 32 MB. I've set the max_upload_filesize and > max_post_size in a .htaccess file and the phpinfo() reports the new local

[PHP] php move_uploaded_file() filesize problem

2009-08-24 Thread Thomas Gabrielsen
Hi I have a problem with uploading files that are bigger than the Master Value allow me to, which is 32 MB. I've set the max_upload_filesize and max_post_size in a .htaccess file and the phpinfo() reports the new local value (128 MB) according to the .htaccess, but the script fails silently w

[PHP] move_uploaded_file() problem

2009-02-07 Thread Dušan Novaković
Hi, I'm having problem with function move_uploaded_file() under Linux (Slackware 12.2). It simply want execute only that function in php file. So maybe I should add something to http.config file or ? I tried to execute that php file under Windows and it's working just fine (I've copied whole

[PHP] move_uploaded_file permission problem under php5

2007-09-27 Thread Torsten Rosenberger
Hey when i upload a file with the move_uploaded_file function the perm on the uploaded file is 0600 the same work with copy the result ist 0644 with php4 the result was always the same and know with php5 it is diffrent i serached in the bug list and found this in the link below and it is not a b

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

[PHP] move_uploaded_file fails randomly with open_basedir and upload_tmp_dir

2007-08-27 Thread Hugues De Keyzer
Hi all, 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 other using a classic HTTP POST method. The upload always

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

[PHP] move_uploaded_file locks?

2006-09-20 Thread Matthew H. North
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 copying data). But if it do

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,

[PHP] move_uploaded_file and CPU wait state (IO)

2006-02-27 Thread phpmaillist
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. However, whenever this happens, CPU goes berzerk and waits for disk to finish mo

[PHP] move_uploaded_file() problem

2004-10-08 Thread Daniel Lahey
I'm seeing a very strange problem with move_uploaded_file(...). I'm uploading jpegs and the transfer appears to go a little too quickly, and when I look at the directory listing, the files are about twice the size that they should be. When we view the file in the browser, the images are either ma

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

[PHP] move_uploaded_file() access error

2004-09-12 Thread Mike
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/functii.php on

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

[PHP] Move_uploaded_file()

2004-08-16 Thread [EMAIL PROTECTED]
Warning: move_uploaded_file([Œabsolute_path¹]/file.csv): failed to open stream: Permission denied in [Œabsolute_path¹]/file.csv on line 83 Warning: move_uploaded_file(): Unable to move '/tmp/phpXT5j85' to '[Œabsolute_path¹]/file.csv' in [Œabsolute_path¹]/file.csv on line 83 I get the above errors

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

[PHP] move_uploaded_file

2003-12-05 Thread Guido Schwab
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 configure PHP, that it's poss

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

[PHP] move_uploaded_file, umask, and permissions

2003-11-29 Thread David T-G
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 move. It seems that move_uploaded_file changes the file perm

[PHP] move_uploaded_file > 1MB

2003-06-04 Thread Maurício Valente
Hello everybody! I'm trying to upload a file using the move_uploaded_file function, everyting works fine when the files have less than 1MB but when I upload one more than this, IE returns the error The page cannot be displayed and in it's title shows Cannot find server. I alreary edit php.ini sett

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. :) -

[PHP] move_uploaded_file problem

2002-08-27 Thread David Rothe
I'm trying to enable my site users to upload pictures (using the move_uploaded_file function) This works fine on my home development machine but 'not' on the deployment server. This is a shared server with 'safe mode' enabled. (The php manual seems to suggest that it should still work despite saf

[PHP] move_uploaded_file returning true but not working

2002-04-06 Thread Leif K-Brooks
I run a site where users can, among other things, adopt virtual pets. I have several admisistrators on the site, and I am trying to create a thing that adds a new pet species through the administrator control panel without me having to ftp it. It takes four files: red happy, red sad, blue happy,

[PHP] move_uploaded_file returning true but not working

2002-04-03 Thread Leif K-Brooks
I run a site where users can, among other things, adopt virtual pets. I have several admisistrators on the site, and I am trying to create a thing that adds a new pet species through the administrator control panel without me having to ftp it. It takes four files: red happy, red sad, blue happy,

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

[PHP] move_uploaded_file() query

2002-01-25 Thread Will Hives
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 author to the database, ID, Name, Email, Picture Name. When

[PHP] move_uploaded_file on NT Server

2001-12-06 Thread jimtronic
Hi, I've been having a problem moving uploaded files recently. I have a script in directory /foo/bar and it has no trouble moving a file into /foo/rex but it can't move a file into /foo/zip This is strange because I created all the folders and the scripts, so presumably they would hav

Re: [PHP] move_uploaded_file and related question

2001-08-31 Thread Andrey Hristov
IL PROTECTED]> Sent: Friday, August 31, 2001 4:35 PM Subject: [PHP] move_uploaded_file and related question > but why i should use move_uploaded_file and similar functions instead of a > simple copy command?? > > which is the security hole related to the use of copy?? > > At the

[PHP] move_uploaded_file and related question

2001-08-31 Thread ---
but why i should use move_uploaded_file and similar functions instead of a simple copy command?? which is the security hole related to the use of copy?? At the php site is strongly encouraged the use of these functions, but i don't know why, where's the problem?? - Federico

[PHP] move_uploaded_file permissions

2001-07-30 Thread bill
I tried the new move_uploaded_file() function. It seems to work fine but doesn't assign any permissions to the moved file, not even for reading. Is there any way around this? Can I define the permissions myself? kind regards, bill hollett -- PHP General Mailing List (http://www.php.net/) To

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

2001-01-26 Thread Richard Lynch
t;Shane McBride" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Friday, January 26, 2001 3:47 PM Subject: [PHP] move_uploaded_file - getting furthur ..still need help Here's what I get: Warning: Unable to create 'd:\sites\merchantpower\mp\images\': Permission

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

2001-01-26 Thread Shane McBride
Here's what I get: Warning: Unable to create 'd:\sites\merchantpower\mp\images\': Permission denied in d:/sites/MerchantPower/mp/admin/add_record2.php on line 47