If I log into the Admin account, I can set the theme that everyone will see if I do it from the configs panel. However, I have enabled the theme list and if I'm not logged in as Admin (if I'm any visiter to the gallery) and I attempt to change themes from the drop-down list, I only received a page with "an unexpected error...parse error...". I think others have seen this. I have run accross a few suggestions to fix this but have not found my solution. Changing the theme system wide from the config panel does not produce an error for any theme chosen, and displays correctly for all, but trying to switch the themes outside the config panel always produces the same error.
Thank you,
Christian
post a link please
Sure. You can check it out right here: http://gallery.myadventurouslife.com/
I've never had php running as a cgi... can't give you an advice. Switching to the Apache module would solve your probs I guess
Sorry, I'm really new at this. Switching to Apache mode, is that something I have to do system wide on my site, or per MySQL database, or what? I'm not sure where I find this flag. Can you give me a hint about this?
Try this (Not sure whether this will work for you or not, just a wild guess ;) )
Edit include/functions.inc.php
Replace (in function themeSelect)
$cpgCurrentTheme = $_SERVER["SCRIPT_NAME"]."?";
with
$possibilities = array('REDIRECT_URL', 'PHP_SELF', 'SCRIPT_URL', 'SCRIPT_NAME','SCRIPT_FILENAME');
foreach ($possibilities as $test){
if (isset($_SERVER[$test]) && preg_match('/([^\/]+\.php)$/', $_SERVER[$test], $matches)){
$PHP_SELF = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = $matches[1];
break;
}
$PHP_SELF = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = '';
}
// get the current theme
//get the url and all vars except $theme
$cpgCurrentTheme = $PHP_SELF."?";
Thanks to Nibbler for above code.
Abbas
Abbas, thank you very much. I'm very impressed, because that worked beautifully! Find>Replace>No Fuss! I am not a php coder, and now it's even more mysterious, but there must be a magic in there somewhere. Again, thank you...seriously!
Christian