S. N
S. N

Reputation: 3949

localhost gives undefined constant

I have configured eclipse PHP developers with Egit and Bitbucket through this, when I run my localhost and when I want to check it out I get this error:

( ! ) Notice: Use of undefined constant FOO - assumed 'FOO' in C:\wamp\www\SWEBSITES\TM\website\config.php on line 24

this is my config.php

<?php   
    $base_config['base_url'] = 'http://localhost/s-cms/';

    $base_config['db_host'] = 'localhost';
    $base_config['db_name'] = 's-cms';
    $base_config['db_user'] = 'root';
    $base_config['db_pass'] = '';

    $base_config['theme']   = 'basic';

    $base_config['allow_5_4'] = false;

    $base_config['salt']            = 'F5:~{`r~/4(]7*hYUctxJ |hz:F^|q:<t.B4S=-_y1DnDQ7rq#~oG& PVq/q? :e';
    $base_config['encryption_key']  = FOO
    //$base_config['session_salt']  = 'b[}XS=/%d^H<E?Ja4o.cT`pGrN2.z|Q*Jlu|Ci|H$v-ToYU}*RM11;<zk/Sp+SLF';
    //$base_config['session_key']       = '%*G;m~6E[X9,G=9]/]8h{ Muoxv%U]&i=0379E]l]/|A|O fD%jbZc3Z{WVD;It3';
?>

Then I changed my config and I tried to define something for FOO so I changed it into this:

$base_config['encryption_key'] = 'FOO';

now when I visit localhost I see :

Failed to connect to database

where could this error be from??

Upvotes: 0

Views: 1088

Answers (1)

Carl0s1z
Carl0s1z

Reputation: 4723

Its about this row $base_config['encryption_key'] = FOO

You need to put it inside quotes (to remove the Notice) and close it with a semicolen (to remove any errors that will come because of not closing it right).

$base_config['encryption_key'] = 'FOO';


Edit after comment:
Add an key instead of FOO,, because FOO is an placeholder (probably from a tutorial). Or leave it empty. $base_config['encryption_key'] = '';

Upvotes: 1

Related Questions