Giter VIP home page Giter VIP logo

Comments (14)

C4K3 avatar C4K3 commented on July 17, 2024 1

All the errors you're getting are bugs that have been patched previously, you should not be getting any of those on version 3.3.0. Make sure you have only one Auth_phpbb.php, apparently it was changed to lowercase many versions ago, so you might be inadvertently using an old version. In the same vein, also doublecheck the Auth_phpbb filename you're including from localsettings. And just for good measure could you post the output git hash-object Auth_phpbb.php?

(PS Nicely written bug report, has everything 👍)

from mediawiki_phpbb_auth.

Ekzim avatar Ekzim commented on July 17, 2024

C4K3,
Thanks for the quick reply. I went ahead and took your advice and applied it and I'll share the results. Sadly, it is still malfunctioning but I've got different errors to provide so hopefully we are making progress!

Redownloaded/replaced files to ensure current versions
I deleted all the previous Auth_phpbb files in my extensions directory. I redownloaded via git clone/zip download this time. Took the settings I had for the values in localsettings and replaced them with the code snippet from github on your install page. Replace my values into the code just to make sure everything was FRESH.

Verifying File Hash
Here's the current hash of the Auth_phpbb.php file: 4042ba8caa73885b768f3d1cccaa894e3c1e22e5

Error Behavior
I still have the same issue as initially described. When I click on my wiki link from phpBB, I am brought to the wiki main page. I see "Log in" in the top right corner, whereas SSO used to work and I would see Ekzim there. When selecting my username from a link where we have player bios that would showcase the user's page, I am given an error message this time through Mediawiki, so this is progress I think! No errors are being captured via apache in the error_log in the wiki directory.

Mediawiki Errors (Pastebin)
Pastebin of errors generated via Mediawiki (nothing now showing for my wiki directory's error_log file)
https://pastebin.com/xgakCwGq

What I find interesting from the generated output from Mediawiki at this point is this snippet:

Original exception: [WRh3ka3m-MIAA8N4Sm4AAACF] /wiki/index.php/User:Ekzim Exception from line 688 of /home/username/public_html/ImagineCraft/wiki/extensions/Auth_phpbb.php: Unable to find phpbb's utf_tools.php file at (home/username/public_html/ImagineCraft/includes/utf/utf_tools.php). Please check that phpBB is installed.

I manually went and checked to make sure the path was correct, and it is. I actually have the includes/utf/utf_tools.php file there. I even went so far as to download the complete phpBB 3.2 package, extract the file, and replace the one that I did have, yet I still generate the same error message.

LocalSettings.php
My localsettings looks like this: https://pastebin.com/qTSrcXCh (obviously with some items redacted/modified, but the gist of it is there). IF you need the entire localsettings php, let me know.

Thanks again for your assistance. I look forward to your reply.

from mediawiki_phpbb_auth.

C4K3 avatar C4K3 commented on July 17, 2024

First off just to be clear, this extension is not phpbb SSO, that's a separate extension (which is also incompatible with this one.) So you will have to log in on mediawiki as well as phpbb separately (they don't use a single session.)

The file hash looks ok.

Reading that error, it sounds like #26, but the version you're using should have fixed that issue. Could you try with and without an ending slash on the PathToPHPBB setting? That's the only thing I can think of right now.

Oh and also make sure your web user has permissions for that file.

from mediawiki_phpbb_auth.

Ekzim avatar Ekzim commented on July 17, 2024

C4k3,
Thanks for the clarification. I initially had a trailing slash, but I omitted it and still run into the same issue. When you state to check my permissions on a file, which file are you referencing, utf_tools.php?

from mediawiki_phpbb_auth.

C4K3 avatar C4K3 commented on July 17, 2024

Yes the utf_tools.php file, but also the directory it's in.

from mediawiki_phpbb_auth.

Ekzim avatar Ekzim commented on July 17, 2024

utf_tools.php was chmod as 644 and the directory, includes was 755. I just set the directory and all recursive files and directories to 755. Still no change. :/

from mediawiki_phpbb_auth.

C4K3 avatar C4K3 commented on July 17, 2024

Ah! I was just able to reproduce it on my own install, it's because the path is absolute. It works if you give it as a relative path. That is of course a bug in the extension, and I'll try to get it fixed.

from mediawiki_phpbb_auth.

Ekzim avatar Ekzim commented on July 17, 2024

Interesting that you mention that because I had tried it both with a relative path at first and then thought, well let me try with an absolute one, and I ran into the same problem; however, since I've been making other changes and not reversed to a relative path, let me revert that change and see what happens.

from mediawiki_phpbb_auth.

Ekzim avatar Ekzim commented on July 17, 2024

Alright double check I'm not going crazy here. I'm think I'm to that point where I've been digging through configs too long and I'm losing my mind. Maybe I just need more coffee.

Directory Structure
This is my parent directory for my domain and where phpBB resides (ImagineCraft) and mediawiki (wiki) sits inside my phpbb (ImagineCraft) folder.
/home/username/public_html/ImagineCraft/
/home/username/public_html/ImagineCraft/wiki/
/home/username/public_html/ImagineCraft/wiki/extensions/Auth_phpbb.php

/home/username/public_html/ImagineCraft/wiki/LocalSettings.php path:
$wgAuth_Config['PathToPHPBB'] = '../';

Selecting a username to view the user page throws an error.

Error log file (not being captured in MediaWiki, back to Apache error_log file in wiki directory)
[14-May-2017 17:07:40 UTC] PHP Fatal error: Call to a member function bind_param() on boolean in /home/username/public_html/ImagineCraft/wiki/extensions/Auth_phpbb.php on line 507

Except of code from ~Line 507 in /home/username/public_html/ImagineCraft/wiki/extensions/Auth_phpbb.php

// Query Database.
$fresStatement = $fresMySQLConnection->prepare($fstrMySQLQuery);
$fresStatement->bind_param('s', $username);
$fresStatement->execute();

from mediawiki_phpbb_auth.

C4K3 avatar C4K3 commented on July 17, 2024

Ok, the error you're getting there is that the SQL connection can't be established, so I think that's at least progress. That means it's not getting your database information properly from phpbb, the fix for that is to set UseExtDatabase to true, and then manually input the database info into LocalSettings.php ($wgAuth_Config['MySQL_Host'] = whatever)

from mediawiki_phpbb_auth.

Ekzim avatar Ekzim commented on July 17, 2024

This just keeps getting weirder. For grins, I set the ExtDatabse to true, uncommented out the SQL connection lines and tried it and it's the same thing.

But, I know they are shared, and I even just went and double checked to be 100% positive I have MediaWiki and phpBB together, and I do: http://imgur.com/a/vnPsg

[14-May-2017 17:29:00 UTC] PHP Fatal error: Call to a member function bind_param() on boolean in /home/username/public_html/ImagineCraft/wiki/extensions/Auth_phpbb.php on line 507

from mediawiki_phpbb_auth.

Ekzim avatar Ekzim commented on July 17, 2024

WAIT, I need to fix my table prefixes in the config file. I just saw I'm not using phpbb3 as a prefix!

Okay, so my schema was set to have "phpbb_" as my table prefix not phpbb3 and unfortunately, I was a dummy and rolled with the default instead of verifying that was indeed my actual table prefix.

Now, the player/username pages are displaying. So that's awesome!

Now, I just need to figure out why the log in function isn't working and I'm not sure if that's you or my needing to change behaviors with MediaWiki itself.

from mediawiki_phpbb_auth.

Ekzim avatar Ekzim commented on July 17, 2024

C4K3,
Thanks for all your help. You can either reply here or drop me a line at ekzim.mc@gmail with your paypal email. I'd like to drop you a few bucks for your help today. The only bug in this entire post is the absolute path. I managed to figure out what was causing the login function to act all weird and it was probably due to using some old phpbb auth sequence or previous SSO modification that is no longer doing its job.

If anyone else runs into this, I had the following in my localsettings.php, which I've now commented out. I can now have users log in and edit pages that are defined in my groups.

/*
function noLoginLogOUt(&$list) {
unset( $list['Userlogout'] );
unset( $list['Userlogin'] );
return true;
}

$wgHooks['SpecialPage_initList'][]='noLoginLogOUt';
*/

from mediawiki_phpbb_auth.

Digitalroot avatar Digitalroot commented on July 17, 2024

Good Job C4K3.

from mediawiki_phpbb_auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.