1
toonstruck
Strange PHP code printing on my Xoops pages
  • 2005/8/20 4:57

  • toonstruck

  • Just popping in

  • Posts: 12

  • Since: 2004/12/1


Im running version 2.22. If I go to any page of my XOOPS installation, the following text:

"oopsTheme['thename'] = $GLOBALS['xoopsConfig']['theme_set']; } $GLOBALS['xoopsLogger']->context = "module"; ?> ?>"



And at the very bottom of the page:

"& $xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { echo $xoopsLogger->getSQLDebug(); } } ?> ?>der.php"; require "footer.php"; } ?>"



Does anyone know what is causing this and how I can fix it? I have no clue on where to look. :(

It makes no difference what theme I am running.


Thanks

2
hyperpod
Re: Strange PHP code printing on my Xoops pages
  • 2005/8/20 8:10

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


possibly its a problem of using Gzip compression on a server that doesnt support it?

What is you gzip compression set to in General Preferences?
and does your server support it?

Otherwise, I havent seen that happen very often.


If I was to attempt to fix something like this, I would have to work with the site itself having the problem.


Otherwise, maybe someone else has experienced this or knows what might cause it.

Best Regards,
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

3
toonstruck
Re: Strange PHP code printing on my Xoops pages
  • 2005/8/21 7:19

  • toonstruck

  • Just popping in

  • Posts: 12

  • Since: 2004/12/1


Thanks for the reply. No, GZIP compression is off on Xoops.


This is a bummer.. Any other ideas?

4
toonstruck
Re: Strange PHP code printing on my Xoops pages
  • 2005/8/21 7:41

  • toonstruck

  • Just popping in

  • Posts: 12

  • Since: 2004/12/1


I turned on Smarty Templates debugging. I noticed that

$xoops_contents says:

"oopsTheme['thename'] = $GLOBALS['xoop..."




This is the start of the same text that is printing on that particular page. I dont know if this means anything to anyone. But perhaps it can help narrow the problem down.


Thanks.

5
toonstruck
Re: Strange PHP code printing on my Xoops pages
  • 2005/8/24 15:53

  • toonstruck

  • Just popping in

  • Posts: 12

  • Since: 2004/12/1


Since it doesnt seem that anyone knows what is causing this problem.

What happens if I delete all the files and complete re-upload all 2.2.2 files? Will that cause any problems? I'm hoping that that will catch any screw ups that might of happened along the way.

I've had about all I can handle with the problems that this upgrade has made. I'd hate to abandon XOOPS completely. I'd like to try something else before giving up. And if this can be tried without making things worse. I'd like to do it.

6
JamesSAEP
Re: Strange PHP code printing on my Xoops pages
  • 2005/8/24 16:07

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Reloading all the pages, EXCEPT, mainfile.php would be a good option.

7
frankblack
Re: Strange PHP code printing on my Xoops pages
  • 2005/8/24 16:11

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


The before mentioned code-samples are part of header.php and footer.php in your xoopsroot.

I guess that you perhaps forgot some files during update. I seems that old and code have been mixed.

My advice: Make a complete copy (db and files) and install it locally. Copy the files from 2.2.2 to your local installation and overwrite the old ones and check if it works now.

8
bryo99
Re: Strange PHP code printing on my Xoops pages
  • 2005/8/24 16:29

  • bryo99

  • Just popping in

  • Posts: 9

  • Since: 2005/8/13


[quote]
toonstruck wrote:
I turned on Smarty Templates debugging. I noticed that

$xoops_contents says:

"oopsTheme['thename'] = $GLOBALS['xoop..."
quote]

This might be a very simple problem to fix. The problem seems to be in your header.php. The X seems to be missing from Xoops! Replace line 39 with the following:

$xoopsTheme['thename'] = $GLOBALS['xoopsConfig']['theme_set'];


Here is whole header.php, if you would like to replace the entire page.

// $Id: header.php,v 1.46 2005/08/08 06:29:03 skalpa Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <https://xoops.org/> //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
$GLOBALS['xoopsLogger']->context = "core";

// Get blocks
$block_handler =& xoops_gethandler('block');
$block_handler->assignBlocks();

$GLOBALS['xTheme']->checkCache();

if (!isset($GLOBALS['xoopsOption']['template_main'])) {
// new themes using Smarty does not have old functions that are required in old modules, so include them now
include XOOPS_ROOT_PATH.'/include/old_theme_functions.php';
// need this also
$xoopsTheme['thename'] = $GLOBALS['xoopsConfig']['theme_set'];
}
$GLOBALS['xoopsLogger']->context = "module";
?>

9
toonstruck
Re: Strange PHP code printing on my Xoops pages
  • 2005/8/25 16:24

  • toonstruck

  • Just popping in

  • Posts: 12

  • Since: 2004/12/1


Thanks guys!!!


Bryo and Frankblack, you were right. Both the footer and header files were screwed up. Evidentially the index.php file was messed up too. It seems that the files somehow mixed old code and new code together. That leads me to believe there are plenty of other files that are corrupted too. I have no idea what could of gone wrong.

This weekend I will back up the directories, then delete all the files and re-upload them as suggested.



However, for now I am no longer getting the strange code.


Thanks again! Much appreciated. :)


Now if only I could get the admin section to work properly. :(

Login

Who's Online

343 user(s) are online (303 user(s) are browsing Support Forums)


Members: 0


Guests: 343


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits