Page 1 of 2

Need Some PHP Mod Help

Posted: Thu Sep 29, 2005 5:43 am
by fatboy42
I'm trying to install the auto group mod on my forum. Key word here being trying. /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" /> When I logged onto the site to try it out it gave me some error messages. I think I've got most of them fixed except I can't figure this one out.


Warning: ob_start(): output handler 'ob_gzhandler' cannot be used twice in /home/fatboy42/public_html/phpBB2/includes/page_header.php on line 44

Here is my line 44 from the includes/page_header.php file: ob_start('ob_gzhandler');



Any ideas on how to fix this? Thanks.

Posted: Thu Sep 29, 2005 12:43 pm
by AYHJA
Sure, I'll help ya...

Post any instuctions you have for the mod in the

Code: Select all

 command, and I'll have a look at it for you...

Posted: Fri Sep 30, 2005 6:07 am
by fatboy42
Ok. I give up on the auto group mod. I've redid and redid it and still can't get it to work.

Posted: Fri Sep 30, 2005 1:12 pm
by AYHJA
If you don't want to do that, LoL, you can always set permissions on your forums to private, create a usergroup that is allowed access to that forum, and let people apply for membership, and you can add them manually...That is how I did things here for a long time before it became automated...

Posted: Sun Oct 02, 2005 3:51 am
by fatboy42
I may have figured out what I did wrong. Im gonna try it again later. Another problem now though.

I'm trying to install the Karma Mod on my forum. Now I'm getting SQL errors. I tried to run the Karma.php file included in the download. Here is what I get on the main page.


QUOTEWarning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fatboy42/public_html/phpBB2/karma.php on line 40

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fatboy42/public_html/phpBB2/karma.php on line 60


Line 40: $array = mysql_fetch_array($result);
Line 60: $array = mysql_fetch_array($result);


Also when I view a topic I get an error then too.

QUOTEWarning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fatboy42/public_html/phpBB2/viewtopic.php on line 1156

Line 1156:$array = mysql_fetch_array($result);

Any ideas? Thanks.

Posted: Sun Oct 02, 2005 5:45 am
by WAY
LoL, its funny, because AYHJA was looking for a link to that mod..

unless he LIED.. :evil:


That error seems to indicate poor coding, or you've SERIOUSLY screwed something up..
Either the name of the mySQL connection in the PHP script is typed wrong, or the DB connection has been closed, and the script is trying to use the previous connection..

Note that I have never used this script, nor looked at the source. This is merely a simple represtation or the error that was described by you..

CODE$array = mysql_fetch_array($result);
simply retreives the mySQL output of a SQL query performed above into an array called $result

Posted: Sun Oct 02, 2005 6:19 am
by fatboy42
I got some code that made it quit giving error messages. It doesn't seem to do anything though. :oops:

Maybe this is why:I'm running phpBB Version:2.0.17 Mod calls for versions:2.0.4 - 2.0.6. I don't know if that is it or not.

Posted: Sun Oct 02, 2005 6:23 am
by WAY
That is quite possible that, as you described, you are running a much higher phpBB version that is required, if the development teams made a major change to the DBAL (data-base abstraction layer)..

Anyway, I'd wait till A get's here, he's the MOD Master..

Posted: Sun Oct 02, 2005 6:41 am
by fatboy42
Yeah I'm gonna wait on some input from him. On another note though I did get the auto group mod up and running.


Edit: Helps to read all the file I guess. It is working now.

CODE#If voting doesn't work do this:

#Open $PHPBBROOT/viewtopic.php

#After

'POSTER_NAME' => $poster,

#Add

'POSTER_ID' => $poster_id,

#Save $PHPBBROOT/viewtopic.php

Posted: Sun Oct 02, 2005 1:08 pm
by AYHJA
Yo..!

Seems like you got it crackin' now..! Well done M8...

In your cPanel, if you click on MySQL Databases, you should see phpMyAdmin at the bottom...You can use that to back up your DB, run SQL queries, etc...It's a good idea to check it out, and be familiar with it to a degree, because you're gonna end up using it alot...

You also may want to check out EasyMOD by Nutzzy, which will install properly written MOD's automatically...It doesn't run SQL most of the time though, so you'll have to do that yourself...But to me, you're going the right way, working on these things yourself is really good...

However...You may want to install a test forum... /:D" style="vertical-align:middle" emoid=":D" border="0" alt=":D" />