PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 18, 2022

[FIXED] phpMyAdmin video not displaying

 February 18, 2022     html, mamp, php, phpmyadmin, sql     No comments   

Issue

-Thanks for all the help folks. turns out it was indeed my own stupidity. Table column on local db was called 'url', on web-host it was 'urls'. Apologies for wasting everyone's time!

I'm trying to make a webpage display some videos, the paths to which are in a database.

The following piece of code works fine on the Localhost (I'm using MAMP) but when I upload it to the web-server, it displays the names of the videos OK but I get "No video with supported format and MIME type found." in Firefox. Chrome and Safari both stall while loading.

$result=mysql_query("SELECT * FROM videos");

while($row = mysql_fetch_array($result))
{
echo "<video width=\"600\" height=\"350\" controls=\"controls\">";
echo "<source src='".$row['url'].".mp4' type='video/mp4'/>";
echo "<source src='".$row['url'].".theora.ogv' type='video/ogg'/>";
echo "</video>";
echo "<br>" . $row['name'] ."<br/><br/>";
}

I guess it might be something obvious but I'm stumped.

Any help much appreciated.

thanks, Robert.


Solution

Can you verify the video is in the database(name is one thing, is the file actually there?)? If using upload form, it is necessary to use enctype="multipart/form-data". I assume the videos are the format you are trying to request them as.

In your post you say "but when I upload it to the web-server", so the problem IS with the upload then, not the displaying of the videos? You seem to be saying you have a problem with the upload, but your code is the code retrieving it from the database.

So is the problem with the upload, or the display firstly.



Answered By - Base Desire
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing