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.

Archive /

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

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

no _config.php PLZ HELP


Go to End
Reply


9 Posts   3016 Views

Avatar
hellajustin

Community Member, 3 Posts

5 June 2008 at 12:01pm

I'm sure this isn't the first time you have heard this but in downloaded silverstripe and i don't have a _config.php file and i get the error when i try to installl

Warning: $project isn't set in /home/nvcheer/public_html/sapphire/core/ManifestBuilder.php on line 154

Fatal error: DB::connect: Not passed a valid database config in /home/nvcheer/public_html/sapphire/core/model/DB.php on line 53

Avatar
Willr

Forum Moderator, 5513 Posts

5 June 2008 at 1:14pm

If theres no _config.php file thats a bit strange. What version are you downloading - via svn? or tar.gz. Your config.php should look like - at the barest. You can also chop out the $databaseConfig array is you use Environment Management - http://doc.silverstripe.com/doku.php?id=environment-management

<?php

global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
   "type" => "MySQLDatabase",
   "server" => "localhost",
   "username" => "",
   "password" => "",
   "database" => "",
);
Director::set_dev_servers(array(
   'localhost',
   '127.0.0.1',
   'localhost:8888',
));
SSViewer::set_theme('blackcandy');

?>

Avatar
hellajustin

Community Member, 3 Posts

5 June 2008 at 2:56pm

Edited: 05/06/2008 3:04pm

now i get this
Warning: $project isn't set in /home/nvcheer/public_html/sapphire/core/ManifestBuilder.php on line 154

Fatal error: DB::connect: Not passed a valid database config in /home/nvcheer/public_html/sapphire/core/model/DB.php on line 53

could it be something to do with my host

Avatar
Willr

Forum Moderator, 5513 Posts

5 June 2008 at 2:59pm

dumb question but you did fill out your db details in that databaseConfig array right?

Avatar
hellajustin

Community Member, 3 Posts

5 June 2008 at 3:29pm

um i didn't but now i did
it goes is should be at /mysite right
could it be something with my host but that would be weird becuase if have gotten it to work before
here i uploaded the tar to www.nvcheer.x10hosting.com/ss.zip
(its original i just renamed it and made into a zip accidently after re-compression)

Avatar
Willr

Forum Moderator, 5513 Posts

5 June 2008 at 3:35pm

Yeah that code is Posted is for the mysite/_config.php file you need to fill out the username, password etc to the database. Thats what the error is. Once you fill out the db hopefully you shouldnt have any more errors.

Avatar
mh

Community Member, 1 Post

17 June 2008 at 10:26am

Edited: 17/06/2008 10:26am

I get this EVERYTIME I try to install.
Something is happening with permissions. I am have root and I can't even install as that.
I've tried suexec on and off, and no combination of permissions seems to work. I've not had the problem with anything else... just this.

I've not had a single sucessfull install, it appears that the bit before hand doesn't indicate every requirement or something. Looks like back to ModX.

Avatar
Willr

Forum Moderator, 5513 Posts

17 June 2008 at 10:40am

You get this every time?

Warning: $project isn't set in /home/nvcheer/public_html/sapphire/core/ManifestBuilder.php on line 154
Fatal error: DB::connect: Not passed a valid database config in /home/nvcheer/public_html/sapphire/core/model/DB.php on line ..

If you are using the installer then it is probably not creating the _config file correctly. You can do it manually if you need by creating a _config.php file in the mysite/ directory with the something like http://pastie.org/216156 - enter your own DB details..

Go to Top