Jump to content
westman

php file upload (limit)

Recommended Posts

ok i put the 1 line of code...<?php phpinfo();in the file...phpinfowhich is located near php.iniand the file is empty, i see nothing. plus in post 50 i am not getting any feed back at all.

Share this post


Link to post
Share on other sites

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');

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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?

Share this post


Link to post
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)) {

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

It won't play because you're telling the browser it's an MP4 file. It's not an MP4, it's an AVI. Change the filename.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

No, ffmpeg is written in C. No one has ported it and all of its dependencies to a language like PHP. It's theoretically possible to do it, but no one has taken the time to port everything.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...