1
feliponnn
Undefined variable: g_id
  • 2008/1/29 1:21

  • feliponnn

  • Just popping in

  • Posts: 4

  • Since: 2006/11/22


Hi Everybody, I got a problem, so I need a little bit of help in this one.

Everything start when I tryed to create some blocks, everything was ok, but when i was changing permissions in groups, after i get an 500 http error. so I close my site and start the debug mode, I do the same steps again, and the result was the following.

Fatal error: Call to a member function setVar() on a non-object in /home/felipon/public_html/V3/modules/system/admin/groups/main.php on line 71

All errors (1) queries (4) blocks (0) extra (1) timers (3)

Errors
Notice: Undefined variable: g_id in file /modules/system/admin/groups/main.php line 70

Queries
SELECT * FROM V3dbtb_config WHERE (conf_modid = '0' AND conf_catid = '1') ORDER BY conf_order ASC
SELECT sess_data, sess_ip FROM V3dbtb_session WHERE sess_id = '4e0f70fe83a0cef57bc5012095896917'
SELECT * FROM V3dbtb_users WHERE uid=1
SELECT * FROM V3dbtb_modules WHERE dirname = 'system'
Total: 4 queries

Blocks
Total: 0 blocks

Extra
Token Validation: Valid token found

Timers
XOOPS took 0.061 seconds to load.
XOOPS Boot took 0.047 seconds to load.
Module init took 0.014 seconds to load.

2
BlueStocking
Re: Undefined variable: g_id

A 500 http error is a server error generated number.
To see what caused that you may check your server logs, or ask your server admin for information.

Since the server failed and you were able to re access the site then the server probably just had a momentary glitch.
It is my GUESS ..and.. that is all it is, a guess, {relating to the 500 error message}, that a sudden interruption in service may have caused a database table corruption.

So for starters I would go completely out of the program and reboot so my cache wasn't giving me a faulty read, and see if the problem still exists after re-booting.

I assume this was working before the 500 error.

If the problem still exists, after reboot.. then I would go to the database and do a repair tables.

You have a groups, and groups_permission -- either of those table could be corrupt. Select operation and look for the analize and repair table section.

This is what I would do, and I could be way off base because I have not encountered that problem.

I will google and see if anything else helpful might show up...

BlueStocking

60      case "update":
  
61          if (!$GLOBALS['xoopsSecurity']->check()) {
  
62              redirect_header("admin.php?fct=groups&op=adminMain"3implode(''$GLOBALS['xoopsSecurity']->getErrors()));
  
63          }
  
64          $system_catids = empty($system_catids) ? array() : $system_catids;
  
65          $admin_mids = empty($admin_mids) ? array() : $admin_mids;
  
66          $read_mids = empty($read_mids) ? array() : $read_mids;
  
67          $read_bids = empty($read_bids) ? array() : $read_bids;
  
68          $member_handler =& xoops_gethandler('member');
  
69          $group =& $member_handler->getGroup($g_id);
  
70          $group->setVar('name'$name);
  
71          $group->setVar('description'$desc);
  
72          // if this group is not one of the default groups
  
73          if (!in_array($group->getVar('groupid'), array(XOOPS_GROUP_ADMINXOOPS_GROUP_USERSXOOPS_GROUP_ANONYMOUS))) {
  
74              if (count($system_catids) > 0) {
  
75                  $group->setVar('group_type''Admin');
  
76              } else {
  
77                  $group->setVar('group_type''');
  
78              }
  
79          }
  
80          if (!$member_handler->insertGroup($group)) {
  
81              xoops_cp_header();
  
82              echo $group->getHtmlErrors();
  
83              xoops_cp_footer();
  
84


IF someone can determine from this code or experience what may have gone wrong.

Please chime in, this gentleman needs your help...
BlueStocking
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

3
feliponnn
Re: Undefined variable: g_id
  • 2008/1/29 4:17

  • feliponnn

  • Just popping in

  • Posts: 4

  • Since: 2006/11/22


Thanks BlueStocking,

I'm the Admin of my server, and I just restart it for the 2 time, and the result is the same, I tried increasing some variables in apache init, I tried repairing all tables and optimizing them but the problem persist,

I was thinking to clear all permission tables, and maybe with this i can have a fresh start, I'm not sure if it's a good idea, just let me know.

and again thanks.

4
iHackCode
Re: Undefined variable: g_id

thats a weird one.. (i wrote a lengthy explanation of what does what but then realize that it might not make sense).. so i ask.. at this url yourdomain/modules/system/admin.php?fct=groups&op=modify&g_id=2 and if you can view source. search for g_id in the source. and is it there? like name='g_id' id='g_id' value='2' or something.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

5
BlueStocking
Re: Undefined variable: g_id

Have you upgraded anything we should know about. Have you preformed the same routine previously on this same version with success?

I am thinking the timing on the server belch could be concidental and is masking the fact this function wasn't working properly, and it could possibly be a bug.

Do you know it worked before, the 500 http error?
What version XOOPS is this error related to?

BS
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

6
feliponnn
Re: Undefined variable: g_id
  • 2008/1/29 8:39

  • feliponnn

  • Just popping in

  • Posts: 4

  • Since: 2006/11/22


verision of XOOPS 2.0.17.1
I have done the same routine in previosly version, everything was ok, until suddenly, I dont know if maybe it coulb be related to the quantity of blocks that I have, around 255, I never work with to many blocks, if you want to have a look to the website is
http://www.habbospeed.net

any other info, just tell me
Thanks again, for your time.

7
BlueStocking
Re: Undefined variable: g_id

Looks ok to me...

http://habbospeed.net/V3/index.php

I did have a bit of a time trying to find the subdirectory you were runing XOOPS out of though.. (even though it is listed in the error msg)

I don't see the problem you are talking about now...
No fatal errors, works as good as could be expected.

BlueStocking
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

8
stefan88
Re: Undefined variable: g_id
  • 2008/1/29 10:46

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


Are there any logs in web server error log files that may give a clue for that 500 error?
..

Login

Who's Online

337 user(s) are online (236 user(s) are browsing Support Forums)


Members: 0


Guests: 337


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