Author Topic: Unable to edit Templates on Windows server installation!  (Read 5433 times)

0 Members and 1 Guest are viewing this topic.

Offline dozza

  • Newbie
  • *
  • Posts: 11
    • View Profile
Unable to edit Templates on Windows server installation!
« 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:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Unable to edit Templates on Windows server installation!
« Reply #1 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;...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: Unable to edit Templates on Windows server installation!
« Reply #2 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Unable to edit Templates on Windows server installation!
« Reply #3 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']);
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline dozza

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Unable to edit Templates on Windows server installation!
« Reply #4 on: September 23, 2005, 04:34:09 AM »
Thank you.

I was just coming to mention that too.  :D

Works fine now.

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Unable to edit Templates on Windows server installation!
« Reply #5 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: