[PHP] Upload file on IE8
Good Day, I'm having an issue with IE8, when I go to load a file the program is not filling the $_FILES['user_file']['type'] . When I display echo Start.$_FILES['pix']['type'].End; in IE8 I get StartEnd with nothing in between. I expected image/pjpeg. On FireFox I get image/jpeg. Any suggestions? Thanks, /Ernie
Re: [PHP] Upload file on IE8
On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote: Good Day, I’m having an issue with IE8, when I go to load a file the program is not filling the $_FILES['user_file']['type'] . When I display “echo Start.$_FILES['pix']['type'].End;” in IE8 I get “StartEnd” with nothing in between. I expected “image/pjpeg. On FireFox I get “image/jpeg. Any suggestions? Thanks, /Ernie What do the other $_FILES fields say? Are they populated correctly? I wouldn't rely on anything sent from the browser. IE is known to send the mime type that matches the extension, not the contents of the file, and for .jpg images it sends a different mime to every other browser anyway, so it's pretty unreliable. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Upload file on IE8
On Tue, Jan 26, 2010 at 6:41 AM, Ernie Kemp ernie.k...@sympatico.ca wrote: Good Day, I’m having an issue with IE8, when I go to load a file the program is not filling the $_FILES['user_file']['type'] . When I display “echo Start.$_FILES['pix']['type'].End;” in IE8 I get “StartEnd” with nothing in between. I expected “image/pjpeg. On FireFox I get “image/jpeg. Any suggestions? Thanks, /Ernie I remember a setting from some elsewhere IE 8 was disable set file path location by default from the options dialog. Did you enabled this already ? If not, you may give it a shoot to see than ! Hope this help Eric, Regards,
Re: [PHP] Upload file on IE8
On Tue, 2010-01-26 at 07:33 +0800, Eric Lee wrote: On Tue, Jan 26, 2010 at 6:41 AM, Ernie Kemp ernie.k...@sympatico.ca wrote: Good Day, I’m having an issue with IE8, when I go to load a file the program is not filling the $_FILES['user_file']['type'] . When I display “echo Start.$_FILES['pix']['type'].End;” in IE8 I get “StartEnd” with nothing in between. I expected “image/pjpeg. On FireFox I get “image/jpeg. Any suggestions? Thanks, /Ernie I remember a setting from some elsewhere IE 8 was disable set file path location by default from the options dialog. Did you enabled this already ? If not, you may give it a shoot to see than ! Hope this help Eric, Regards, But you won't be able to guarantee every IE8 user will do this, so you shouldn't develop the app in such a way that it needs to use the value in the array. Also, as I've said, there isn't much point relying on this value for any reason anyway, as it doesn't guarantee the file is actually of that type. Thanks, Ash http://www.ashleysheridan.co.uk
RE: [PHP] Upload file on IE8
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: January-25-10 5:53 PM To: Ernie Kemp Cc: 'PHP General List' Subject: Re: [PHP] Upload file on IE8 On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote: Good Day, I’m having an issue with IE8, when I go to load a file the program is not filling the $_FILES['user_file']['type'] . When I display “echo Start.$_FILES['pix']['type'].End;” in IE8 I get “StartEnd” with nothing in between. I expected “image/pjpeg. On FireFox I get “image/jpeg. Any suggestions? Thanks, /Ernie What do the other $_FILES fields say? Are they populated correctly? I wouldn't rely on anything sent from the browser. IE is known to send the mime type that matches the extension, not the contents of the file, and for .jpg images it sends a different mime to every other browser anyway, so it's pretty unreliable. Thanks, Ash http://www.ashleysheridan.co.uk With IE8, Using $_FILES the array results for ‘name’ has the name of the file but ‘type’, ‘tmp_name’ and ‘size’ are blanks. I tried enabling the “file path location” in IE8 option but the results are the same for $_FILES. Firefox works displays all the values in the $_FILES array. There must be a better way. Suggestions? Thanks, /Ernie
RE: [PHP] Upload file on IE8
On Mon, 2010-01-25 at 19:21 -0500, Ernie Kemp wrote: From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: January-25-10 5:53 PM To: Ernie Kemp Cc: 'PHP General List' Subject: Re: [PHP] Upload file on IE8 On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote: Good Day, I’m having an issue with IE8, when I go to load a file the program is not filling the $_FILES['user_file']['type'] . When I display “echo Start.$_FILES['pix']['type'].End;” in IE8 I get “StartEnd” with nothing in between. I expected “image/pjpeg. On FireFox I get “image/jpeg. Any suggestions? Thanks, /Ernie What do the other $_FILES fields say? Are they populated correctly? I wouldn't rely on anything sent from the browser. IE is known to send the mime type that matches the extension, not the contents of the file, and for .jpg images it sends a different mime to every other browser anyway, so it's pretty unreliable. Thanks, Ash http://www.ashleysheridan.co.uk With IE8, Using $_FILES the array results for ‘name’ has the name of the file but ‘type’, ‘tmp_name’ and ‘size’ are blanks. I tried enabling the “file path location” in IE8 option but the results are the same for $_FILES. Firefox works displays all the values in the $_FILES array. There must be a better way. Suggestions? Thanks, /Ernie Don't use the value. There are a few different ways in PHP to get the mime type of a file, which it does based on the contents of the file and not its extension. This prevents someone from uploading an executable virus for example by just changing the last three letters of the filename. Have a look at fileinfo() for this sort of thing. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Upload file name not file
On Fri, 2009-05-01 at 12:38 -0400, Simon wrote: On Fri, May 1, 2009 at 9:34 AM, MikeP mpel...@princeton.edu wrote: I'm not trying to get the path, just the filename and size, I know how to get these, but that would include the file using $_Files, but I dont want to upload anything just use the filename and size.(without the path) to insert into a DB. Those are attributes of the file for which you dont have access remotely, and the only way to access this information without an upload will be using the same hacks as those spywarez use. A technology like flash has read/write access to the remote user's disk (to a certain extent), you could use flash to get that information and make it send it to you, same thing could be done with ActiveX, etc... PHP, JS and HTTP protocol cannot acheive what you want. (PHP is server-side, HTTP is for communication only, JS is client-side but locked down very much). However, at a very low level, it might be possible to achieve this in PHP, you could do the upload as if you wanted the whole file. But the first packet received will contain the HTTP Header, and in the header, you should have all the info you need (filename and size of data). So, low-level speaking, as soon as you receive the first packet and have the info, you just need to close the connection (remote end might display an error msg saying the upload failed, etc). PHP supports sockets connections, so you could make a basic 'server' that listens on another port to perform this. But i see no way to acheive your goal without complications. Good luck! If you don't set the enctype to multipart/form-data in your form, then only the filename will be uploaded as part of the form. To get the file size you would have to allow the file to be uploaded, even if only to the temporary directory. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload file name not file
Hello, Id like to use the popup file system box(input name=userfile type=file /) to choose a file name , but I only want to upload the filename , not the file. Can I do that? Thanks Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload file name not file
Id like to use the popup file system box(input name=userfile type=file /) to choose a file name , but I only want to upload the filename , not the file. Can I do that? You're not supposed to have any access to the remote visitor's computer, and the path to the file being uploaded could contain sensitive information (ie. like username of windows user). There are ways to get the information, even to read information on disk without the use of a file upload form. But they are/will be considered like security threats and are/will be closed down. IMO, whatever way you find to get this information is meant 1) not to be portable accross different browsers and 2) to stop working eventually. (Of course unless you ask the user to explicitly type the path in a text input) What do you need this for? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload file name not file
I'm not trying to get the path, just the filename and size, I know how to get these, but that would include the file using $_Files, but I dont want to upload anything just use the filename and size.(without the path) to insert into a DB. Simon turne...@gmail.com wrote in message news:5f14cf5e0905010629s2253cc3bk2a83dbf8b754c...@mail.gmail.com... Id like to use the popup file system box(input name=userfile type=file /) to choose a file name , but I only want to upload the filename , not the file. Can I do that? You're not supposed to have any access to the remote visitor's computer, and the path to the file being uploaded could contain sensitive information (ie. like username of windows user). There are ways to get the information, even to read information on disk without the use of a file upload form. But they are/will be considered like security threats and are/will be closed down. IMO, whatever way you find to get this information is meant 1) not to be portable accross different browsers and 2) to stop working eventually. (Of course unless you ask the user to explicitly type the path in a text input) What do you need this for? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload file name not file
On Fri, May 1, 2009 at 9:34 AM, MikeP mpel...@princeton.edu wrote: I'm not trying to get the path, just the filename and size, I know how to get these, but that would include the file using $_Files, but I dont want to upload anything just use the filename and size.(without the path) to insert into a DB. Those are attributes of the file for which you dont have access remotely, and the only way to access this information without an upload will be using the same hacks as those spywarez use. A technology like flash has read/write access to the remote user's disk (to a certain extent), you could use flash to get that information and make it send it to you, same thing could be done with ActiveX, etc... PHP, JS and HTTP protocol cannot acheive what you want. (PHP is server-side, HTTP is for communication only, JS is client-side but locked down very much). However, at a very low level, it might be possible to achieve this in PHP, you could do the upload as if you wanted the whole file. But the first packet received will contain the HTTP Header, and in the header, you should have all the info you need (filename and size of data). So, low-level speaking, as soon as you receive the first packet and have the info, you just need to close the connection (remote end might display an error msg saying the upload failed, etc). PHP supports sockets connections, so you could make a basic 'server' that listens on another port to perform this. But i see no way to acheive your goal without complications. Good luck! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file problem
I'm trying to upload the file. It's showing me successfully uploaded. But it's not able to move from temp directory to my defined directory my code: if (is_uploaded_file($_FILES['myfile']['tmp_name'])) { move_uploaded_file($_FILES['myfile']['tmp_name'], $myfilename); echo File . $_FILES['myfile']['name'] . uploaded successfully.\n; } else { echo File uploading error; } Thanks in advance. -Jignesh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file problem
On Thu, Jul 31, 2008 at 10:18 AM, Jignesh Thummar [EMAIL PROTECTED] wrote: I'm trying to upload the file. It's showing me successfully uploaded. But it's not able to move from temp directory to my defined directory my code: if (is_uploaded_file($_FILES['myfile']['tmp_name'])) { move_uploaded_file($_FILES['myfile']['tmp_name'], $myfilename); echo File . $_FILES['myfile']['name'] . uploaded successfully.\n; } else { echo File uploading error; } Thanks in advance. -Jignesh Is the directory you're moving to writable by your web server? If you don't know, try making a separate script that tries var_dump(is_writable('/path/to/uploads')); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file problem
it's writable. On Thu, Jul 31, 2008 at 3:37 PM, Eric Butera [EMAIL PROTECTED] wrote: On Thu, Jul 31, 2008 at 10:18 AM, Jignesh Thummar [EMAIL PROTECTED] wrote: I'm trying to upload the file. It's showing me successfully uploaded. But it's not able to move from temp directory to my defined directory my code: if (is_uploaded_file($_FILES['myfile']['tmp_name'])) { move_uploaded_file($_FILES['myfile']['tmp_name'], $myfilename); echo File . $_FILES['myfile']['name'] . uploaded successfully.\n; } else { echo File uploading error; } Thanks in advance. -Jignesh Is the directory you're moving to writable by your web server? If you don't know, try making a separate script that tries var_dump(is_writable('/path/to/uploads')); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file problem
Maybe check the return value of the function: http://us3.php.net/manual/en/function.move-uploaded-file.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jignesh Thummar wrote: I'm trying to upload the file. It's showing me successfully uploaded. But it's not able to move from temp directory to my defined directory my code: if (is_uploaded_file($_FILES['myfile']['tmp_name'])) { move_uploaded_file($_FILES['myfile']['tmp_name'], $myfilename); echo File . $_FILES['myfile']['name'] . uploaded successfully.\n; } else { echo File uploading error; } Thanks in advance. -Jignesh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file problem
On Thu, Jul 31, 2008 at 10:18 AM, Jignesh Thummar [EMAIL PROTECTED] wrote: I'm trying to upload the file. It's showing me successfully uploaded. But it's not able to move from temp directory to my defined directory my code: if (is_uploaded_file($_FILES['myfile']['tmp_name'])) { move_uploaded_file($_FILES['myfile']['tmp_name'], $myfilename); echo File . $_FILES['myfile']['name'] . uploaded successfully.\n; } else { echo File uploading error; } If it is passing the if(is_uploaded_file()) condition, echo out $myfilename and make sure it's valid to use as a path/filename. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file problem
Jignesh Thummar wrote: I'm trying to upload the file. It's showing me successfully uploaded. But it's not able to move from temp directory to my defined directory my code: if (is_uploaded_file($_FILES['myfile']['tmp_name'])) { move_uploaded_file($_FILES['myfile']['tmp_name'], $myfilename); echo File . $_FILES['myfile']['name'] . uploaded successfully.\n; } else { echo File uploading error; } What does $myfilename resolve to? It should include the complete path from server root (not DOCUMENT_ROOT). Try: echo File uploading error: ${myfilename}; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file problem
Thanks.. It's fixed... - Jignesh On Thu, Jul 31, 2008 at 6:05 PM, brian [EMAIL PROTECTED] wrote: Jignesh Thummar wrote: I'm trying to upload the file. It's showing me successfully uploaded. But it's not able to move from temp directory to my defined directory my code: if (is_uploaded_file($_FILES['myfile']['tmp_name'])) { move_uploaded_file($_FILES['myfile']['tmp_name'], $myfilename); echo File . $_FILES['myfile']['name'] . uploaded successfully.\n; } else { echo File uploading error; } What does $myfilename resolve to? It should include the complete path from server root (not DOCUMENT_ROOT). Try: echo File uploading error: ${myfilename}; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file then move between servers
On 4/21/07, blackwater dev [EMAIL PROTECTED] wrote: I need to allow a user to upload a file. Once the file is up, I need to then move it to another server and wsync it to our webclusters. What's the best way to do this with php? I don't really want php issuing root commands. I've considered storing the file in the db but really need it to be scanned (they should just be images) then pushed out to my servers. Thanks! You could transfer files between servers using FTP.Or using internal network connections. like if you have mounted the second server at /mnt/server2, you could simply move the file with the built in PHP command. http://www.php.net/move_uploaded_file Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file then move between servers
On Fri, April 20, 2007 5:11 pm, blackwater dev wrote: I need to allow a user to upload a file. Once the file is up, I need to then move it to another server and wsync it to our webclusters. What's the best way to do this with php? I don't really want php issuing root commands. I've considered storing the file in the db but really need it to be scanned (they should just be images) then pushed out to my servers. Let PHP do all the checks you can think of, and then http://php.net/move_uploaded_file to the directory that is getting wrsync'ed or whatever. Let root cron job handle the sync. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file then move between servers
I need to allow a user to upload a file. Once the file is up, I need to then move it to another server and wsync it to our webclusters. What's the best way to do this with php? I don't really want php issuing root commands. I've considered storing the file in the db but really need it to be scanned (they should just be images) then pushed out to my servers. Thanks!
[PHP] upload file
Hi, I would like in fact to make more precise my previous post. I would like in fact to restrict the file extension (and therefore the user possibility). My user should be able only to upload files with extension JPEG, BMP, GIF. How can i set those parameter ? thx. -- Alain Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5
Re: [PHP] upload file
Alain Roger wrote: I would like in fact to make more precise my previous post. I would like in fact to restrict the file extension (and therefore the user possibility). My user should be able only to upload files with extension JPEG, BMP, GIF. How can i set those parameter ? You can't control that without using a client-side technology like Java or ActiveX. It may also be possible to use Javascript in the onsubmit event on the form to check the file extension. If I may make a suggestion... don't over-complicate it. Trust your users to do the right thing on their side, help them by providing instructions, and validate what they've sent you in case they don't read them. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file - clients path to file?
Interaction to write to a input file type is denied in browsers not to read the value so you can can get the full path using JavaScript like any other input in the form(document.formname.inputname.value) and pass it to other input field lets say input fullpath using something like document.formname.fullpath = document.formname.inputname.value -- all using javascript So yes you can get the fullpath however you should redirect your question to a JavaScript List or perhaps a javascript-php list. Regards Angelo - Original Message - From: Jasper Bryant-Greene [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, August 30, 2005 7:14 AM Subject: Re: [PHP] upload file - clients path to file? [EMAIL PROTECTED] wrote: I havent found an answer after looking at the manual. I'm trying to find out if it possible to find the path of the file on the clients pc once a form has been submitted with the file upload form. I know its possible to get the file name but I need the whole path. is this possible? Not with pure PHP. Maybe with some JavaScript, but most browsers heavily limit any interaction with input type=file controls from JavaScript. So probably not at all. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file - clients path to file?
Hi all. I havent found an answer after looking at the manual. I'm trying to find out if it possible to find the path of the file on the clients pc once a form has been submitted with the file upload form. I know its possible to get the file name but I need the whole path. is this possible? thanks in advance. -- Angelo Zanetti This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file - clients path to file?
[EMAIL PROTECTED] wrote: I havent found an answer after looking at the manual. I'm trying to find out if it possible to find the path of the file on the clients pc once a form has been submitted with the file upload form. I know its possible to get the file name but I need the whole path. is this possible? Not with pure PHP. Maybe with some JavaScript, but most browsers heavily limit any interaction with input type=file controls from JavaScript. So probably not at all. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file problem
On Sat, July 9, 2005 1:39 am, Ahmed Abdel-Aliem said: Hi i have a problem with a code to upload files on server here is the code $f = $HTTP_POST_FILES['News_Pic']; Use $_FILES to stay current... $dst_file_name = generateUniqueId(); $arr = split(\.,$f['name']); $f['name'] = $dst_file_name; $f['name'] .= ..$arr[count($arr)-1]; $dest_dir = 'main/pictures'; $dest = $dest_dir . '/' .$f['name']; So, what happened to $dst_file_name? Far as I can tell, you've never used it... $r = move_uploaded_file($f['tmp_name'], $dest); $News_Pic = $f['name']; chmod($dest, 777); Nooo! You should *NOT* be trying to make the files 777. And it should be 0777 anyway. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file problem
Hi i have a problem with a code to upload files on server here is the code $f = $HTTP_POST_FILES['News_Pic']; $dst_file_name = generateUniqueId(); $arr = split(\.,$f['name']); $f['name'] = $dst_file_name; $f['name'] .= ..$arr[count($arr)-1]; $dest_dir = 'main/pictures'; $dest = $dest_dir . '/' .$f['name']; $r = move_uploaded_file($f['tmp_name'], $dest); $News_Pic = $f['name']; chmod($dest, 777); after uploading a file i check the folder and i find nothing uploaded and when i check the MySQL Table for the filed of the name of the picture i find this ef26fc32a2855a4edb6ef389b8b621af. it should be that random number followed by the extension, for example : ef26fc32a2855a4edb6ef389b8b621af.jpg but this deosn't happen and the file is not uploaded can anyone help me with this plz ? -- Ahmed Abdel-Aliem Web Developer www.ApexScript.com 0101108551 registered Linux user number 382789 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file size limit
Hi, I have created one php file for uploading the file. i also made changes in /etc/php.ini for size limit. but i can not upload the files greater than 5mb. Is there any modification which has to be done in other configuration file. thanks in advance santosh __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size limit
Run phpinfo() to see the Configuration File (php.ini) Path. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size limit
the path is /etc/php.ini also upload_max_filesize 50M 50M Waiting for reply. --- Wudi [EMAIL PROTECTED] wrote: Run phpinfo() to see the Configuration File (php.ini) Path. __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size limit
On Mon, 31 Jan 2005 03:15:00 -0800, Badlya Badlu wrote: the path is /etc/php.ini also upload_max_filesize 50M 50M Waiting for reply. it also depends on your webserver. I guess you are running apache2? thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size limit
yes httpd-2.0.49-4 Should i upgrade it? --- Thomas Seifert [EMAIL PROTECTED] wrote: On Mon, 31 Jan 2005 03:15:00 -0800, Badlya Badlu wrote: the path is /etc/php.ini also upload_max_filesize 50M 50M Waiting for reply. it also depends on your webserver. I guess you are running apache2? thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size limit
badlya badlu wrote: I have created one php file for uploading the file. i also made changes in /etc/php.ini for size limit. but i can not upload the files greater than 5mb. Is there any modification which has to be done in other configuration file. Check your POST size limit in, errr, php.ini or httpd.conf If you only allow 5M of POST data, you can't cram 50M files into that... POST limit should be higher than max upload size. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size limit
Look in /etc/httpd/conf.d/php.conf For a buddy with a file upload need I set it to this: Files *.php SetOutputFilter PHP SetInputFilter PHP LimitRequestBody 760217600 /Files You will need to set your upload limit higher in this file for it to work correctly. Robert -- Robert Sossomon, Business and Technology Application Technician 4-H Youth Development Department 200 Ricks Hall, Campus Box 7606 N.C. State University Raleigh NC 27695-7606 Phone: 919/515-8474 Fax: 919/515-7812 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size limit
thanks bobert. I have done it. thanks... --- Robert Sossomon [EMAIL PROTECTED] wrote: Look in /etc/httpd/conf.d/php.conf For a buddy with a file upload need I set it to this: Files *.php SetOutputFilter PHP SetInputFilter PHP LimitRequestBody 760217600 /Files You will need to set your upload limit higher in this file for it to work correctly. Robert -- Robert Sossomon, Business and Technology Application Technician 4-H Youth Development Department 200 Ricks Hall, Campus Box 7606 N.C. State University Raleigh NC 27695-7606 Phone: 919/515-8474 Fax: 919/515-7812 [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file warning
I got a php waring when I upload my file: Warning: MAX_FILE_SIZE of 20 bytes exceeded - file [imgpath=mz-n10.pdf] not saved in Unknown on line 0 In the form I write like these: input type='hidden' name='MAX_FILE_SIZE' value=20 input type='file' name='imgpath' And my configuration is : file_uploads = on upload_max_filesize = 4M upload_tmp_dir = /tmp so, what 's wrong? And can I catch the exceeded file error before it is passed back to the client? Best wishes. yangshiqi
[PHP] upload file permission problem
Hi all, I just upgraded my server into PHP 5. I run the same script which is working in 4.2.2. But In PHP 5 has followings msg: Warning: move_uploaded_file(upload_files/Gnatt.htm) [function.move-uploaded-file]: failed to open stream: Permission denied in /var/www/html/simple_upload.php on line 60 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpZ29DAN' to 'upload_files/Gnatt.htm' in /var/www/html/simple_upload.php on line 60 I am 100% sure , I have changed the upload_files dir into 0777 mod. Any one can help? yours, Michael Leung -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload file form
Ok, not exactly pure PHP problem but I hope someone here has seen this before.. I'm got an upload form on a webpage, here's the code: SNIP ? Select the file type and browse for that file. The press 'Upload'. The file will be uploaded to the server. No changes in the database are done during this step. FORM METHOD=POST ENCTYPE=multipart/form-data ACTION=?php echo $_SERVER['PHP_SELF'] ? Form action: ?php echo $_SERVER['PHP_SELF'] ?br Select CDR file type: select size=1 name=ftype option value='1:Stratos'Stratos/option option value='2:MVS'MVS/option option value='3:Xantic'Xantic/option /select/p P Browse for the fileP INPUT TYPE=HIDDEN NAME=MAX_FILE_SIZE VALUE=2 INPUT TYPE=HIDDEN NAME=action VALUE=1 INPUT TYPE=HIDDEN NAME=uid VALUE=[OpSup]jsm CDR File: INPUT TYPE=FILE NAME=file1 SIZE=80BRBR INPUT TYPE=SUBMIT VALUE=Upload /FORM ?php SNIP I'm running this page on Redhat Linux 9 with an Apache ver 2 webserver. The site itself is a virtualName site (All virutal sites share the same IP address). When I browse for the tile and select it, then press the submit button, Instead of getting a delay as the file uploads, I get an instant error page from the browers: The page cannot be displayed: Cannot file server or DNS Error Any ideas? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Upload file form
-Original Message- From: Jeff McKeon Sent: Tuesday, April 20, 2004 10:21 AM To: [EMAIL PROTECTED] Subject: [PHP] Upload file form Ok, not exactly pure PHP problem but I hope someone here has seen this before.. I'm got an upload form on a webpage, here's the code: SNIP ? Select the file type and browse for that file. The press 'Upload'. The file will be uploaded to the server. No changes in the database are done during this step. FORM METHOD=POST ENCTYPE=multipart/form-data ACTION=?php echo $_SERVER['PHP_SELF'] ? Form action: ?php echo $_SERVER['PHP_SELF'] ?br Select CDR file type: select size=1 name=ftype option value='1:Stratos'Stratos/option option value='2:MVS'MVS/option option value='3:Xantic'Xantic/option /select/p P Browse for the fileP INPUT TYPE=HIDDEN NAME=MAX_FILE_SIZE VALUE=2 INPUT TYPE=HIDDEN NAME=action VALUE=1 INPUT TYPE=HIDDEN NAME=uid VALUE=[OpSup]jsm CDR File: INPUT TYPE=FILE NAME=file1 SIZE=80BRBR INPUT TYPE=SUBMIT VALUE=Upload /FORM ?php SNIP I'm running this page on Redhat Linux 9 with an Apache ver 2 webserver. The site itself is a virtualName site (All virutal sites share the same IP address). When I browse for the tile and select it, then press the submit button, Instead of getting a delay as the file uploads, I get an instant error page from the browers: The page cannot be displayed: Cannot file server or DNS Error Any ideas? It appears that it may be a filesize issue. I made a small text file and it uploaded fine, a 13MB csv however causes the problem. In php.ini I've set the Max_file_uplode = 20M But still have the problem. Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Upload file form SOLVED
The problem is solved. /etc/httpd/conf.d/php.conf the parameter LimitRequestBody is set to 524288 by default. Jeff -Original Message- From: Jeff McKeon Sent: Tuesday, April 20, 2004 10:48 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Upload file form -Original Message- From: Jeff McKeon Sent: Tuesday, April 20, 2004 10:21 AM To: [EMAIL PROTECTED] Subject: [PHP] Upload file form Ok, not exactly pure PHP problem but I hope someone here has seen this before.. I'm got an upload form on a webpage, here's the code: SNIP ? Select the file type and browse for that file. The press 'Upload'. The file will be uploaded to the server. No changes in the database are done during this step. FORM METHOD=POST ENCTYPE=multipart/form-data ACTION=?php echo $_SERVER['PHP_SELF'] ? Form action: ?php echo $_SERVER['PHP_SELF'] ?br Select CDR file type: select size=1 name=ftype option value='1:Stratos'Stratos/option option value='2:MVS'MVS/option option value='3:Xantic'Xantic/option /select/p P Browse for the fileP INPUT TYPE=HIDDEN NAME=MAX_FILE_SIZE VALUE=2 INPUT TYPE=HIDDEN NAME=action VALUE=1 INPUT TYPE=HIDDEN NAME=uid VALUE=[OpSup]jsm CDR File: INPUT TYPE=FILE NAME=file1 SIZE=80BRBR INPUT TYPE=SUBMIT VALUE=Upload /FORM ?php SNIP I'm running this page on Redhat Linux 9 with an Apache ver 2 webserver. The site itself is a virtualName site (All virutal sites share the same IP address). When I browse for the tile and select it, then press the submit button, Instead of getting a delay as the file uploads, I get an instant error page from the browers: The page cannot be displayed: Cannot file server or DNS Error Any ideas? It appears that it may be a filesize issue. I made a small text file and it uploaded fine, a 13MB csv however causes the problem. In php.ini I've set the Max_file_uplode = 20M But still have the problem. Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file
Dear list, I'm using squirrelmail php as my webmail interface, my php.ini have the option of upload_max_filesize = 10M but i'm having problem for adding attachment more than 400k, where the page will hang. is there any recommended things for me to check? Thanks !
Re: [PHP] upload file
Ketvin wrote: Dear list, I'm using squirrelmail php as my webmail interface, my php.ini have the option of upload_max_filesize = 10M but i'm having problem for adding attachment more than 400k, where the page will hang. is there any recommended things for me to check? post_max_size, max_input_time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file
Marek Kilimajer wrote: Ketvin wrote: Dear list, I'm using squirrelmail php as my webmail interface, my php.ini have the option of upload_max_filesize = 10M but i'm having problem for adding attachment more than 400k, where the page will hang. is there any recommended things for me to check? post_max_size, max_input_time In some rare cases apache directives also come into the picture such as a LimitRequestBody. -- Raditha Dissanayake. - http://www.radinks.com/print/upload.php SFTP, FTP and HTTP File Upload solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload file field not working as a form element
As much as I try I cannot get a file field in a form inserted into a MySQL record. I've even tried to get it to echo to the page when the page is submitted to itself and it's not reading the field. What am I missing here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload file size limits
I would like to give the users of my web site the ability to upload video type files, up to 12 megs in size. I notice in my PHI.INI there is a memory_limit =8M ; Maximum amount of memory a script may consume (8MB) does this include temporary such as a file being transferred? Also I intend to set the PHI.INI 'upload_max_filesize = 2M' to 'upload_max_filesize = 12M'. Am I going in the right direction? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload file size limits
Chris -- ...and then Chris Edwards said... % % I would like to give the users of my web site the ability to upload video % type files, up to 12 megs in size. OK. % % I notice in my PHI.INI there is a % % memory_limit =8M ; Maximum amount of memory a script may consume % (8MB) % % does this include temporary such as a file being transferred? As far as I can tell it does not; I have uploaded 20M and larger files but haven't tweaked memory_limit. % % Also I intend to set the PHI.INI 'upload_max_filesize = 2M' to % 'upload_max_filesize = 12M'. Good. % % Am I going in the right direction? You sure are! This has, by the way, been covered in great detail; you should check the archives for more info. % % Thanks. HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] upload file size
wich kind of files are we talking about? pictures or others? Gerard Samuel [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] On Friday 14 November 2003 12:48 pm, joe wrote: is there a way to check the file size without fully uploading the file? No there isnt, well at least not via php... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size
Gerard Samuel wrote: On Friday 14 November 2003 12:48 pm, joe wrote: is there a way to check the file size without fully uploading the file? No there isnt, well at least not via php... correct. There are two solutions you can upload with a java applet, the applet can be configured to lock the upload at a predefined limit. Would save you a lot of bandwidth. The second is to upload via perl script, which can check the Content-length header *before* processing the file upload and block it. In fact megaupload - the php upload progress bar that i did some time ago has this feature. sorry about the belated reply message had been stuck in a que.. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size
On Saturday 15 November 2003 02:40, Johnson, Kirk wrote: this could really kill my bandwidth. is there a way to check the file size without fully uploading the file? Although it has been called an urban legend :), you could try the old MAX_FILE_SIZE trick. I think you may be referring to my labelling of the MAX_FILE_SIZE thing as an urban legend. But you're using it in the wrong context. What it was is that some people reported having problems uploading files with PHP and that it only worked when they added that MAX_FILE_SIZE tag. I countered that adding the tag would only, potentially, *prevent* an upload -- in the (rare) case that the browser supported it ... For this, add a hidden tag before the input type=file tag: input type=hidden name=MAX_FILE_SIZE value=(your $ of bytes here) This is an instruction to the browser to restrict the size of files that it will attempt to upload, but browers are not required to honor it. ... I think that in my tests at that time, of the 'major' browsers, only Opera supported the tag. But refer to the archives to be sure. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* 3. ...and after I patched the microcode... --Top 100 things you don't want the sysadmin to say */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file size
Hi i really need help with an upload script. right now i use if ($HTTP_POST_FILES['userfile']['size']$maxsize) { echo File too big; exit; } to determine if the file is larger than allowed. but the problem is, that if the file IS larger, it is still first fully uploaded and then checked. i tested it several times - if the file is much larger than allowed, it displays the error message but the page loads a lot longer and my computer is sending the file to the server. this could really kill my bandwidth. is there a way to check the file size without fully uploading the file? thanks joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size
On Friday 14 November 2003 12:48 pm, joe wrote: is there a way to check the file size without fully uploading the file? No there isnt, well at least not via php... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] upload file size
this could really kill my bandwidth. is there a way to check the file size without fully uploading the file? Although it has been called an urban legend :), you could try the old MAX_FILE_SIZE trick. For this, add a hidden tag before the input type=file tag: input type=hidden name=MAX_FILE_SIZE value=(your $ of bytes here) This is an instruction to the browser to restrict the size of files that it will attempt to upload, but browers are not required to honor it. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file size corruption?
I was wondering if php has a bug or is it apache, and how to determine which it it. Every file I upload to my server, I print the file size and it is twice the normal file size? Any idea what is going on, text files look ok, images are all screwed up, large text files are messed up too actually? I am going nuts reinstalling over and over again on different computers and keep getting this error. I am using 2.0.40 http (I know experimental, but don't tell me that :) ) Any ideas? Just want to know if its php or apache that is the problem. If both thats ok, just need to know. Thanks Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size corruption?
I am going nuts reinstalling over and over again on different computers and keep getting this error. I am using 2.0.40 http (I know experimental, but don't tell me that :) ) Why not? Since this is the problem. Upgrade to Apache 1.3.27 and everything will be fine. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload file
I am using PHP 4.2.1 and have noticed that I can only upload files with a php script when I have the php.ini file set with register globals on. Is there a way to use the file upload scripts without having to turn the register globals on? How about newer versions of PHP? _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload file
I am using PHP 4.2.1 and have noticed that I can only upload files with a php script when I have the php.ini file set with register globals on. Is there a way to use the file upload scripts without having to turn the register globals on? How about newer versions of PHP? Yes, you'll use the $_FILES array to get to the uploaded file data. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload file
On Thursday 23 January 2003 21:20, Tyler Durdin wrote: I am using PHP 4.2.1 and have noticed that I can only upload files with a php script when I have the php.ini file set with register globals on. Is there a way to use the file upload scripts without having to turn the register globals on? How about newer versions of PHP? Whether or not you can upload files is determined by the setting of 'file_uploads'. 'register_globals' has nothing to do with it. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Si jeunesse savait, si vieillesse pouvait. [If youth but knew, if old age but could.] -- Henri Estienne */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload file thanks
Hello guys My problem uploading files was solved, thanks a lot to all those that helped me in any way. Bye -- *** Wilmar Pérez Network Administrator Library System Tel: ++57(4)2105962 University of Antioquia Medellín - Colombia 2002 *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file
This should be very simple but it isn't working. upload.html has this: form action=upload2.php method=POST enctype=multipart/form-data input type=file name=userfile input type=submit name=submit value=submit /form and upload2.php has this: ?php echo(in post); echo($_POST['userfile]); ? Where is the file?? Thanks __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file
Daniel Guerrier wrote: echo($_POST['userfile]); Do you mean $_POST[userfile] here? It looks like you're missing a quote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file
Thanks the quote wasn't the issue. Actually I shold have use $_FILE not $_POST . --- Chris Shiflett [EMAIL PROTECTED] wrote: Daniel Guerrier wrote: echo($_POST['userfile]); Do you mean $_POST[userfile] here? It looks like you're missing a quote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] A Question about PHP upload file
Is there is a volume limitted for PHP upload file using HTTP? I heard of there is a 8-9Mb limitted,is it true? Is there a method to solve it?
[PHP] Re: A Question about PHP upload file
http://www.php.net/manual/en/configuration.php#ini.memory-limit http://www.php.net/manual/en/configuration.php#ini.post-max-size http://www.php.net/manual/en/configuration.php#ini.upload-max-filesize Mintbaggio wrote: Is there is a volume limitted for PHP upload file using HTTP? I heard of there is a 8-9Mb limitted,is it true? Is there a method to solve it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: A Question about PHP upload file
In article 002a01c24474$33be4d80$[EMAIL PROTECTED], [EMAIL PROTECTED] says... SXMgdGhlcmUgaXMgYSB2b2x1bWUgbGltaXR0ZWQgZm9yIFBIUCB1cGxvYWQgZmlsZQ0KdXNpbmcg SFRUUD8NCkkgaGVhcmQgb2YgdGhlcmUgaXMgYSA4LTlNYiBsaW1pdHRlZCxpcyBpdCB0cnVlPw0K SXMgdGhlcmUgYSBtZXRob2QgdG8gc29sdmUgaXQ/DQo= If you can set Outhouse to send just text, those of us _not_ using ita might have a better chance of responding to your queries. Cheers -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload File Problem
I have a simple script that attempts to upload a file and save it on the server. When I click send file I get this error message 'Warning: Unable to open '' for reading: No such file or directory in /var/www/html/upload.php on line 5 Couldn't copy the file!'. The file is being uploaded from a Win 2000 machine and the php script live on an apache web server on a linux box. I have chmod 777 the 'image' directory. Any ideas? Here's the code - -- upload.html -- html head titleUpload a File/title /head body h1Upload a File/h1 form enctype=multipart/form-data method=post action=upload.php pstrongFile to Upload:/strongbr input type=file name=img1 size=30/p Pinput type=submit name=submit value=Upload File/p /form /body /html -- upload.php -- ?php if ('img1' != ) { copy($img1_tmp_name, images/.$img1_name) or die(Couldn't copy the file!); } else { die(No input file specified); } ? This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Upload File Problem
From: Mark Colvin [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 10:09 AM -- upload.php -- ?php if ('img1' != ) { This will allways be true! 'img1' is a string and will never be empty. You probably mean if($img1 != ) However, I'm not sure this will work in this case. Try this instead. (Taken straight from the PHP-manual. A real good resource!) ?php if (is_uploaded_file($_FILES['img1']['tmp_name'])) { $filename = $_FILES['img1']['tmp_name']; print $filename was uploaded successfuly; $realname = $_FILES['img1']['name']; print realname is $realname; print copying file to uploads dir; copy($_FILES['img1']['tmp_name'], /place/to/put/ . $realname); } else { echo Possible file upload attack: filename . $_FILES['img1']['name'] . .; } ? If you use PHP 4.1.0 you must exchange $_FILES to $HTTP_POST_FILES Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Upload File Problem
Joakim, Thank you for your reply. I tried your example and get 'Possible file upload attack: filename.' meaning that 'if (is_uploaded_file($_FILES['img1']['tmp_name']))' returns false. I put a couple of echo statements in before the if statement to check '$img1_name' '$img1_size and '$img1_type' and these all returned the correct values. I have my upload_tmp_dir in php.ini set to /var/www/html/img and this folder has 777 permissions. Do you think the file is not getting to temp directory and if so any idea why? This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Upload File Problem
From: Mark Colvin [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 12:41 PM To: [EMAIL PROTECTED] Joakim, Thank you for your reply. I tried your example and get 'Possible file upload attack: filename.' meaning that 'if (is_uploaded_file($_FILES['img1']['tmp_name']))' returns false. I put a couple of echo statements in before the if statement to check '$img1_name' '$img1_size and '$img1_type' and these all returned the correct values. I have my upload_tmp_dir in php.ini set to /var/www/html/img and this folder has 777 permissions. Do you think the file is not getting to temp directory and if so any idea why? Have you tried echoing $_FILES['img1']['tmp_name'] or $HTTP_POST_FILES['img1']['tmp_name']? If the first doesn't work, you may have to exchange $_FILES to $HTTP_POST_FILES or $_FILES['img1']['tmp_name'] to $img1_tmp_name etc. /Joakim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Upload File Problem
Joakim, Thanks again. $HTTP_POST did the trick. I did look through the archives before posting but didn't come across this solution. I obviously didn't look hard enough! This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file size
Hi, I can't seem to upload file bigger than 5M even if I set the upload_max_filesize to 20M in php.ini and MAX_FILE_SIZE to 20M in the script. What's am I missing here? Is the temporary upload directory won't handle file this size? Please give me some pointers here. TIA. Regards, Norman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file size
On Saturday 06 July 2002 10:04, Norman Zhang wrote: Hi, I can't seem to upload file bigger than 5M even if I set the upload_max_filesize to 20M in php.ini and MAX_FILE_SIZE to 20M in the script. What's am I missing here? Is the temporary upload directory won't handle file this size? Please give me some pointers here. TIA. You may need to change the post_max_size (in php.ini) as well. Manual Handling file uploads Common Pitfalls -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Richard B. Johnson wrote: The 'C' language can order structure members anyway it wants. You are an idiot. - Rusty Russell on linux-kernel */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload File
Hi all, i want ask something : How to upload files from local to server via php ? and i want use it with browser. Please gimme the code. Thank You -- Kalpin Erlangga Silaen Kalpin is [EMAIL PROTECTED] Kalpin is not a irc warrior http://www.geocities.com/kalpinus Ready or Not, He will come -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload File
You might be new to this group, so I'm going to try not to flame you. 1. this group is not for gimmie the code -- commonly it's for focused questions and issues. 2. this topic has been discussed on this list 1000's of times... a quick search of the archives may in fact reveal a large chunk of code you could 'borrow'. you should have checked there before asking. 3. if you searched the manual for file upload, you would have found this page, wish basically gives you all the code you need http://www.php.net/manual/en/html/features.file-upload.html 4. i'm sure there are many sites with file upload scripts and classes ready-to-roll. 5. you'll earn more if you don't just copy and paste everything. Justin French Indent.com.au on 02/05/02 12:25 PM, Kalpin Erlangga Silaen ([EMAIL PROTECTED]) wrote: Hi all, i want ask something : How to upload files from local to server via php ? and i want use it with browser. Please gimme the code. Thank You -- Kalpin Erlangga Silaen Kalpin is [EMAIL PROTECTED] Kalpin is not a irc warrior http://www.geocities.com/kalpinus Ready or Not, He will come -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload File
Hi all, i want ask something : How to upload files from local to server via php ? and i want use it with browser. Please gimme the code. Please give me a break. Read the manual, there is a whole chapter telling you how to do this! http://www.php.net/manual/en Assuming you understand english. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]Upload file to system
Is that a bad word? \ : [EMAIL PROTECTED] wrote: Did someone say hosting fees? - Original Message - From: sundogcurt [EMAIL PROTECTED] To: GENERAL PHP LIST [EMAIL PROTECTED] Sent: Monday, January 28, 2002 3:32 PM Subject: Re: [PHP]Upload file to system You could try contacting your server admin and seeing if he / she will increase the limit... That would be where I would start. If that doesn't work, my hosting fees are quite reasonable ahah [EMAIL PROTECTED] wrote: Thnx. it's working now. But.. Howcome I can only upload files no bigger then 100 kb? I have changed the MAX_FILE_SIZE to 10. Also, I can't change the php.ini, coz the webserver isn't mine.. what to do now?? Sundogcurt wrote: http://www.php.net/manual/en/features.file-upload.php http://www.faqts.com/knowledge_base/view.phtml/aid/988 : ) [EMAIL PROTECTED] wrote: I want to make something like when you are attaching something to an email in hotmail. I want to make something that searches your own computer for files on your harddisk that you want to upload to the server. But I don't know if this is possible. If this is possible.Can somebody tell me which function I should use? Or if someone have an example... please... Duky
[PHP]Upload file to system
I want to make something like when you are attaching something to an email in hotmail. I want to make something that searches your own computer for files on your harddisk that you want to upload to the server. But I don't know if this is possible. If this is possible.Can somebody tell me which function I should use? Or if someone have an example... please... Duky -- 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]
Re: [PHP]Upload file to system
http://www.php.net/manual/en/features.file-upload.php http://www.faqts.com/knowledge_base/view.phtml/aid/988 : ) [EMAIL PROTECTED] wrote: I want to make something like when you are attaching something to an email in hotmail. I want to make something that searches your own computer for files on your harddisk that you want to upload to the server. But I don't know if this is possible. If this is possible.Can somebody tell me which function I should use? Or if someone have an example... please... Duky -- 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]
Re: [PHP]Upload file to system
Thnx. it's working now. But.. Howcome I can only upload files no bigger then 100 kb? I have changed the MAX_FILE_SIZE to 10. Also, I can't change the php.ini, coz the webserver isn't mine.. what to do now?? Sundogcurt wrote: http://www.php.net/manual/en/features.file-upload.php http://www.faqts.com/knowledge_base/view.phtml/aid/988 : ) [EMAIL PROTECTED] wrote: I want to make something like when you are attaching something to an email in hotmail. I want to make something that searches your own computer for files on your harddisk that you want to upload to the server. But I don't know if this is possible. If this is possible.Can somebody tell me which function I should use? Or if someone have an example... please... Duky -- 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]
Re: [PHP]Upload file to system
You could try contacting your server admin and seeing if he / she will increase the limit... That would be where I would start. If that doesn't work, my hosting fees are quite reasonable ahah [EMAIL PROTECTED] wrote: Thnx. it's working now. But.. Howcome I can only upload files no bigger then 100 kb? I have changed the MAX_FILE_SIZE to 10. Also, I can't change the php.ini, coz the webserver isn't mine.. what to do now?? Sundogcurt wrote: http://www.php.net/manual/en/features.file-upload.php http://www.faqts.com/knowledge_base/view.phtml/aid/988 : ) [EMAIL PROTECTED] wrote: I want to make something like when you are attaching something to an email in hotmail. I want to make something that searches your own computer for files on your harddisk that you want to upload to the server. But I don't know if this is possible. If this is possible.Can somebody tell me which function I should use? Or if someone have an example... please... Duky
[PHP] Upload file problems on Win 2K
Hi, I'm trying to fix upload file problems on Win 2K server. I've got the allow directive set to on in the PHP.ini file, and the permissions set to give everyone full access on the directory specified in the ini file. The file never shows up. I'm using code identical to working code for a linux app, but we need it to run under MS as well. The ini file seems right, are there any major differences, and is there any reason the identical code doesen't work. The file does not ever show up on the server... Thanks Mike B. -- 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]
RE: [PHP] Upload file problems on Win 2K
It'd be simpler to help if you posted the releveant portions of the INI files and code... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]. net] On Behalf Of Mike Baranski Sent: Wednesday, December 26, 2001 10:19 AM To: [EMAIL PROTECTED] Subject: [PHP] Upload file problems on Win 2K Hi, I'm trying to fix upload file problems on Win 2K server. I've got the allow directive set to on in the PHP.ini file, and the permissions set to give everyone full access on the directory specified in the ini file. The file never shows up. I'm using code identical to working code for a linux app, but we need it to run under MS as well. The ini file seems right, are there any major differences, and is there any reason the identical code doesen't work. The file does not ever show up on the server... Thanks Mike B. -- 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]
[PHP] Upload file(s) using socket/fopen
Hello list, Simple Enough Objective: store file remotely (wu-ftp); MinorSnag: PHP's ftp-functions unavailable at localhost; BelowWorkaround: works fine for deleting remote file; MajorSnag: how to STORE a file remotely using socket? ?php $ftp=fsockopen(ftp.server.com, 21, $errno, $errstr, 60); if (!$ftp) { echo Connection failed: $errstr ($errno); exit; } else { socket_set_blocking($ftp, true); echo fgets($ftp,255); fputs($ftp,USER ftp_username\r\n); echo fgets($ftp,255); fputs($ftp,PASS ftp_passw\r\n); echo fgets($ftp,255); fputs($ftp,DELE /home/httpd/html/test.htm\r\n); echo fgets($ftp,255); fputs($ftp,QUIT\r\n); echo fgets($ftp,255); fclose($ftp); } ? BTW: I also messed with fopen(ftp://user:pass@...;) but failed miserably (although it seemed possible before my mind wandered off). ANY HELP IS APPRECIATED (using socket, fopen, ...) -- [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]
[PHP] upload file using socket/fopen
Hello list, Simple Enough Objective: store file remotely (wu-ftp); MinorSnag: PHP's ftp-functions unavailable at localhost; BelowWorkaround: works fine for deleting remote file; MajorSnag: how to STORE a file remotely using socket? ?php $ftp=fsockopen(ftp.server.com, 21, $errno, $errstr, 60); if (!$ftp) { echo Connection failed: $errstr ($errno); exit; } else { socket_set_blocking($ftp, true); echo fgets($ftp,255); fputs($ftp,USER ftp_username\r\n); echo fgets($ftp,255); fputs($ftp,PASS ftp_passw\r\n); echo fgets($ftp,255); fputs($ftp,DELE /home/httpd/html/test.htm\r\n); echo fgets($ftp,255); fputs($ftp,QUIT\r\n); echo fgets($ftp,255); fclose($ftp); } ? BTW: I also messed with fopen(ftp://user:pass@...;) but failed miserably (although it seemed possible before my mind wandered off). ANY HELP IS APPRECIATED (using socket, fopen, ...) -- [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]
[PHP] Upload File Path Problem
All, I am putting together a simple upload program where an HTML form calls a php script passing a file which is then used to upload. I am running this locally currently, prior to rolling out to a test server. My problem is this. The variable $filename I am passing from the form to the php script is having the path corrupted. In the php script if I echo $filename_name the file name is being passed correctly (test.txt) but when I echo the $filename variable it contains a value of \\php2 when infact the correct value should be c:\test.txt. I include below my sample code. If anyone has any ideas I would be most grateful. Thanks in advance, Roger upload.html == HTML FORM form enctype=multipart/form-data METHOD=POST ACTION = uploadrjb.php3 PRE Upload file : INPUT TYPE=file INPUT NAME=userfileBR Image Description : INPUT TYPE=text NAME=description SIZE=40 align=leftBR First Name : INPUT TYPE=text NAME=firstname SIZE=30 align=left Last Name: INPUT TYPE=text NAME=lastname SIZE=30 align=leftBR Location: SELECT NAME=location OPTION VALUE =01Dagenham/OPTION OPTION VALUE =02Romford/OPTION OPTION VALUE =03Other/OPTION /SELECTBR Age : INPUT TYPE=text NAME=age SIZE=2 ALIGN=rightBR Email Address : INPUT TYPE=text NAME=email SIZE=30 ALIGN=leftBR INPUT TYPE=SUBMIT Value=UploadBR /PRE /FORM /HTML uploadrjb.php3 == ?php //echo $userfile; BR echo File= . $userfile; echo File= . $userfile_name; //echo Description= . $description; //echo Age= . $age; //echo First Name = . $firstname; //echo Last Name = . $lastname; //echo Location = . $location; //echo Email = . $email; if ( isset($userfile) ) { if ( copy(c:\\ . $userfile_name, c:\\bollocks.txt) ) { echo(BFile Successfully copied/B); } else { echo(BError: Failed to copy file...B); } } ? __ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- 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]
Re: [PHP] Upload File Path Problem
$imagefile contains the name of the file in the temp dir. So the name is some mess like phpx . If you want the file you do copy() or something other. After the script is done the file is deleted. I prefer using $HTTP_POST_VARS do var_dump($HTTP_POST_VARS) to see debug info. Andrey Hristov IcyGEN Corporation Building Solutions http://www.icygen.com On Friday 05 October 2001 18:41, you wrote: All, I am putting together a simple upload program where an HTML form calls a php script passing a file which is then used to upload. I am running this locally currently, prior to rolling out to a test server. My problem is this. The variable $filename I am passing from the form to the php script is having the path corrupted. In the php script if I echo $filename_name the file name is being passed correctly (test.txt) but when I echo the $filename variable it contains a value of \\php2 when infact the correct value should be c:\test.txt. I include below my sample code. If anyone has any ideas I would be most grateful. Thanks in advance, Roger upload.html == HTML FORM form enctype=multipart/form-data METHOD=POST ACTION = uploadrjb.php3 PRE Upload file : INPUT TYPE=file INPUT NAME=userfileBR Image Description : INPUT TYPE=text NAME=description SIZE=40 align=leftBR First Name: INPUT TYPE=text NAME=firstname SIZE=30 align=left Last Name: INPUT TYPE=text NAME=lastname SIZE=30 align=leftBR Location : SELECT NAME=location OPTION VALUE =01Dagenham/OPTION OPTION VALUE =02Romford/OPTION OPTION VALUE =03Other/OPTION /SELECTBR Age : INPUT TYPE=text NAME=age SIZE=2 ALIGN=rightBR Email Address : INPUT TYPE=text NAME=email SIZE=30 ALIGN=leftBR INPUT TYPE=SUBMIT Value=UploadBR /PRE /FORM /HTML uploadrjb.php3 == ?php //echo $userfile; BR echo File= . $userfile; echo File= . $userfile_name; //echo Description= . $description; //echo Age= . $age; //echo First Name = . $firstname; //echo Last Name = . $lastname; //echo Location = . $location; //echo Email = . $email; if ( isset($userfile) ) { if ( copy(c:\\ . $userfile_name, c:\\bollocks.txt) ) { echo(BFile Successfully copied/B); } else { echo(BError: Failed to copy file...B); } } ? __ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- 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]
Re: [PHP] Upload file from my local C:
On Monday 09 April 2001 18:35, you wrote: Christian Below is my script. ? if (!copy($file,"1.dat")) { echo "error"; } else { echo "successful"; } ? NOTE: where $file is passed by other html using form. how? using a input type='file' ? Then re-read the file uploading chapter in the manual I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) A - American Association Against Acronym Abuse -- 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]
Re: [PHP] Upload file from my local C:
Hi Reiniger, try this : copy(addslashes($file),"1.dat") hope it is clear. keyur - Original Message - From: "Christian Reiniger" [EMAIL PROTECTED] To: "HK Woo" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 4:15 PM Subject: Re: [PHP] Upload file from my local C: On Monday 09 April 2001 18:35, you wrote: Christian Below is my script. ? if (!copy($file,"1.dat")) { echo "error"; } else { echo "successful"; } ? NOTE: where $file is passed by other html using form. how? using a input type='file' ? Then re-read the file uploading chapter in the manual I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) A - American Association Against Acronym Abuse -- 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]
[PHP] Upload file from my local C:
Hi, I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem Thank You! HK Woo -- 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]
RE: [PHP] Upload file from my local C:
Are the permissions set OK? Kirk -Original Message- From: HK Woo [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP] Upload file from my local C: Hi, I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem Thank You! HK Woo -- 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]
Re: [PHP] Upload file from my local C:
Hi, Johnson The file is located at my local WIN ME machine. The file is set to R/W HK Woo ""Johnson, Kirk"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Are the permissions set OK? Kirk -Original Message- From: HK Woo [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP] Upload file from my local C: Hi, I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem Thank You! HK Woo -- 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] -- 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]
Re: [PHP] Upload file from my local C:
Is the file on your win machine on C: or D: ? There seems to be some confusion about that. Also, how are you using 'copy' to upload the file? Are you using a form with a 'file' input type and ENCTYPE="multipart/form-data" in the FORM tag, etc? Just some ideas. Mick On Mon, 9 Apr 2001, HK Woo wrote: Hi, Johnson The file is located at my local WIN ME machine. The file is set to R/W HK Woo ""Johnson, Kirk"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Are the permissions set OK? Kirk -Original Message- From: HK Woo [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP] Upload file from my local C: Hi, I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem Thank You! HK Woo -- 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] -- 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]
Re: [PHP] Upload file from my local C:
what`s the error message now? Can be something like "permission denied"... You should create a diretory and do "chmod 666 dir_name", than you'll have the right permission to write in this diretory. regards, Augusto On Tue, 10 Apr 2001, HK Woo wrote: I have tried to add ENCTYPE as you suggested. However, it still can't work. The file is located in my D: Any more idea? Thank You! HK Woo "Michael Hall" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is the file on your win machine on C: or D: ? There seems to be some confusion about that. Also, how are you using 'copy' to upload the file? Are you using a form with a 'file' input type and ENCTYPE="multipart/form-data" in the FORM tag, etc? Just some ideas. Mick On Mon, 9 Apr 2001, HK Woo wrote: Hi, Johnson The file is located at my local WIN ME machine. The file is set to R/W HK Woo ""Johnson, Kirk"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Are the permissions set OK? Kirk -Original Message- From: HK Woo [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP] Upload file from my local C: Hi, I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem Thank You! HK Woo -- 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] -- 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] -- 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]
Re: [PHP] Upload file from my local C:
On Monday 09 April 2001 17:00, you wrote: Hi, I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem show us some code. The warning should also print the line number where the problem occurs, What does that line do? what do you do in the 5 lines before that? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux) -- 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]
Re: [PHP] Upload file from my local C:
Augusto NO, An error message is "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:" "Augusto Cesar Castoldi" [EMAIL PROTECTED] wrote in message Pine.GSO.4.10.10104091306290.171-10@venus">news:Pine.GSO.4.10.10104091306290.171-10@venus... what`s the error message now? Can be something like "permission denied"... You should create a diretory and do "chmod 666 dir_name", than you'll have the right permission to write in this diretory. regards, Augusto On Tue, 10 Apr 2001, HK Woo wrote: I have tried to add ENCTYPE as you suggested. However, it still can't work. The file is located in my D: Any more idea? Thank You! HK Woo "Michael Hall" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is the file on your win machine on C: or D: ? There seems to be some confusion about that. Also, how are you using 'copy' to upload the file? Are you using a form with a 'file' input type and ENCTYPE="multipart/form-data" in the FORM tag, etc? Just some ideas. Mick On Mon, 9 Apr 2001, HK Woo wrote: Hi, Johnson The file is located at my local WIN ME machine. The file is set to R/W HK Woo ""Johnson, Kirk"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Are the permissions set OK? Kirk -Original Message- From: HK Woo [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP] Upload file from my local C: Hi, I use a command "copy" to upload a file from my local win machine to webserver. However, it is not successful. It prompts that "Warning: Unable to open 'D:\\PHP\\upload1.php' for reading:". I would like to know what is the problem Thank You! HK Woo -- 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] -- 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] -- 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] -- 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]
Re: [PHP] upload file problems
On Mon, Mar 12, 2001 at 10:08:57AM -0800, Jerry Lake wrote: copy($userfile, "/www/workbox/htdocs/audio"); I keep getting the following error. the directory exists and is chmoded to 777, what am I doing wrong ? Warning: Unable to create '/www/workbox/htdocs/audio': Is a directory in /www/workbox/htdocs/upload.php on line 4 I'm no expert, but I would try adding a trailing slash. copy($userfile, "/www/workbox/htdocs/audio/"); -- Jason Stechschulte [EMAIL PROTECTED] -- if (instr(buf,sys_errlist[errno])) /* you don't see this */ -- Larry Wall in eval.c from the perl source code -- 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] upload file problems
Using this code snip ?php if (is_uploaded_file($userfile)) { echo $userfile; copy($userfile, "/www/workbox/htdocs/audio"); } else { echo "Possible file upload attack: filename '$userfile'."; } ? /snip I keep getting the following error. the directory exists and is chmoded to 777, what am I doing wrong ? Warning: Unable to create '/www/workbox/htdocs/audio': Is a directory in /www/workbox/htdocs/upload.php on line 4 Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -- 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] upload file
Hello I need to do upload a file, I have problem with instruction copy(?,?); When it copy the file, just copy to tmp, and it change the name. Marisol Daz E. -- 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]
RE: [PHP] upload file
Check out : http://www.weberdev.com/index.php3?GoTo=ViewArticle.php3?ArticleID=2 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 10, 2001 6:21 PM To: PHP General Subject: [PHP] upload file Hello I need to do upload a file, I have problem with instruction copy(?,?); When it copy the file, just copy to tmp, and it change the name. Marisol Daz E. -- 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]