View Full Version : swf files don't work on php page
05-14-2009, 10:36 PM
I have a problem with the swf files that i want to put on my php parts of the page. In plain html i embed the code generated by Flash and it works fine. When i try to do the same in php, the swf files won't load. I made the swf files in CS4 and they are basicly flv videos with a loop function. i publish them for flash player 9, and the box for protect from import is not ticked. Later i put the AC_RunActiveContent.js in the header part and the code for object/embed into the part of the site that i want the swf file to play but it doesn't play. I put all the files in the same folder with the index.php file, i try to move them around in the root folder, but no luck, i try to put them in all folders, nothing happens. I tried with absoulte and relative paths, nothing. I tried to embed swf files with swfobject, and a couple of widgets from wordpress (one part of the site is a wordpress blog) but nothing happens. I'm running out of solutions, can you advise me anyhow?? don't know what to look for on google, i've tried everything in the last 3 days! I know i'm missing out something for what i'm gonna kick myself in the head, but i can't find out what it is now!! Please help:confused::confused:
05-15-2009, 04:54 AM
Post your php code. Its likely a problem with not escaping quotes properly. A link to your page would help too. Help us help you.
05-16-2009, 09:35 PM
thats the part of the page in php (wordpress blog) that i have put today for example. The swf video file should be in the right bottom corner, located in the sidebar. Please can you inspect the code?
I have tried 4 different widgets for embedding the swf file, nothing works. in this example i have tried to embed it with the original Flash code, but nothing. I am wondering is there a difference in publishing swf files for html and php pages??? because in html it works fine, on localhost and on server!
_Aerospace_Eng_ thanx for the time
05-18-2009, 02:23 AM
What is blog.swf supposed to do? I navigated to the file directly and doesn't seem to do anything although it seems to "run".
05-18-2009, 02:57 PM
it's a flv video, it should play in a loop..
05-19-2009, 09:46 AM
it's a flv video, it should play in a loop..
What is the url to the flv file? I think its location is relative to the html page the swf file is on and not relative to where the swf file is located on your server. Are you sure you uploaded the flv file?
Can you post your fla file?
05-19-2009, 10:22 PM
I've been googling for the past two days and it seems that it could be a problem with the server settings. I have a windows hosting package at godaddy, and they don't have the MIME type set for .flv files. Now i'm having problems with setting up the MIME type because they don't give you controls over the IIE 7 but instead i have to put the .htaccess file in the root directory, which i did, but it still doesn't work. And since their support is sh*t, it takes me forever to get something out of them (they don't have chat or something real time, but you have to mail them and wait for 24 hours.. and calling them is out of the question since i live in croatia, europe).
and about your post: i have put the flv, fla, swf and html files in the root directory (www.hrvojemesec.com/blog.flv), in the blog directory (www.hrvojemesec.com/blog/blog.flv) and in the blog theme directory (www.hrvojemesec.com/blog/wp-content/themes/default/blog.flv) and i have done the same with the .htaccess file. i don't have any solutions to google for.. do you think could it be the way i made the original flv files, some settings that could be wrong???? as i said, the swf videos play locally (only in html, on my wordpress part they won't play on localhost either) but when i put the html, swf, flv files and everything else with it on the server, the flv doesn't play/load.
05-19-2009, 10:32 PM
htaccess doesn't work on windows. You need to go into your control panel and add the mimetype there.
Contact your host and ask them if they can add the mimetype you need. They could say no in fear of bandwidth issues.
05-20-2009, 11:47 AM
okey, i finally got an answer from them that makes sense, and that is: the hosting package i chose doesn't support video streaming:(((
and earlier they said that i should configure the mime type myself with a web.config file..
05-20-2009, 04:01 PM
You could try following the advice here
The mime type for flv is video/x-flv
You could also try the tip here if you are able to
05-21-2009, 11:14 AM
i've tried adding the web.config file to server but then i get this error and the page won't display:
The page cannot be displayed because an internal server error has occurred.
I don't know anymore, i have to resolve this with my server provider, thanx man for the help!