If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Password page goes in a loop when listing tables used.  XML
Forum Index » Support Forum
Author Message
clinthart
Beginner

Joined: 07/11/2005 19:29:47
Messages: 6
Location: Maryland
Offline

I am seeing this problem with Lazarus and AG. When I login as Admin, and I go to the Password page, the section that shows what tables are used goes into a loop. It continuously shows the "book_data" table and won't stop listing that table in the list. It just gets stuck listing the same table over and over.

Any ideas?

www.project-quicksilver.com
[Email]
JTD
Graduate

Joined: 08/05/2004 21:52:50
Messages: 529
Location: Arkansas
Offline

It could be your host or the version of php they run. You could have messed up the install. Could be alot of things. I know I have used Lazarus ever since carb put it out. And I have never had any problems with it.

LINK-> Use Lazarus Guestbook
[WWW] [Yahoo!] aim icon [MSN]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

As I have stated elsewhere I beleive this is an issue with PHP 4.4 where they changed some of the api and I will look into it tonight.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
clinthart
Beginner

Joined: 07/11/2005 19:29:47
Messages: 6
Location: Maryland
Offline

Carbonize wrote:As I have stated elsewhere I believe this is an issue with PHP 4.4 where they changed some of the api and I will look into it tonight.


Thanks.

Here is the versions of software my provider is running.

PHP version 4.4.1
MySQL version 4.1.13-standard-log

Everything else seems to be fine. I am running the php bulletin board and have no issues.

I also tried creating a New GB and having it recreate the tables in the db, but that didn't help.

www.project-quicksilver.com
[Email]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

It looks like it's a bug in PHP 4.4.1 and they have fixed it in the latest snapshots. The bug is to do with the reset() function when the variable passed to it is not an array. I will look at writing some code to check that the variable is an array first but it's hard for me to test as I only have access to PHP 4.3.11 and 5.x.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
clinthart
Beginner

Joined: 07/11/2005 19:29:47
Messages: 6
Location: Maryland
Offline

Carbonize wrote:It looks like it's a bug in PHP 4.4.1 and they have fixed it in the latest snapshots. The bug is to do with the reset() function when the variable passed to it is not an array. I will look at writing some code to check that the variable is an array first but it's hard for me to test as I only have access to PHP 4.3.11 and 5.x.


I can give you access to my site if you want. Just email me directly and we can work together.

admin@project-quicksilver.com

www.project-quicksilver.com
[Email]
clinthart
Beginner

Joined: 07/11/2005 19:29:47
Messages: 6
Location: Maryland
Offline

Carbonize wrote:It looks like it's a bug in PHP 4.4.1 and they have fixed it in the latest snapshots. The bug is to do with the reset() function when the variable passed to it is not an array. I will look at writing some code to check that the variable is an array first but it's hard for me to test as I only have access to PHP 4.3.11 and 5.x.


Your code worked!

Open up admin/panel_pwd.php and
find

for (reset($this->table); $key=key($this->table); next($this->table)) {
echo "- ".$this->table[$key]."<br>\n";
}

replace that with

reset($this->table);
foreach ($this->table as $tablename) {
echo "- ".$tablename."<br>\n";
}

www.project-quicksilver.com
[Email]
nonnie
Newbie

Joined: 07/12/2005 21:02:33
Messages: 1
Offline

While troubleshooting the installation of this software, we ran across a similar loop. The ./admin/panel_template.php file also relied on
the faulty reset() function. It required the following fix:

line 42:
for (reset($GB_TPL);$key=key($GB_TPL); next($GB_TPL)) {
echo " <tr>
<td width=\"15\">-</td>
<td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"><a href=\"$this->SELF?action=template&amp;tpl_name=$GB_TPL[$key]&amp;session=$this->session&amp;uid=$this->uid\"><font color=\"#000066\">
$GB_TPL[$key]</font></a></font></td>
</tr>\n";
}


changed to:

reset($GB_TPL);
foreach ($GB_TPL as $a => $b) {
echo "<tr>
<td width=\"15\">-</td>
<td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"><a href=\"$this->SELF?action=template&amp;tpl_name=$b&amp;session=$this->session&amp;uid=$this->uid\"><font color=\"#000066\">
$b</font></a></font></td>
</tr>\n";
}//end foreach


Just thought we should post this to save others the trouble when/if it pops up.

Cheers.
Anne
Newbie

Joined: 11/12/2005 18:41:53
Messages: 1
Offline

Thanks for the fixes for the Guestbook / PHP 4.4.1 problem - having applied your fixes all now works properly again. You folks are the best!
jornh
Newbie
[Avatar]

Joined: 23/12/2005 03:10:05
Messages: 4
Location: Terslev Denmark
Offline

clinthart wrote:
Carbonize wrote:It looks like it's a bug in PHP 4.4.1 and they have fixed it in the latest snapshots. The bug is to do with the reset() function when the variable passed to it is not an array. I will look at writing some code to check that the variable is an array first but it's hard for me to test as I only have access to PHP 4.3.11 and 5.x.


Your code worked!

Open up admin/panel_pwd.php and
find

for (reset($this->table); $key=key($this->table); next($this->table)) {
echo "- ".$this->table[$key]."<br>\n";
}

replace that with

reset($this->table);
foreach ($this->table as $tablename) {
echo "- ".$tablename."<br>\n";
}


This is working perfect for the panel_pwd.php.
Thanks

I also mead some modification for the panel_smilies.php
when tray to load the Scan directory (img/smilies/)
i newer go to the directory is traying and traying sems to go ia loop
???????????

JornH : The quick brown fox jumps over the lazy dogs back.
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum