Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorznirkel
    • CommentTimeAug 31st 2005
     # 1
    Hi,

    The application path on my development server is different from the path on the application server, so I figured to change:

    define("agAPPLICATION_PATH", "/application/path/different/server/");
    into
    define("agAPPLICATION_PATH", getcwd() ."/");

    This worked just fine, browsing and posting on the forum works as it should.
    But changing settings, making sticky, closing a topic or any of those functions, don't get stored. I wonder why this is and how it could be fixed so that I won't have to change the application path for each server?

    I can't imagine anyhting that could cause this.


    Thanks,
    z
    • CommentAuthorjaseone
    • CommentTimeAug 31st 2005
     # 2
    I'm guessing the cwd when the agAPPLICATION_PATH is used in those functions is returning a sub directory, I'd suggest putting in an if block that looks at getcwd and if it contains something unique to the server set it to the server path otherwise set it to the client path. I haven't had enough coffee yet to even write something that simple though!
    •  
      CommentAuthorlech
    • CommentTimeAug 31st 2005
     # 3
    if settings are not getting stored, but the application isn't reporting errors, this could just be a simple slip in permissions on the /appg/settings.php file. perform a chmod 666 on that file along with languages.php and extensions.php and you should be all good.
    • CommentAuthorznirkel
    • CommentTimeAug 31st 2005
     # 4
    jaseone: Yes, I could write a hack, but I don't want to break the original sources too much, and I think the getcwd() thing should just work. I am wondering why it only works partly. I guess I will look a bit deeper into the code and see what's wrong.

    lech: It's not a permission problem. Changing the path to getcwd() breaks it, putting in the actual path fixes everything. By the way, it's not just file changes, also database changes that don't work(like sticky or closed on a topic).
    • CommentAuthorjaseone
    • CommentTimeAug 31st 2005
     # 5
    For example the script that makes a post sticky is /tools/switch.php so I believe getcwd() will return that directory as it is the main script for the request, which is not what the agAPPLICATION_PATH is expecting.
    • CommentAuthorznirkel
    • CommentTimeAug 31st 2005
     # 6
    jaseone: Thank you, just the example I needed.
    So this could be fixed by defining getcwd() earlier, when it is still in the root directory(if it ever gets there when going to switch, I guess not).
    Or by making a function that will always look for the webroot, not the cwd, and then add the directory name of the forum.
    I'll give it a try, thanks.
    •  
      CommentAuthorMark
    • CommentTimeAug 31st 2005
     # 7
    For the record, the next rev has a custom conf directory where you can store install-specific settings. So, you can just not upload that directory when you are uploading from one server to another, and nothing will break.
Add your comments
    Username Password
  • Format comments as