[PHP] Upload files problem with IIS server

2006-08-04 Thread Mace Eliason

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 . br;  /* added for testing */
 echo $uploadDir . br; /* added for testing */
 echo $uploadFile . br; /* 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 problem with IIS server

2006-08-04 Thread chris smith

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 . br;  /* added for testing */
  echo $uploadDir . br; /* added for testing */
  echo $uploadFile . br; /* 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) . br/;

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