Jump to content

php file upload (limit)


westman

Recommended Posts

phpinfo never shows nothing, you're not doing something right. Create a new file, put that line of code in it, upload it to your server, and open it in a browser. GoDaddy might have that function disabled, but I doubt it. You can also use ini_get to check a setting, e.g.: echo ini_get('post_max_size');

Link to comment
Share on other sites

where did you change them? you need to change the php.ini file which php is loading. check in that php.ini list what does the location shows in "loaded configuration file" ? that is the file you should edit.

Link to comment
Share on other sites

i successfully uploaded a AVI. file 169MB in sizei changed php.ini to php5.iniand the limit and uploading are working fine ;) last question:i can play all my videos okthe last video i uploaded was the AVI. 169MB videoand i don't know why, it is running on the same script as all the over videos.i was thinking that the problem could be from converting the video from AVI. to MP4. throw the upload am i right?

Link to comment
Share on other sites

sorry the last video i uploaded was the AVI. 169MB video will not play i get... Video not found or access denied: video/8/myvid.mp4 as a error message i was thinking that the problem could be from converting the video from AVI. to MP4. throw the upload am i right?

Link to comment
Share on other sites

throw the upload script...

	 	else if (!preg_match("/\.(avi|mp4|wmv|mov|flv|swf)$/i", $_FILES['video_upload']['name'] ) ) {			$errorMsg_upload = "Your Video was not .avi, .mp4, .wmv, .mov, .flv or .swf and it must be one of those 6 formats, please try again";			unlink($_FILES['video_upload']['tmp_name']);	} else {		$find_fileinfo_video = mysql_query("SELECT * FROM nothere ORDER BY id DESC LIMIT 1") or die (mysql_error());	$find_fileinfo_video_check = mysql_num_rows($find_fileinfo_video);	if ($find_fileinfo_video_check == 0){	$vid_file_id = "1";	}else{	while ($row = mysql_fetch_array($find_fileinfo_video)) {	$vid_file_id = $row["id"];	}	$vid_file_id++;	}		mkdir("video/$vid_file_id", 0755);	$newname1 = "myvid.mp4";		if (move_uploaded_file($_FILES['video_upload']['tmp_name'], "hdvideo/$vid_file_id/".$newname1)) {

Link to comment
Share on other sites

Renaming just the extension wont convert the file to avi to mp4

Link to comment
Share on other sites

are you sure you are requesting the correct file? confirm the path even the file name with extension. If path is correct and browser have correct plugin installed to play avi file it should have play it.

Link to comment
Share on other sites

i am using the right path. The info i show from my script in this forum, i edit become its personal this is my video play page...

 <div id="mediaplayer"></div> 		<script type="text/javascript">	  jwplayer(\'mediaplayer\').setup({		\'flashplayer\': \'video/0/player.swf\',		\'id\': \'playerID\',		\'width\': \'800\',		\'height\': \'500\',		\'file\': \'hdvideo/' . $play_num_video . '/myvid.mp4\',		\'image\': \'hdvideo/' . $play_num_video_image . '\',	\'skin\': \'video/0/glow/glow.zip\',			\'plugins\': {		   \'sharing-3\': {			   \'link\': \'http://mysite/video/?page=video\',			   \'code\': \'<embed src="http://mysite/video/' . $play_num_video . '/myvid.mp4" width="480" height="270" allowfullscreen="true" />\'		   },			}	  });	</script>

my script is dynamic and will play 1,000's of diffident videos by changing $play_num_video i can not see a problem with it however i do not know why my 169MB AVI. will not play any help?

Link to comment
Share on other sites

I don't see the point of changing the name of anything, why change it at all? You want the browser to know what type of files it is so that it can play it, right? So why change it? If the browser can't play the file, changing the name isn't going to fix that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...