Skip to main content
Participant
August 3, 2007
Question

Persistent Shared Object not being persistent

  • August 3, 2007
  • 3 replies
  • 726 views
hi


my fms app maintains a persistent shared object to keep track of daily highscores, however whenever the app is reloaded or restarted all the data from the shared object is lost.

This is my SSAS:
this.todaysbest_so = SharedObject.get("todaysbest", true);

it seems like it should be so simple to implement, I can't see where it could be going wrong.

I've matched the persistence parameter when the client gets the remote object too:
this.todaysscores = SharedObject.getRemote("todaysbest", comms.uri, true);

any tips/ideas?

Thanks
    This topic has been closed for replies.

    3 replies

    Milks808Author
    Participant
    August 6, 2007
    server chap fixed it in no time

    as JayCharles suggested earlier FMS was accessing the folder as one user, however the owner of that folder was set to another user

    changing the owner of the folder to that of the user used by FMS solved the problem (though being a stranger to linux I couldn't tell you the exact steps to do this)

    hope this helps
    Known Participant
    August 3, 2007
    I am having a similar problem. I created an app that works like a champ on Flash Media Server, running on a Windows 2000 platform. But when I run the same app on a Linux platform, neither a new instance nor the shared object is saved.

    Here is the code I'm using. Like I said. Works on Windows 2000; not on Linux.

    var nc:NetConnection = new NetConnection();
    nc.connect("rtmp://localhost/appname/appinstance");
    var my_so:Object = new Object();
    nc.onStatus = function(info) {
    trace(info.code);
    my_so = SharedObject.getRemote("cuz", nc.uri, true);
    my_so.connect(nc);
    };
    /// I enter a string in an input field and send it to a data slot for my_so.
    input_txt.onChanged = function() {
    my_so.data.myinfo = input_txt.text;
    };
    /// the onKillFocus event makes sure the information is saved.
    input_txt.onKillFocus = function() {
    my_so.data.myinfo.flush();
    /// the output text shows the information I entered into input_txt.
    output_txt.text = my_so.data.myinfo;
    };

    Like I said, it works in Windows... but not on Linux. Could anyone give me some advice?

    Glen Gummess
    Instructional Designer
    University of St. Francis
    Joliet, IL
    Milks808Author
    Participant
    August 6, 2007
    I'm running linux here and it seems having done some further reading, this could be the source if the issue, and quite possibly read/write permissions.

    I get:
    Failed to open shared object file (/so path) for write.
    traced in the fms console window, I'll have a word with our server chap when he gets out of a meeting and see what he says
    Known Participant
    August 6, 2007
    My friend, your experience in getting this message: "Failed to open shared object file (/so path) for write." is the same thing I am experiencing. I very much look forward to the outcome of your meeting with the "server chap"!

    Thanks,

    Glen
    August 3, 2007
    Are you also having problems recording streams? I'm wondering if the user FMS is running under doesn't have permission to write to the /applications directory.