Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » no _config.php PLZ HELP

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

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

Page: 1 2
Go to End
Author Topic: 2929 Views
  • hellajustin
    Avatar
    Community Member
    3 Posts

    no _config.php PLZ HELP Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: no _config.php PLZ HELP Link to this post

    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');

    ?>

  • hellajustin
    Avatar
    Community Member
    3 Posts

    Re: no _config.php PLZ HELP Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: no _config.php PLZ HELP Link to this post

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

  • hellajustin
    Avatar
    Community Member
    3 Posts

    Re: no _config.php PLZ HELP Link to this post

    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)

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: no _config.php PLZ HELP Link to this post

    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.

  • mh
    Avatar
    Community Member
    1 Post

    Re: no _config.php PLZ HELP Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: no _config.php PLZ HELP Link to this post

    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..

    2929 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.