Valerij: CHMOD will nicht gestzt werden.

Beitrag lesen

So nach zwei jähriger Suche habe ich endlich den gesuchten Script gefunden und gekauft. Jetzt habe ich einige Änderungen vorgenommen nur leider funktioniert da etwas nicht an den Chmod.
Das script lädt die Fotos hoch ändert deren Name und setzt die Schreibrechte des Bildes auf 0777 oder 0644. So sollte es normal funktionieren. Tut es aber nicht bzw nicht auf der Webspace sondern nur auf dem lokale Server (XAMPP).
Woran könnte es liegen?
hier der Code

<?php
class fileupload
{
 var $prefix;
 var $uploadpath;
 var $allowedextensions;

var $_FILES;

function fileupload($prefix, $inputfield, $uploadpath)
 {
  $this->prefix = $prefix;
  $this->uploadpath = $uploadpath;
  $this->allowedextensions = array();

$this->_FILES = &$_FILES[$inputfield];
 }

function setallowedextensions()
 {
  $arguments = func_get_args();
  for ($i = 0; $i < func_num_args(); $i++)
  {
   $this->allowedextensions[] = $arguments[$i];
  }
 }

function removeallowedextensions()
 {
  $arguments = func_get_args();
  for ($i = 0; $i < func_num_args(); $i++)
  {
   $this->allowedextensions = array_values(array_diff($this->allowedextensions, array($arguments[$i])));
  }
 }

function unsetallowedextensions()
 {
  unset($this->allowedextensions);
  $this->allowedextensions = array();
 }

function getallowedextensions()
 {
  return implode(", ", $this->allowedextensions);
 }

function getfilename()
 {
  $filename = explode(".", $this->_FILES['name']);

if(count($filename) > 1)
  {
   $filename[count($filename) - 1] = "";
   $filename = implode(".", $filename);
   return strtolower(substr($filename, 0, strlen($filename) - 1));
  }
 }

function getextension()
 {
  $extension = explode(".", $this->_FILES['name']);
  if(count($extension) > 1) return strtolower($extension[count($extension) - 1]);
 }

function getfilesize()
 {
  return $this->_FILES['size'];
 }

function checkfile()
 {
  return ($this->_FILES['tmp_name'] && $this->_FILES['tmp_name'] != "none" ? TRUE : FALSE);
 }

function checkextension()
 {
  return (in_array($this->getextension(), $this->allowedextensions) ? TRUE : FALSE);
 }

function doupload($insert_id)
 {
  $uploadpath = "./".$this->uploadpath."/".$this->prefix.$insert_id.".".$this->getextension();

if(@move_uploaded_file($this->_FILES['tmp_name'], $uploadpath))
  {
   chmod($uploadpath, 0755);
   return TRUE;
  }
  else {
   return FALSE;
  }
 }
}
?>