Welcome Guest, Not a member yet? Register   Sign In
Losing $config values on IIS6, Windows 2003 Server

I've developed a site which runs fine locally (on a WAMP environment) and also works fine on an older IIS6, Windows 2003 Server, PHP5. However, on our new Windows 2003 Server (IIS6 PHP5) I get a very curious problem. It seems that the values of the $config array are not being picked up - by the time the index.php page is reached (when I tried echoing the values of the $config array) they had dissappeared. I also placed an 'echo "Hello"' statement in the config.php page to check that it was running through that - it was. So the $config array is being populated, but is being lost at some point.

So when I use $config['base_url'] to find stylesheets etc, they just don't work. Has anyone else experienced this? I'm really in need of a solution for this, so any help is appreciated.



This is probably of no help whatsoever but I know in the past I got caught out by 'safe_mode' being on and losing my constants but not config settings. You have checked you are referencing them correctly ... $this->config->item('base_url') or with correct helper loaded just 'base_url()'

Thanks for your help treadsoftly.

I did manage to find a solution to this - I couldn't believe it too me so long to work out what it was. The problem was that I had the "short_open_tag" directive in php.ini set to Off - so for example, <?=$value?> in my views would appear as <?=$value?> in the output rather than showing the value contained in the variable $value. Changing the "short_open_tag" directive to On did solve the problem - I'm not sure how this resulted in me thinking that the config array was dissappearing.



Don't you just luuuuv those 'DOH' moments! We've all been there ... well at least I have! :-S

Theme © iAndrew 2016 - Forum software by © MyBB