Constant XXXX already defined

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
thomasdahlin
TestLink user
Posts: 3
Joined: Sat Apr 13, 2013 6:58 am

Constant XXXX already defined

Post by thomasdahlin »

Hi,

After installing TL 1.9.6 I wanted to change the values of constants TL_FACE_DIR and TL_VERSION

I inserted these lines in custom_config.inc.php:

Code: Select all

define('TL_FACE_DIR', '');
define('TL_VERSION', '1.9.6');
After restarting httpd (+ clearing browser cache) and reloading the login page I still see the default values from cfg/const.inc.php displayed.

From /var/log/httpd/error_log:

[error] [client xyz.xyz.xyz.xyz] PHP Notice: Constant TL_FACE_DIR already defined in /var/www/html/testlink-1.9.6/custom_config.inc.php on line 24, referer: http://<servername>/logout.php
[error] [client xyz.xyz.xyz.xyz] PHP Notice: Constant TL_VERSION already defined in /var/www/html/testlink-1.9.6/custom_config.inc.php on line 25, referer: http://<servername>/logout.php

Not quite sure about why? Any ideas?
gianmaria
Advanced user
Posts: 54
Joined: Sat Dec 15, 2012 7:40 am
Location: Pavia, Italy
Contact:

Re: Constant XXXX already defined

Post by gianmaria »

I did the same things.

cfg/const.inc.php
define('TL_FACE_DIR', '');
define('TL_VERSION', '1.9.3');

And for me works.
Cloud solutions, https://onemediahub.com/
thomasdahlin
TestLink user
Posts: 3
Joined: Sat Apr 13, 2013 6:58 am

Re: Constant XXXX already defined

Post by thomasdahlin »

Yes, if I update cfg/const.inc.php the changes are visible, but not if I update custom_config.inc.php

gianmaria: what happens if you keep the default values (or set something completely random) in cfg/const.inc.php and set the values you really want in custom_config.inc.php?
gianmaria
Advanced user
Posts: 54
Joined: Sat Dec 15, 2012 7:40 am
Location: Pavia, Italy
Contact:

Re: Constant XXXX already defined

Post by gianmaria »

This config doesn't work if you add it on custom_config.inc.php.
This is the reason why is not documented (I think).
Cloud solutions, https://onemediahub.com/
Post Reply