Share Login credential with phpBB

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Bishu
User
Posts: 429

Share Login credential with phpBB

Post by Bishu »

My phpmaker code is working on the main domain and I have install the phpBB in the sub-domain.

Now I want to share the login credential with phpBB
that means when any user login to the PHPMaker website then he can use the phpBB (it should also login phpBB)
any member should not allow to login phpBB only the PHPmaker user should allow.

Anyone can help me .

Thanks in advance.


mobhar
User
Posts: 11702

Post by mobhar »

Assume you are using v2017, try to put this code at the top of .php file of your phpBB side:

<?php
if (session_id() == "") session_start(); // Init session data
ob_start(); // Turn on output buffering
?>
<?php include_once "ewcfg13.php"; // <-- adjust the location to the actual path ?>
<?php include_once "phpfn13.php"; // <-- adjust the location to the actual path ?>
<?php
if (!IsLoggedIn()) { // <-- check whether not logged in from PHPMaker generated site
echo "Access denied, please <a href='login.php'>login</a> ...<br>";
} else {
echo "<h1>Welcome to the phpBB side ...</h1>";
}
?>


Bishu
User
Posts: 429

Post by Bishu »

Thanks mobhar, for the help.

here I don't want to maintain the user database at phpBB.
means no separate username and password of phpBB.

When my client login to PHPMaker v2017 it should also automatically login the phpBB and use the service.
the client should not login separately on the phpBB.

Sorry for my bad English.


mobhar
User
Posts: 11702

Post by mobhar »

Then you need to learn the business-logic in phpBB side. You have to know how they implement the user session login that similar to PHPMaker web app side.


Bishu
User
Posts: 429

Post by Bishu »

I have put the following code

if (session_id() == "") session_start(); // Init session data
ob_start(); // Turn on output buffering
include_once "../ewcfg14.php"; // <-- adjust the location to the actual path
include_once "../phpfn14.php"; // <-- adjust the location to the actual path
if (!IsLoggedIn()) { // <-- check whether not logged in from PHPMaker generated site
ob_end_clean();
header("Location: myurl");
exit();
}

I got a error message as
Fatal error: Class 'GD' not found in /home/****/public_html/****/member/phpfn14.php on line 7460


Webmaster
User
Posts: 9427

Post by Webmaster »

Note that class GD (not PHP gd extension) is in PHPThumb.php.


Bishu
User
Posts: 429

Post by Bishu »

Thanks I got it class GD is in \phpinc\PHPThumb.php on the line no. 163

Now how can I handled this error

Bishu wrote:
I got a error message as
Fatal error: Class 'GD' not found in
/home/****/public_html/****/member/phpfn14.php on line 7460


arbei
User
Posts: 9354

Post by arbei »

Make sure you uploaded the file "PHPThumb.php" under the folder "/home/****/public_html/****/member/phpinc/" and try again.


Post Reply