Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Running ~/db/build on web server


Go to End


5 Posts   2162 Views

Avatar
deadalus.ai

Community Member, 3 Posts

6 July 2008 at 8:38pm

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.

Avatar
Willr

Forum Moderator, 5523 Posts

6 July 2008 at 10:08pm

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?

Avatar
deadalus.ai

Community Member, 3 Posts

6 July 2008 at 11:20pm

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.

Avatar
(deleted)

Community Member, 473 Posts

7 July 2008 at 7:28am

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

Avatar
deadalus.ai

Community Member, 3 Posts

7 July 2008 at 9:03pm

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

Cheers!