I ported my site to a new server and updated SWFTools. I got the following error:

warning: file_get_contents(/sites/all/modules/swftools/shared/swfobject2/swfobject.js) [function.file-get-contents]: failed to open stream: No such file or directory in /home/ringent/public_html/includes/common.inc on line 2359.

I thought it was because I didn't have the SWF tools in the correct directory. But I have swfobject.js in the correct file path in the module folder. Is there any problem with the newer version?

Thanks for any hints.

Jerry

Comments

webdev2’s picture

I am getting the same error now

mcfilms’s picture

I believe I fixed it by changing the permissions of the directory that had the SWFs

webdev2’s picture

for me, there is no directory swfobject2 under:
/sites/all/modules/swftools/shared/

any ideas there?

Stuart Greenfield’s picture

for me, there is no directory swfobject2 under: /sites/all/modules/swftools/shared/

That means that swfobject2 hasn't been set up correctly. You need to download the appropriate js package, create the directory and put the js file there. See the documentation for details about the right locations for the various support files.

As an aside, the module should now use a remotely sourced library if it can't find the package locally - it sounds like that isn't working quite right.

webdev2’s picture

thanks - will do

Stuart Greenfield’s picture

Priority: Critical » Normal
Status: Active » Fixed

No further follow up to last post, so seems this was fixed, or user has no further issue? Setting as fixed as part of issue queue tidy up.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mcfilms’s picture

This recently happened to me AGAIN! But for anyone passing this way that is using SWFobgect2 for their flash detecting needs, here is what fixed it for me THIS time. The downloaded version of swfobject.js had permissions of 644 -- making it virtually "read-only". When I changed that file to 755 (all can execute) it magically stopped erroring out.