Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 + 9 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Sorry, you don't have permission to access this area
by harv36 on 2013/1/8 21:11:59

Hi Mamba,

I added the little statement to the adodb.inc.php file and now i have access to Zentrackxoops but none of the tabs work. When i click on them, nothing happens.

Anyway, i am seriously considering to give xHelp a try.

Thanks a lot again guys for your precious help.

Cheers,
Harv36
Re: Sorry, you don't have permission to access this area
by Mamba on 2013/1/8 20:47:12

You're very welcome.

But if this is a fresh installation, you might consider testing and if you like it, using xHelp, as the chances of updating in the future are much higher for xHelp than ZenTrack.

Also, first test it locally on something like WampServer.

And one word of caution: XOOPS 2.5.5 won't work properly on PHP 5.4. For this we are finishing XOOPS 2.5.6 update. You can check it out from our SVN on SourceForge.
Re: Sorry, you don't have permission to access this area
by harv36 on 2013/1/8 20:41:30

Thanks a lot Mamba.
Will try these and will keep you posted.
But I will have to seek permission to upgrade my PHP.

Thanks a lot again guys...i would never have figured it out by myself.

Cheers,
Harv36
Re: Sorry, you don't have permission to access this area
by redheadedrod on 2013/1/8 17:28:48

From the little tid bits you displayed Mamba this module needs a total rework. ADODB is not a supported database extension with Xoops and unless they are using transactions or something of that nature it really should be using xoops code. This module was released in 2006 so it is not surprising that it needs some updating.

If it works for now then good. It will eventually need to be updated.

Re: Sorry, you don't have permission to access this area
by Mamba on 2013/1/8 12:21:08

OK, I looked into zentrack a little bit closer on PHP 5.4.8 and WampServer: - as expected, this is a very old code - a lot of issues were caused by using "?php" tags - there is also tons of short tags that are being used instead of echo. It works on PHP 5.4, but it won't work on PHP 5.3, at least not for me. (see description of the issue here). - the lack of permissions that you're getting is due to some strange code in the DB files in the module: a) in the db.class.php, we have a call to "getArray"
le="color: #000000"><?php $vars = $recordSet->getArray();
b) this call goes to adodb.inc.php file:
le="color: #000000"><?php function &GetArray($nRows = -1) { global $ADODB_EXTENSION; if ($ADODB_EXTENSION) return adodb_getall($this,$nRows); $results = array(); $cnt = 0; while (!$this->EOF && $nRows != $cnt) { $results[] = $this->fields; $this->MoveNext(); $cnt++; } return $results; }
The problem is that this function checks for EOF and number of rows. Before we call the function, we execute the query searching for the user, and the $recordSet is at EOF. As a result, the "getArray" function will return an empty array, so you never get the permission. When I reset it to the first row before running the "while" loop
le="color: #000000"><?php $this->MoveFirst();
so it looks like this: Quote:
function &GetArray($nRows = -1) { global $ADODB_EXTENSION; if ($ADODB_EXTENSION) return adodb_getall($this,$nRows); $results = array(); $cnt = 0; $this->MoveFirst(); while (!$this->EOF && $nRows != $cnt) { $results[] = $this->fields; $this->MoveNext(); $cnt++; } return $results; }
it works now. The files are now updated in SourceForge SVN, and you can check them out using TortoiseSVN, or you can download them with this little tool using the link:
le="color: #000000"><?php http://svn.code.sf.net/p/xoops/svn/XoopsModules/zentrack/trunk/
Please note, you need PHP 5.4 to run it. Do some testing and let us know if it works. However, you can try to add this line:
le="color: #000000"><?php $this->MoveFirst();
in your code, as I did above, and see if it works.

Who's Online

110 user(s) are online (61 user(s) are browsing Support Forums)


Members: 0


Guests: 110


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits