201

Re: PunBB 1.2 development source

When i disable the Users online function at the options page i get this error on the index:

Undefined variable: num_users in /var/www/punbb/index.php on line 179

202 (edited by kiplantt 2004-11-01 15:46)

Re: PunBB 1.2 development source

Rickard must replace :

if ($num_users > 0)

By :

if (@$num_users > 0)

Edit: To be valid with E_ALL.

[img]http://www.famfamfam.com/lab/icons/silk/icons/error.png[/img] /me speaks French and bad English [img]http://www.famfamfam.com/lab/icons/silk/icons/error.png[/img]

203

Re: PunBB 1.2 development source

jacobswell: Open up the SQLite db layer and replace

// Horrible hack to get rid of table names and table aliases from the array keys
while (list($key, $value) = @each($this->row))
{
    if ($key{1} == '.')
    {
        unset($this->row[$key]);
        $key = substr($key, 2);
        $this->row[$key] = $value;
    }
}

with

// Horrible hack to get rid of table names and table aliases from the array keys
while (list($key, $value) = @each($this->row))
{
    $dot_spot = strpos($key, '.');
    if ($dot_spot !== false)
    {
        unset($this->row[$key]);
        $key = substr($key, $dot_spot+1);
        $this->row[$key] = $value;
    }
}
"Programming is like sex: one mistake and you have to support it for the rest of your life."

204

Re: PunBB 1.2 development source

Downgrade it is, as soon as I get home tongue

205

Re: PunBB 1.2 development source

install.php won't show in firefox on my local webserver, on PHP4 or 5 works fine in IE and when i view source in FF its all there but it never finishes loading in FF :S

206 (edited by Smartys 2004-11-01 23:24)

Re: PunBB 1.2 development source

Changed my mind, upgraded instead tongue
4.1.7 now
After an issue with the "Client does not support authentication protocol" message, I've got it up and running
Script testing time tongue

Edit: Script worked fine, but now when going to the forum:
Notice: Undefined index: o_default_lang in c:\apache\apache\htdocs\forum\include\functions.php on line 112
There is no valid language pack '' installed. Please reinstall a language of that name.

And in config.php you need to add a cookie seed and delete $language (at least those are the differences I see in config.php)

Oh, and trying to visit a forum I'm not supposed to be able to gives this on the bottom:
Notice: Undefined variable: is_admmod in c:\apache\apache\htdocs\punbb\footer.php on line 80

207

Re: PunBB 1.2 development source

Smartys wrote:

Notice: Undefined index: o_default_lang in c:\apache\apache\htdocs\forum\include\functions.php on line 112
There is no valid language pack '' installed. Please reinstall a language of that name.

Make sure you have a row called o_default_lang in the config table (you should since the upgrade script adds it). If you do, try deleting any php scripts in the cache directory.

Smartys wrote:

And in config.php you need to add a cookie seed and delete $language (at least those are the differences I see in config.php)

You don't need to, but you should. I haven't written the upgrade documentation yet. The one in install.html is outdated.

Smartys wrote:

Oh, and trying to visit a forum I'm not supposed to be able to gives this on the bottom:
Notice: Undefined variable: is_admmod in c:\apache\apache\htdocs\punbb\footer.php on line 80

Hmm, that can't be right. As you can see, $is_admmod is set in viewforum.php (on line 67).

"Programming is like sex: one mistake and you have to support it for the rest of your life."

208

Re: PunBB 1.2 development source

, but
Warning: Cannot modify header information - headers already sent by (output started at c:\apache\apache\htdocs\forum\config.php:1) in c:\apache\apache\htdocs\forum\include\functions.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at c:\apache\apache\htdocs\forum\config.php:1) in c:\apache\apache\htdocs\forum\header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at c:\apache\apache\htdocs\forum\config.php:1) in c:\apache\apache\htdocs\forum\header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at c:\apache\apache\htdocs\forum\config.php:1) in c:\apache\apache\htdocs\forum\header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at c:\apache\apache\htdocs\forum\config.php:1) in c:\apache\apache\htdocs\forum\header.php on line 34

When I deleted the scripts (I had the var)


And I'm as confused as you, but I can replicate it at will wink


One more error:
When I deleted the PHP cache files when I first go back, I see this in the quick jump:
Notice:  Undefined variable:  forum_id in c:\apache\apache\htdocs\punbb\cache\cache_quickjump_1.php on line 10 >Announcements
And it keeps repeating like that for each of my forums, with differing line numbers

209

Re: PunBB 1.2 development source

All the "Cannot modify header information" warnings are caused by a space or a linebreak before <?php or after ?> in your config.php.

I'm beginning to believe you're not running a vanilla install of 1.2. That forum_id error in the footer really shouldn't happen. You can see for yourself that $forum_id is set at the very end of viewforum.php and viewtopic.php before the footer (and the quickjump cache is loaded), so $forum_id is very much defined.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

210 (edited by Smartys 2004-11-02 11:48)

Re: PunBB 1.2 development source

I downloaded it and installed it, I haven't modded anything
I'll download another fresh version later today

Edit: Replaced all the files, I no longer get the forum_id error, but I still get the admmod error: lets see if upgrading my PHP does something

211 (edited by Sander D. 2004-11-02 15:20)

Re: PunBB 1.2 development source

I know that not many people use Amaya, but you might try to fix the bug that causes strange problems with that browser. But maybe Amaya just doesn't support CSS well enough (remarkable, for a browser from the W3C).

212

Re: PunBB 1.2 development source

lol, that was indeed a strange bug ... resizing the window results in the page getting longer and longer ... big_smile

213

Re: PunBB 1.2 development source

Sander D. wrote:

I know that not many people use Amaya, but you might try to fix the bug that causes strange problems with that browser. But maybe Amaya just doesn't support CSS well enough (remarkable, for a browser from the W3C).

Amaya does not have anything like complete CSS support. It really isn't fit to be used for annything other than as an experimental toy. You might as well try using Netscape 4.

214

Re: PunBB 1.2 development source

NOTE: The image handling in viewtopic is incomplete so there is no need to post bug reports about images displaying badly. Thanks

215

Re: PunBB 1.2 development source

Smartys: is_admmod-problem fixed.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

216

Re: PunBB 1.2 development source

Cool, my stuff wasn't going nuts tongue

217

Re: PunBB 1.2 development source

Rickard, why do you use construction like

if ($condition > 0)

, not

if ($condition)

? The last is more readble

218

Re: PunBB 1.2 development source

R@: It's a habit I've picked up from programming in other languages where a conditional statement must return a boolean value (Java, C#). Which one is more readable is a matter of personal taste and preference. I try not to do it in PHP though, so I would appreciate if you could inform me of where I do this in the PunBB source.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

219

Re: PunBB 1.2 development source

I've picked up from programming in other languages where a conditional statement must return a boolean value (Java, C#)

But I think boolean is if ($condition)

220

Re: PunBB 1.2 development source

R@: Only if $condition is a variable of type boolean. For example:

if ($db->num_rows($result))

would not have worked in Java or C# because num_rows() returns an integer, not a boolean.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

221

Re: PunBB 1.2 development source

I have a question to Rickard:

What's the utility of $lang_register['Pass info 2'] in lang/.../register.php ?

It isn't in a file! big_smile

[img]http://www.famfamfam.com/lab/icons/silk/icons/error.png[/img] /me speaks French and bad English [img]http://www.famfamfam.com/lab/icons/silk/icons/error.png[/img]

222

Re: PunBB 1.2 development source

I'll have a look at it when I come home :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

223

Re: PunBB 1.2 development source

kiplantt: Fixed. I merged it with 'Pass info 1' instead (it's called just 'Pass info' now).

"Programming is like sex: one mistake and you have to support it for the rest of your life."

224

Re: PunBB 1.2 development source

i have this error con punbb 1.2

Notice: Undefined index: o_search_users in c:\appserv\www\foros\admin_options.php on line 525

this appear in admin options - Userlist search

El Mejor Lugar de la Red - Corporación Azakur4

225

Re: PunBB 1.2 development source

Then your scripts aren't properly updated. There is no o_search_users on line 525 in admin_options.php.

"Programming is like sex: one mistake and you have to support it for the rest of your life."