Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorkatun
     
    Hello again!

    I've built a little akelos app. Now i would install it on a new server with the akelos installer. Like the Editam CMS. But, how can i do that? Is there a generator?
    •  
      CommentAuthorbermi
     

    The simplest way for doing this is by placing a copy of Akelos on the new server, copy your local application to the server, and edit your application config/config.php file, change AK_FRAMEWORK_DIR so it points to the path where you placed the framework, and edit your DB connection details. You might also need to edit your .htaccess file to remove RewriteBase rules that you might not need on the new location. If the server runs as a different user, you might need to CHMOD the application files or set an FTP account for file modifications ($ftp_settings = 'ftp://username:password@example.com/path/to_your/base/dir'; on your config.php).

    You should only make accessible ./public to on your web server using a soft link or modifying you webserver configuration.

    Editam uses a custom dispatcher and makes use of Akelos configurable paths. Have a look into Editam's config/environments/* files.

    If you want to distribute your application there is no better layout for that than the provided by Editam, but that requires more work.

    • CommentAuthorkatun
     

    hi bermi, can you describe the "editam way" a little bit more? I've taken a look to editam's files. but its a bit difficult to figure it out how it works when the project is unknown.

    greets

    •  
      CommentAuthorOliver
     

    I am stuck after moving my app to a new (external) server. I hope someone can help me (bermi?):

    My local setup was like this:

    /www
      /public_html
      /akelos
      /myproject
        /app
        /config
        /(...)
        /public
        /(...)
    

    On the new server, the structure looks like this:

    /www
      /framework
        /akelos
      /myproject
        /app
        /config
        /(...)
        /public
        /(...)
    

    As descibe by bermi, I did...

    • placing a copy of Akelos on the new server
    • copy your local application to the server, and
    • edit your application config/config.php file,
    • change AK_FRAMEWORK_DIR so it points to the path where you placed the framework, and
    • edit your DB connection details

    When I connect to http://www.externalhost.com/myproject/public/ I see the page without any errors.
    However, it doesn't load any stylesheets or images (so speaking of any ressources inside /public).

    Do I might need to change something also inside the /myproject/public/.htaccess file? (I have no RewriteBase set at the moment) A problem might be, that I can access the external webserver only via FTP - so I cannot create any symlinks or aliases...

    I'd really appreciate your help!
    Oliver

    •  
      CommentAuthorbermi
     

    Hi Oliver,

    You need to define in your environment config

    define('AK_ASSET_URL_PREFIX', '/myproject/public/');
    

    All the assets with tags generated by Akelos helpers will prefix the base path to the right location.

    For "hard-coded" paths - like those on css images - you'll have to set the base tag on your layout head

    <base href="http://www.externalhost.com/myproject/public/" />
    

    Regarding RewriteBase, mod_rewrite rules might not work if you don't set it in your .htaccess files

    BTW, you might create symlinks if you chmod via ftp and then use a PHP based shell http://pastebin.com/f48763b8f

    Hope it helps :)

    •  
      CommentAuthorOliver
     

    You need to define in your environment config

    define('AK_ASSET_URL_PREFIX', '/myproject/public/');

    Thank you, bermi, this did the job!

    Btw.: thanks for the hint with FTP & PHP shells - that's actually quite a good "workaround" :)