KyleMassacre Posted February 10, 2013 Share Posted February 10, 2013 I have a question and hopefully one of you smart guys can point me in the right direction. I am trying to set a config value like SetConfigValue("my_config_value",$my_update_var); But its not working. I am using the same exact script on Xampp and it works fine there but on a live site it doesnt. During the cron I use the same exact thing to set the config value and it works there but not in the actual script so I am a little confused there Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 10, 2013 Share Posted February 10, 2013 Try to add the module name as 3rd parameter, it could be that in some cases the engine doesn't find on which module this config key is. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 10, 2013 Author Share Posted February 10, 2013 (edited) ill try that now ---------------- Still nothing Edited February 10, 2013 by KyleMassacre Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 10, 2013 Share Posted February 10, 2013 Mmm... The GetConfigKey works but not the set? Never? Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 10, 2013 Author Share Posted February 10, 2013 (edited) Yeah, the GetConfig works like a charm, the SetConfig doesnt work inside the content.php just in the daily_cron.php. Im trying to work out a work around for it but its not working just right. What im trying to do for a work around is doing a hard update into the db as an alternative but still keeping the default functions of NWE but my math is a little off with the query if anyone wants to look at it let me know and i can attach it here just know that its still in beta mode Edited February 10, 2013 by KyleMassacre Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 10, 2013 Share Posted February 10, 2013 Well, odd it doesn't work. Make sure you use SetConfigValue("configKey", $value, "moduleName"); and not SetConfigValue("configKey", $value); Beside that, I wonder why it doesn't work for you. You should put some debug texts inside the SetConfigValue function and see what modules it tries to write on etc... Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 10, 2013 Author Share Posted February 10, 2013 Yeah Its strange cause I used an exact import from my local to live and didnt work then imported from live to local and it works they way its supposed to Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 10, 2013 Share Posted February 10, 2013 Again must be something on your server, but the way to understand the issue, would be to add some printout inside the set function and see what's going wrong. I can't help you much here as I don't have access to the same setup as your server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.