All pastes #243630 Raw Edit

Someone

public php v1 · immutable
·published 2006-11-08 18:58 UTC
rendered paste body
<b>Warning</b>:  move_uploaded_file(Resource id #9) [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: failed to open stream: Permission denied in <b>/export/application/unsubscribe_ivr_brent/ivr.class.php</b> on line <b>149</b><br />index.php==================require_once "ivr.class.php";require_once "config.php";// Create the new object$ivr = new IVR;if (isset($_FILES['voice_message']) && $_POST['request_type'] == "callback")	{	$temp_file_name = $_FILES['voice_message']['tmp_name'];	$save_voice = $ivr->save_voice($temp_file_name);}ivr.class.php==========================function save_voice($temp_file_name)	{				$yeardir = $GLOBALS['C_MESSAGE_LOCATION'].date("Y");		$monthdir = $yeardir."/".date("m");		$daydir = $monthdir."/".date("d");				// Create non exsistant directories to save file too		if (!file_exists($yeardir)) {			// Create the Year Directory			$oldumask = umask(0);			if ($GLOBALS['C_DEBUG_STATUS'] == "ON"){$this->create_log('e106', "Creating Directory".$yeardir);}						mkdir($yeardir, 0777);			umask($oldumask);		  }		 if (!file_exists($monthdir)) {		 	// Create the month directory			$oldumask = umask(0);			if ($GLOBALS['C_DEBUG_STATUS'] == "ON"){$this->create_log('e106', "Creating Directory".$monthdir);}			mkdir($monthdir, 0777);			umask($oldumask);		   }		 if (!file_exists($daydir)) {		 	// Create the day directory			$oldumask = umask(0);			if ($GLOBALS['C_DEBUG_STATUS'] == "ON"){$this->create_log('e106', "Creating Directory".$daydir);}			mkdir($daydir, 0777);			umask($oldumask);		   }                // Move the file from the temp location to the created directory above		if(isset($temp_file_name))		{     		$newfile = fopen($daydir."/".$this->get_country_code($this->msisdn, $GLOBALS['C_COUNTRY_CODE']).".".$GLOBALS['C_FILE_NAME_FORMAT'], "wb");			move_uploaded_file($temp_file_name, $newfile);			$this->create_log('s100', '');			$this->create_voice('vs101', '');		}		else		{			$this->create_log('e101', '');			if ($GLOBALS['C_DEBUG_STATUS'] == "ON"){$this->create_voice('ve101', '');}else{$this->create_voice('ve106', '');}		}	}