I am quite new to php and apache. My root folder is C:\xampp\htdocs and my php and javascripts are located in C:\xampp\htdocs\CF However I need to access my movie collection at the following paths: F:\Movies – 2 and also at E:\Movies (these are external hard drives). I did some reading and learned that I could use alias in the httpd.conf folder to get access to these folders (I have too many of them to copy them all to the root directory) So now the httpd.conf folder looks like this:
ServerName localhost:80
Alias /Movies2 "F:\Movies - 2"
Alias /Movies "E:\Movies"
DocumentRoot "C:/xampp/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory />
Options +Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
I probably did not set this up correctly because all of the directions I was able to find assumed that the reader was not a complete noob 🙂
At any rate I am able to access pictures in the alias folders, but the corresponding movies would not play. For example, the following image element would display correctly:
<img src="../Movies2/127 Hours (2010)/folder.jpg" />
However, the following movie would not play:
<OBJECT ID="MediaPlayer" WIDTH="712" HEIGHT="428" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="127 Hours (2010).avi">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="../Movies2/127 Hours (2010)/127 Hours (2010).avi" NAME="MediaPlayer"
WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
When I right click on the embedded media player and select properties its shows:
“http://localhost/CF/127 Hours (2010).avi”
However, when I select the properties of the image it shows:
“http://localhost/Movies2/127%20Hours%20(2010)/folder.jpg”
So to be clear how do I get the movie to play in my embedded media player?
Is the video path incorrect ?
In your codes provided, you didn’t mention the CF folder.
This piece of code is old & does not handle cross-browser issues. Try new library such as VideoJS, they will handle cross-browser issues for you too.
Also, it is advised NOT to use space for files that puts on web server. consider to user underscore ( “_” ) instead.