Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Running ~/db/build on web server

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1717 Views
  • deadalus.ai
    Avatar
    Community Member
    3 Posts

    Running ~/db/build on web server Link to this post

    Hi. I've installed silverstripe on my live webserver (located in the UK). Silverstripe is up and running OK, but I am unable to rebuild the database after adding a new field to the StaticPage type.

    I've successfully added the page on my local test server, and am able to rebuild the database to reflect it by visiting "~/db/build?flush=1".

    However, on the webserver the "~/db" URL is reserved for the phpMyAdmin mysql administration program which is part of my web package, and attempting to visit "~/db/build" results in a 404 error.

    How do I access the tools which would otherwise be exposed at that URL?

    Cheers for any help!

    p.s. I have successfully added some of the requisite database fields to the StaticPage tables, in as such that manipulating the database directly shows results when visiting the page (hows the data), and editing the page using the CMS backend will report "success", but the data will not show up. Obviously I'm missing a field or setting somewhere, so it's better to leave it to the automated tool.

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Running ~/db/build on web server Link to this post

    How do I access the tools which would otherwise be exposed at that URL?

    There is a way to run commands which are available at /db /dev etc by using command line, terminal input and using SilverStripes sake - http://doc.silverstripe.com/doku.php?id=private:sake this is coming in a upcoming release.

    How has the host setup /db/ to point to phpMyadmin? If its a .htaccess rule could you rewrite it?

  • deadalus.ai
    Avatar
    Community Member
    3 Posts

    Re: Running ~/db/build on web server Link to this post

    I do not have access to hidden files or much in the way of admin privelages at all. unfortunately I do not have command line access either. The webspace is part of a webfarm, and all webspace management is done using a VHCS Client.

    Requests to /db are automatically redirected to phpMyAdmin, just as /vhcs2/filemanager redirects to a web-based file manager.

    I'll try to hit up the server administrator to see if he/she can alter the settings for me, but in the meantime is there a way to alter what requests will be mapped to the database tools? (i.e. source changes).

    Cheers.

  • simon_w
    Avatar
    Forum Moderator
    473 Posts

    Re: Running ~/db/build on web server Link to this post

    In mysite/_config.php, you could add something like:

    Director::addRules(100, array(
       'ssdb/$Action' => 'DatabaseAdmin',
    ));

    which would allow you to call ssdb/build?flush=1

  • deadalus.ai
    Avatar
    Community Member
    3 Posts

    Re: Running ~/db/build on web server Link to this post

    Thanks for the reply. Your suggestion was just the thing I was looking for, and worked a treat.

    Cheers!

    1717 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.