1
audia4
error at the bottom of every page..
  • 2003/10/17 10:12

  • audia4

  • Just popping in

  • Posts: 6

  • Since: 2003/8/4 9


hi, i have this error showing at the bottom of every page of the website..

**

Notice: Use of undefined constant config_value - assumed 'config_value' in d:\home\sharetrader\kernel\session.php on line 126

**

It only shows when i have php debug on of course, so it doesnt show when i have debug off, but i would still like to fix this. WHat could be causing it?

2
blueangel
Re: error at the bottom of every page..
  • 2003/10/17 14:19

  • blueangel

  • Module Developer

  • Posts: 132

  • Since: 2002/2/20


you have not to be worried too much about that message, it is only a warning (notice)

3
audia4
Re: error at the bottom of every page..
  • 2003/10/18 6:32

  • audia4

  • Just popping in

  • Posts: 6

  • Since: 2003/8/4 9


i understand that, but i would still like to fix it, it hasnt always been there, and im sure it doesnt happen to everyone.

maybe someone knows what is causing this?

4
ackbarr
Re: error at the bottom of every page..

well it is not caused by anything in a standard XOOPS release. I did a search for config_value in every release of XOOPS since 2.0.1 and it was not in any file in the /kernel directory.

That being said, sometimes an error such as this is caused by this sloppy coding practice:
$myvar[config_value] = 'some value';

PHP looks at the above line and looks for a constant with the name config_value, if it finds it config_value's defined value is used in its place. If not PHP uses the value 'config_value' and raises the error you outlined in your first post.

If this line were changed to (notice the quotes around config value:
$myvar['config_value'] = 'some value';


However, to figure out why the notice is being raised, we should see the call in its context. Please reply with the
code on line 126 in /kernel/session.php so we can help you further.

5
intel352
Re: error at the bottom of every page..
  • 2004/7/6 17:41

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


the error is likely due to the phpbb port by Koudanshi/BBPixel

here's the code, found 4 times in the session.php file (as of X-PHBB 1.21E)

$time_exp_bb     $sess_exp[config_value] ? ($current_time $sess_exp[config_value]) : ($current_time 3600);
                
$sess_data    $this->db->quoteString($sess_data);
                
$time_exp     $xoopsConfig['session_expire']*60 $sess_exp[config_value] ? ($current_time $xoopsConfig['session_expire']*60) : ($current_time $sess_exp[config_value]);


fixed by putting single quotes around config_value.

$time_exp_bb     $sess_exp['config_value'] ? ($current_time $sess_exp['config_value']) : ($current_time 3600);
                
$sess_data    $this->db->quoteString($sess_data);
                
$time_exp     $xoopsConfig['session_expire']*60 $sess_exp['config_value'] ? ($current_time $xoopsConfig['session_expire']*60) : ($current_time $sess_exp['config_value']);

Login

Who's Online

171 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits