Codoforum related discussions
php errors on 3.6

hello.
i have a particular error in my php logs:

Undefined index: HTTP_HOST in /var/www/codoforum/sys/CODOF/Cookie.php on line 67
 Undefined index: HTTP_HOST in /var/www/codoforum/sys/load.php on line 23

after investigations, my server never send HTTP_HOST variable, as it's a protection against host poisoning ( https://ellislab.com/blog/entry/http-host-and-server-name-security-issues)

is there a way to setup the real host name in a config file ?

thanks

hello. i have a particular error in my php logs: ```` Undefined index: HTTP_HOST in /var/www/codoforum/sys/CODOF/Cookie.php on line 67 Undefined index: HTTP_HOST in /var/www/codoforum/sys/load.php on line 23 ```` after investigations, my server never send HTTP_HOST variable, as it's a protection against host poisoning ( https://ellislab.com/blog/entry/http-host-and-server-name-security-issues) is there a way to setup the real host name in a config file ? thanks

please, excuse my bad english! ( i'm french, and i know, it's not a good excuse ! ;) )

The domain variable is not even used so we simply deleted those lines.

You can do the same for Cookie.php file

As for load.php file, you can manually edit the file and set your host

The domain variable is not even used so we simply deleted those lines. You can do the same for Cookie.php file As for load.php file, you can manually edit the file and set your host
edited Oct 11 '16 at 2:52 pm

thanks @adesh1414127033 for the answer.

Maybe adding

define('CODO_URL', 'mydomain');

in constants.php or config.php

and correct codoforum/sys/load.php line 23

$path = $protocol . CODO_URL . $_SERVER['SCRIPT_NAME'];

and move it to line 29

more 'clean' if we upgrade ?

thanks @adesh1414127033 for the answer. Maybe adding ```` define('CODO_URL', 'mydomain'); ```` in constants.php or config.php and correct codoforum/sys/load.php line 23 ```` $path = $protocol . CODO_URL . $_SERVER['SCRIPT_NAME']; ```` and move it to line 29 more 'clean' if we upgrade ?

please, excuse my bad english! ( i'm french, and i know, it's not a good excuse ! ;) )

edited Oct 11 '16 at 4:12 pm

Yes, we will do that.

For those users who have HTTP_HOST, we will automatically update constants.php file with that value and for others, they can provide it during installation.

Yes, we will do that. For those users who have HTTP_HOST, we will automatically update constants.php file with that value and for others, they can provide it during installation.
105
3
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft