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
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 discussion → 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
Rickard must replace :
if ($num_users > 0)
By :
if (@$num_users > 0)
Edit: To be valid with E_ALL.
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;
}
}
Downgrade it is, as soon as I get home
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
Changed my mind, upgraded instead
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
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
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.
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.
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).
, 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
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
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.
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
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).
lol, that was indeed a strange bug ... resizing the window results in the page getting longer and longer ...
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.
NOTE: The image handling in viewtopic is incomplete so there is no need to post bug reports about images displaying badly. Thanks
Smartys: is_admmod-problem fixed.
Cool, my stuff wasn't going nuts
Rickard, why do you use construction like
if ($condition > 0)
, not
if ($condition)
? The last is more readble
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.
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)
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.
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!
I'll have a look at it when I come home :)
kiplantt: Fixed. I merged it with 'Pass info 1' instead (it's called just 'Pass info' now).
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
Then your scripts aren't properly updated. There is no o_search_users on line 525 in admin_options.php.
PunBB Forums → PunBB 1.2 discussion → PunBB 1.2 development source
Powered by PunBB, supported by Informer Technologies, Inc.