3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2051 Views |
-
Cannot rebuild database after adding new page type

27 March 2012 at 1:09pm
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
-
Re: Cannot rebuild database after adding new page type

27 March 2012 at 2:26pm Last edited: 27 March 2012 2:34pm
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 -
Re: Cannot rebuild database after adding new page type

27 March 2012 at 3:38pm
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...
-
Re: Cannot rebuild database after adding new page type

27 March 2012 at 3:49pm
Hey Player,
I would definitely use WAMP, this will solve your issues
Cheers,
Josh -
Re: Cannot rebuild database after adding new page type

27 March 2012 at 6:11pm
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?
-
Re: Cannot rebuild database after adding new page type

28 March 2012 at 4:49pm
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!
-
Re: Cannot rebuild database after adding new page type

26 October 2012 at 5:53pm
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.
| 2051 Views | ||
|
Page:
1
|
Go to Top |


