Friday, June 29, 2012

Re: Undefined index after web host install.

Notice (8): Undefined index:  Upload [APP/Controller/UploadsController.php, line 32]
/app/Controller/UploadsController.php (line 32)
null

This is what I get, when I do the debug, so Im guessing theres no errors with the coding. Where else could the error be. 
It works fine in localhost but once I uploaded it to the online web host I get thrown this error. 

This is my form;
<?php echo $this->Form->create('Upload', array('controller'=>'uploads','action'=>'add','type' => 'file', 'class'=>'uploadfrm'));?>  	<fieldset class='registerf'>   		<legend class='registerf2'>Upload a Video</legend>  	<?php  		echo 'Upload your video content here, there is no size limit however it is <b>.mp4</b> file format only.';  		echo '<br/>';  		echo '<br/>';  		echo $this->Form->input('name', array('between'=>'<br />', 'class'=>'input'));  		echo $this->Form->input('eventname', array('between'=>'<br />', 'class'=>'input'));  		echo $this->Form->input('description', array('between'=>'<br />', 'rows'=> '7', 'cols'=> '60', 'class'=>'input'));  		echo  $this->Form->hidden('userid', array('id' => 'user_id','value' => $auth['id']));  		echo $this->Form->hidden('username', array('id' => 'username', 'value' => $auth['username']));  		echo $this->Form->input('file', array('type' => 'file'));    		echo "<br/>";  	?>  	<?php echo $this->Form->end(__('Upload Video', true));?>  	</fieldset>

Any ideas?

On Thursday, 28 June 2012 22:34:09 UTC+1, Guti Grewal wrote:
Hi I've uploaded my website on a free hosting site called 000webhost, it works fine on localhost but however when I try to upload a file to the server using a form I get thrown this error.

Notice (8): Undefined index:  Upload [APP/Controller/UploadsController.php, line 32]
Code
UploadsController::add() - APP/Controller/UploadsController.php, line 32  ReflectionMethod::invokeArgs() - [internal], line ??  Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 485  Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 103  Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 85  [main] - APP/webroot/index.php, line 96

I can't for the life of me figure out what is going wrong?
I've set the permissions for the webroot/files/uploads folder to 777, so it can't possibly be that. 
Anyone have any ideas?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: