Re: [PHP] php upload files
On Wed, May 23, 2007 6:07 am, kats Ant wrote: > Hi all a i am running a windows 2003 server with IIS. I have created a > php script that uploads a file to a server. > > in the server i have users and a user1 has permission to folder1, > user2 has permissions to folder2. I want an administrator to run the > script and upload a file to these foldes. how can the script access > the folders that only various users have access? Assuming 'administrator' is more or less like 'root', you could use http://php.net/move_uploaded_file in the upload script to dump the files into some staging directory, and record the meta-data about which file belongs to whom and goes where in, say, a database. You could then have a cron job ^H^H^H^H^H^H^H^H Scheduled Task run by 'administrator' to check the DB and shuffle files around and change their permissions as needed. -- 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] Re: php upload files
As far as I remember, IIS used to have a reserved user that it ran all its actions under. All you have to do is to give this user the necessary permissions (I remember the username started with I). Here's a link that might help : http://support.microsoft.com/kb/812614 -- itoctopus - http://www.itoctopus.com "kats Ant" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi all a i am running a windows 2003 server with IIS. I have created a php script that uploads a file to a server. in the server i have users and a user1 has permission to folder1, user2 has permissions to folder2. I want an administrator to run the script and upload a file to these foldes. how can the script access the folders that only various users have access? _ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php upload files
Hi all a i am running a windows 2003 server with IIS. I have created a php script that uploads a file to a server. in the server i have users and a user1 has permission to folder1, user2 has permissions to folder2. I want an administrator to run the script and upload a file to these foldes. how can the script access the folders that only various users have access? _ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
Re: [PHP] Upload files problem with IIS server
On 8/5/06, Mace Eliason <[EMAIL PROTECTED]> wrote: Hi, I am having problems with uploading files to a windows server using php. I have used the same script on other server with no problems. From what I can tell this new server is running windows with IIS. I think the problem is with the path. Does anyone have any suggestions? Here is a snipet of some of the code. $uploadDir = "/gamestats/"; $uploadFile = $uploadDir . $_FILES['bannerfile']['name']; echo $bannerfile . ""; /* added for testing */ echo $uploadDir . ""; /* added for testing */ echo $uploadFile . ""; /* added for testing */ if (move_uploaded_file($_FILES['bannerfile']['tmp_name'], $uploadFile)) { .. and the errors you get are... ? check the folder is writable: echo "is_writable: " . is_writable($uploadDir) . ""; Is that the whole code? I doubt this would work on linux platforms either because your script will not be able to create /gamestats (ie in the / folder, not in your /home/httpd/domain.com folder or where-ever it is). IIS needs the destination folder marked with 'modify' permissions in IIS so you can create and delete files, maybe that's the problem. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload files problem with IIS server
Hi, I am having problems with uploading files to a windows server using php. I have used the same script on other server with no problems. From what I can tell this new server is running windows with IIS. I think the problem is with the path. Does anyone have any suggestions? Here is a snipet of some of the code. $uploadDir = "/gamestats/"; $uploadFile = $uploadDir . $_FILES['bannerfile']['name']; echo $bannerfile . ""; /* added for testing */ echo $uploadDir . ""; /* added for testing */ echo $uploadFile . ""; /* added for testing */ if (move_uploaded_file($_FILES['bannerfile']['tmp_name'], $uploadFile)) { .. I have also ran $_SERVER["PATH_TRANSLATED"] to see what the path is and used it but that didn't help either. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload files problems
On 5/27/06, Ing. Tomás Liendo <[EMAIL PROTECTED]> wrote: My host uses safe mode... What other thing can I do? Some other method exists to send files besides POST method? ftp? You haven't solved your problem which actually has nothing to do with file uploading (460k is nothing and should upload very quickly). We haven't seen enough code to work out your actual problem. Track down where all of your time is going by using the 'time()' function and go from there. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload files problems
My host uses safe mode... What other thing can I do? Some other method exists to send files besides POST method? Thank you, Tom. "Ryan Creaser" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Ing. Tomás Liendo wrote: > >>Hi! >>When the users of my system try to go up files of more than 460 K, they >>receive the message: >>Fatal error: Maximum execution time of 90 seconds exceeded in >>c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php >>on line 2 >> >>I'm using the following method to up load the files: >> >>if($archivo_name<>"") >>{ >> $dpath="./archivos_recibidos/".$archivo_name; >> if(move_uploaded_file($archivo, $dpath)) >> {//Se realiza la transmision del archivo al servidor. >> echo "El >> archivo ".$archivo_name.". ha sido transferido >> exitosamente."; >>} >>else >>{ >> echo "> sans-serif>ADVERTENCIA: El arcvhio ".$archivo_name.". no ha podido >> enviarse."; >>} >> >> >>Do I have control on these 90 seconds? or is a parameter of the server? >>What can I do to solve this problem? >> >>Ahead of time thank you very much, >> >>Tom. >> >> > See http://php.net/set_time_limit, although it might not work if your host > uses safe mode. > > - Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload files problems
On 5/25/06, Ryan Creaser <[EMAIL PROTECTED]> wrote: Ing. Tomás Liendo wrote: >Hi! >When the users of my system try to go up files of more than 460 K, they >receive the message: >Fatal error: Maximum execution time of 90 seconds exceeded in >c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php on >line 2 > >I'm using the following method to up load the files: > >if($archivo_name<>"") >{ > $dpath="./archivos_recibidos/".$archivo_name; > if(move_uploaded_file($archivo, $dpath)) > {//Se realiza la transmision del archivo al servidor. > echo "El archivo >".$archivo_name.". ha sido transferido exitosamente."; >} >else >{ > echo "sans-serif>ADVERTENCIA: El arcvhio ".$archivo_name.". no ha podido >enviarse."; >} > > >Do I have control on these 90 seconds? or is a parameter of the server? >What can I do to solve this problem? > >Ahead of time thank you very much, > >Tom. > > > See http://php.net/set_time_limit, although it might not work if your host uses safe mode. In addition to using set_time_limit, you'll probably also need to change the value of the max_input_time option: http://php.net/manual/en/ref.info.php#ini.max-input-time Rabin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload files problems
I believe that those 90 seconds start counting as soon as php starts interpreting the request, ie. after getting the file and form, not when it starts uploading. The second one wouldn't make much sense. On 5/26/06, Rory Browne <[EMAIL PROTECTED]> wrote: It's very hard to read code, when either there is no comments, or the comments are in a language you don't understand. Hablo pocito Espanol, pero no entiendo bastante para entiender que quiere decir. Rory On 5/25/06, Ing. Tomás Liendo <[EMAIL PROTECTED]> wrote: > > Hi! > When the users of my system try to go up files of more than 460 K, they > receive the message: > Fatal error: Maximum execution time of 90 seconds exceeded in > c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php > on > line 2 > > I'm using the following method to up load the files: > > if($archivo_name<>"") > { >$dpath="./archivos_recibidos/".$archivo_name; > if(move_uploaded_file($archivo, $dpath)) > {//Se realiza la transmision del archivo al servidor. > echo "El > archivo > ".$archivo_name.". ha sido transferido exitosamente."; > } > else > { > echo " sans-serif>ADVERTENCIA: El arcvhio ".$archivo_name.". no ha podido > enviarse."; > } > > > Do I have control on these 90 seconds? or is a parameter of the server? > What can I do to solve this problem? > > Ahead of time thank you very much, > > Tom. > > -- > 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 files problems
It's very hard to read code, when either there is no comments, or the comments are in a language you don't understand. Hablo pocito Espanol, pero no entiendo bastante para entiender que quiere decir. Rory On 5/25/06, Ing. Tomás Liendo <[EMAIL PROTECTED]> wrote: Hi! When the users of my system try to go up files of more than 460 K, they receive the message: Fatal error: Maximum execution time of 90 seconds exceeded in c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php on line 2 I'm using the following method to up load the files: if($archivo_name<>"") { $dpath="./archivos_recibidos/".$archivo_name; if(move_uploaded_file($archivo, $dpath)) {//Se realiza la transmision del archivo al servidor. echo "El archivo ".$archivo_name.". ha sido transferido exitosamente."; } else { echo "ADVERTENCIA: El arcvhio ".$archivo_name.". no ha podido enviarse."; } Do I have control on these 90 seconds? or is a parameter of the server? What can I do to solve this problem? Ahead of time thank you very much, Tom. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload files problems
Ing. Tomás Liendo wrote: Hi! When the users of my system try to go up files of more than 460 K, they receive the message: Fatal error: Maximum execution time of 90 seconds exceeded in c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php on line 2 I'm using the following method to up load the files: if($archivo_name<>"") { $dpath="./archivos_recibidos/".$archivo_name; if(move_uploaded_file($archivo, $dpath)) {//Se realiza la transmision del archivo al servidor. echo "El archivo ".$archivo_name.". ha sido transferido exitosamente."; } else { echo "sans-serif>ADVERTENCIA: El arcvhio ".$archivo_name.". no ha podido enviarse."; } Do I have control on these 90 seconds? or is a parameter of the server? What can I do to solve this problem? Ahead of time thank you very much, Tom. See http://php.net/set_time_limit, although it might not work if your host uses safe mode. - Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload files problems
Hi! When the users of my system try to go up files of more than 460 K, they receive the message: Fatal error: Maximum execution time of 90 seconds exceeded in c:\websites\iracbiogenar48\iracbiogen.com.ar\virtual\procesa_msjpriv.php on line 2 I'm using the following method to up load the files: if($archivo_name<>"") { $dpath="./archivos_recibidos/".$archivo_name; if(move_uploaded_file($archivo, $dpath)) {//Se realiza la transmision del archivo al servidor. echo "El archivo ".$archivo_name.". ha sido transferido exitosamente."; } else { echo "ADVERTENCIA: El arcvhio ".$archivo_name.". no ha podido enviarse."; } Do I have control on these 90 seconds? or is a parameter of the server? What can I do to solve this problem? Ahead of time thank you very much, Tom. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload Files
I have a few interpretive questions on uploading files. There is the max_input_time, and the max_execution_time. I am uploading files and they continue to time out after a few minutes. Looking at the php.ini file from phpinfo() shows max_input_time set to -1 and max_execution_time set to 60. Does the max_execution_time have anything to do with the timeout, or is it all in the max_input_time? And does the "-1" value mean run indefinitely (until the file is uploaded)? Is there any function that will change that value? Any clarifications on this would be helpful. Stuart
Re: [PHP] Upload files
hi check the size of file and the post_max_size in phpinfo. you can change the post_max_size in php.ini. Rosen wrote: Hi, I have some problem with uploading files on server with PHP. The upload is ok, but I must set directory permissions with FULL Access - but this is not a good idea :(( Have someone idea how I can do this with no setting permissions to full acess ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload files
Hi, I have some problem with uploading files on server with PHP. The upload is ok, but I must set directory permissions with FULL Access - but this is not a good idea :(( Have someone idea how I can do this with no setting permissions to full acess ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload files and file types
hi there , i was wondering on security of file uploads , i am currently using the pear uploader class , i can check for allowed file extensions , but it doesnt seem to check for file type , i can currently rename say an image to zip and it uploads , is there anyway a hacker could rename an executable to a zip and able to upload it and execute it ? I can't address your specific question but here are a couple of recommendations: -Rename the uploaded file so that the user won't know what it's called on the server. -Store the file outside of the Web directory so it's not accessible via HTTP. Hope that helps, Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload files and file types
hi there , i was wondering on security of file uploads , i am currently using the pear uploader class , i can check for allowed file extensions , but it doesnt seem to check for file type , i can currently rename say an image to zip and it uploads , is there anyway a hacker could rename an executable to a zip and able to upload it and execute it ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload files to MySQL database.
Hi! I am trying to upload files into a MySQL database. The problem is that I cannot upload anything over 1M. It comes up with an error message. Do I need to manually set the values for "post_max_size" and "upload_max_filesize" or are these set to the defaults of 8M and 2M, respectively? Thanks in advance. Renato -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload files
Hello everybody, I want to allow the client to upload a text file on my web server, so I use this code : Uploaded files details ", $HTTP_POST_FILES["userfile"]["name"]); printf("Temporary Name : %s ", $HTTP_POST_FILES["userfile"]["tmp_name"]); printf("Size : %s ", $HTTP_POST_FILES["userfile"]["size"]); printf("Type : %s ", $HTTP_POST_FILES["userfile"]["type"]); if (copy ($HTTP_POST_FILES["userfile"]["tmp_name"],"temp/".$HTTP_POST_FILES["userfile "]["name"])) { printf("File successfully copied");} else{ printf("Error: failed to copy file");} ?> the $http_post_files doesn't return me anything, anybody would have a clue ?? ( roughly speaking I am not able to retrieve the field the client try to send me). Thanks a lot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload files from the local PC/UNIX to the web sever
Hello david, (dk == "david klein") [EMAIL PROTECTED] writes: dk> Hello, Is there a way to upload files from the local PC/UNIX to the web dk> sever? Especially multiple files at the same time? What we need to do at dk> the server and client side? Documents: http://www.php.net/manual/en/html/features.file-upload.html http://www.php.net/manual/en/html/feature-fileupload.multiple.html -Brian -- Caution: Cape does not enable user to fly. -- 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 files from the local PC/UNIX to the web sever
Hello, Is there a way to upload files from the local PC/UNIX to the web sever? Especially multiple files at the same time? What we need to do at the server and client side? Thank you very much in advance. Best Regards, David _ Get your FREE download of MSN Explorer at http://explorer.msn.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]