4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: dozza on September 22, 2005, 09:41:20 AM

Title: Unable to edit Templates on Windows server installation!
Post by: dozza on September 22, 2005, 09:41:20 AM
Hi

I have installed 4Images on a Win2K server and it seems to run fine. However, I am unable to save any changes to any template. After clicking the "Save Changes" button, the screen returns with the following error and none of the changes have taken place;

Code: [Select]
Undefined variable: content in D:\Web\mydomain\4images\admin\templates.php on line 131
.

Any help much appreciated.  :cry:
Title: Re: Unable to edit Templates on Windows server installation!
Post by: V@no on September 22, 2005, 03:18:23 PM
in admin/templates.php find:
Code: [Select]
if ($action == "savetemplate") {
Insert below:
Code: [Select]
  if (isset($HTTP_POST_VARS['content'])) {
    $content = trim($HTTP_POST_VARS['content']);
  }
  else {
    $content = "";
  }


Seems to be a bug affecting servers with register_globals = 0;...
Title: Re: Unable to edit Templates on Windows server installation!
Post by: impss on September 22, 2005, 03:29:19 PM
Veno, I have always had the same problem to.

When i try your fix, i get
Parse error: parse error, unexpected ';' in C:\...\admin\templates.php on line 133

when i click on templates from the ACP
Title: Re: Unable to edit Templates on Windows server installation!
Post by: V@no on September 23, 2005, 12:05:36 AM
ops, was too early for me I guess...
missed closing bracket in this line:
Quote
    $content = trim($HTTP_POST_VARS['content']);
Title: Re: Unable to edit Templates on Windows server installation!
Post by: dozza on September 23, 2005, 04:34:09 AM
Thank you.

I was just coming to mention that too.  :D

Works fine now.
Title: Re: Unable to edit Templates on Windows server installation!
Post by: Acidgod on December 06, 2005, 04:18:47 PM
Seems to be a bug affecting servers with register_globals = 0;...

Have register_globals=off on my Linux Server and V@nos Fix works fine... (o: