Jump to:

3434 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » Cannot rebuild database after adding new page type

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

Page: 1 2
Go to End
Author Topic: 3839 Views
  • CMSPlayer
    Avatar
    Community Member
    25 Posts

    Cannot rebuild database after adding new page type Link to this post

    Hi there,

    I went through the online tutorial and I tried to follow the steps on creating your own page type.

    I encountered the instructions that require me to run this url link.

    http://localhost/dev/build?flush=1

    to rebuild my database.

    But on my own local machine's environment, my SilverStripe web access setup is

    http://localhost:8080/SilverStripe/index.php/home-page/

    Thus I thought my database rebuild link would be as follows.

    http://localhost:8080/SilverStripe/sapphire/dev/build?flush=all

    I tried that and I encountered a 404 error page. Could somebody please tell me what should I do to resolve this issue?

    Thanks

  • novaweb
    Avatar
    Community Member
    111 Posts

    Re: Cannot rebuild database after adding new page type Link to this post

    Hey,

    If you have index.php showing it means your search engine friendly URLs aren't working.

    You need to check mod_rewrite is enabled in your PHP config. ( Google phpinfo() )

    Then you need to check your .htaccess file is appropriately configured.

    Once you have overcome these issues, you will then be able to run dev/build

    See http://doc.silverstripe.org/sapphire/en/installation/server-requirements for more.

    Cheers,
    Josh

  • CMSPlayer
    Avatar
    Community Member
    25 Posts

    Re: Cannot rebuild database after adding new page type Link to this post

    Hi novaweb,

    Thanks for coming back so quickly on this.

    I checked the settings as per your suggestion. They're all fine except for the htaccess file part.

    I forgot to mention that I'm using MS Windows XP 3 environment (not linux) as my main development work. Right now, I still could not overcome these issues.

    I followed the installation link - it recommended I should use WAMPServer software that comes with all the preconfigured Apache, MySQL, PHP packages with their latest versions.

    However, I've already installed these independently and they come with different software version numbers. ie PHP 5.2 instead of 5.3, Apache 2.0 instead of 2.2.1 and MySQL5.5.

    Do I really need WAMPServer's software bundle to make silverstripe work? Surely the ones I installed previously would be fine to use...

  • novaweb
    Avatar
    Community Member
    111 Posts

    Re: Cannot rebuild database after adding new page type Link to this post

    Hey Player,

    I would definitely use WAMP, this will solve your issues

    Cheers,
    Josh

  • CMSPlayer
    Avatar
    Community Member
    25 Posts

    Re: Cannot rebuild database after adding new page type Link to this post

    Hi Josh,

    Okay. I followed your advice. ie I reinstalled Silverstripe along with the complete installation of WAMP.

    And tried running this url.

    http://localhost/dev/build?flush=1.

    Still comes up saying 404 error encountered.

    The requested URL /dev/build was not found on this server.

    And I followed this instruction. http://doc.silverstripe.org/sapphire/en/installation/windows-wamp

    Towards the last step, my silverstripe access would be

    http://localhost/silverstripe.

    If that's the case, shouldn't my rebuild link would be http://localhost/silverstripe/dev/build?flush=1 ?

    I tried the latter and it said

    "This page is secured and you need administrator rights to access it. Enter your credentials below and we will send you right along.

    You're logged in as Default Admin."

    Does that mean this page no longer exist again?

  • CMSPlayer
    Avatar
    Community Member
    25 Posts

    Re: Cannot rebuild database after adding new page type Link to this post

    Never mind. I fixed it.

    Apparently, my WAMP reinstallation wasn't done properly as I had two mysql instances running on the same machine, thus cause the confusion, which prevented the database rebuild function call from being executed properly.

    Thanks again!

  • Aubz
    Avatar
    Community Member
    3 Posts

    Re: Cannot rebuild database after adding new page type Link to this post

    Guys just type http://localhost/yourhostname/index.php/dev/build into your browser where yourhostname is the directory in htdocs or www (if using WAMP) where silverstripe is installed.

  • suganya
    Avatar
    Community Member
    9 Posts

    Re: Cannot rebuild database after adding new page type Link to this post

    hi,

    Getting the following error while accessing "http://localhost:8080/rtbi/v1/db/build?flush=1"

    Not Found

    The requested URL /rtbi/v1/db/build was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    3839 Views
Page: 1 2
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.