Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 2015 17:59:25 +0000
From:      Kaya Saman <kayasaman@gmail.com>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Anyone running phpBB3 with oauth for Google and Facebook?
Message-ID:  <1421776765.3146.22.camel@gmail.com>

Next in thread | Raw E-Mail | Index | Archive | Help
Hi,

I'm wondering if anyone has setup phpBB3.1 on FreeBSD and authentication
with Facebook and Google?

Currently I am attempting to test on both Apache24 and Nginx but not
having any luck with any of them.

The basic forum and authentication works fine without any issues however
the issue begins with external based oauth. It simply returns a white
screen after going through login procedures from FB/Google.

I have setup both FB/Google backends and have client ID's and Secrets
for each.

Php version being run is 56 built from ports and am using a Postgresql
backend. With Nginx I have php-fpm and of course Apache24 has a module
for php.

Both logs suggest a similar issue and taking the Apache24 log as an
example it is showing me this:


[Tue Jan 20 17:05:05.791147 2015] [:error] [pid 10133] [client
<IP>:13630] PHP Fatal error:  Uncaught exception 'OAuth\\Common\\Http\
\Exception\\TokenResponseException' with message 'Failed to request
resource.'
in /usr/local/www/phpBB3/vendor/lusitanian/oauth/src/OAuth/Common/Http/Clie=
nt/StreamClient.php:54\nStack trace:\n#0 /usr/local/www/phpBB3/vendor/lusit=
anian/oauth/src/OAuth/OAuth2/Service/AbstractService.php(97): OAuth\\Common=
\\Http\\Client\\StreamClient->retrieveResponse(Object(OAuth\\Common\\Http\\=
Uri\\Uri), Array, Array)\n#1 /usr/local/www/phpBB3/phpbb/auth/provider/oaut=
h/service/facebook.php(69): OAuth\\OAuth2\\Service\\AbstractService->reques=
tAccessToken('AQBuYcGxf76_8oa...')\n#2 /usr/local/www/phpBB3/phpbb/auth/pro=
vider/oauth/oauth.php(198): phpbb\\auth\\provider\\oauth\\service\\facebook=
->perform_auth_login()\n#3 /usr/local/www/phpBB3/phpbb/auth/auth.php(937): =
phpbb\\auth\\provider\\oauth\\oauth->login('', '')\n#4 /usr/local/www/phpBB=
3/includes/functions.php(2831): phpbb\\auth\\auth->login('', '', false, 1, =
0)\n#5 /usr/local/www/phpBB3/ucp.php(84): login_box('index.php')\n#6 {main}=
\n  thrown in /usr/local/www/phpBB3/vendor/lusitanian/oauth/src/OAuth/Commo=
n/Http/Client/StreamClient.php on line 54, referer: http://<phpbb>:85/ucp.p=
hp?mode=3Dlogin
[Tue Jan 20 17:06:05.795329 2015] [:error] [pid 10135] [client
192.168.0.119:47111] PHP Fatal error:  Uncaught exception 'OAuth\\Common
\\Http\\Exception\\TokenResponseException' with message 'Failed to
request resource.'
in /usr/local/www/phpBB3/vendor/lusitanian/oauth/src/OAuth/Common/Http/Clie=
nt/StreamClient.php:54\nStack trace:\n#0 /usr/local/www/phpBB3/vendor/lusit=
anian/oauth/src/OAuth/OAuth2/Service/AbstractService.php(97): OAuth\\Common=
\\Http\\Client\\StreamClient->retrieveResponse(Object(OAuth\\Common\\Http\\=
Uri\\Uri), Array, Array)\n#1 /usr/local/www/phpBB3/phpbb/auth/provider/oaut=
h/service/facebook.php(69): OAuth\\OAuth2\\Service\\AbstractService->reques=
tAccessToken('AQDazjJE3srAEf_...')\n#2 /usr/local/www/phpBB3/phpbb/auth/pro=
vider/oauth/oauth.php(198): phpbb\\auth\\provider\\oauth\\service\\facebook=
->perform_auth_login()\n#3 /usr/local/www/phpBB3/phpbb/auth/auth.php(937): =
phpbb\\auth\\provider\\oauth\\oauth->login('', '')\n#4 /usr/local/www/phpBB=
3/includes/functions.php(2831): phpbb\\auth\\auth->login('', '', false, 1, =
0)\n#5 /usr/local/www/phpBB3/ucp.php(84): login_box('index.php')\n#6 {main}=
\n  thrown in /usr/local/www/phpBB3/vendor/lusitanian/oauth/src/OAuth/Commo=
n/Http/Client/StreamClient.php on line 54, referer: http://<phpbb>:85/ucp.p=
hp?mode=3Dlogin&sid=3D7447624df297b6f14e910e7531a5521e


The general config file for Apache vhost is this:

<VirtualHost *:85>
    DocumentRoot /usr/local/www/phpBB3
    ServerName <forum>

<Directory /usr/local/www/phpBB3/>

    AddHandler application/x-httpd-php .php
    DirectoryIndex index.php
    Options +FollowSymLinks
    Require all granted
    AllowOverride None

</Directory>

</VirtualHost>


Originally I installed phpbb3 from @ports however, the version there is
3.0.x so I grabbed the latest version directly from the phpbb site which
is 3.1.x.


Would anyone be able to suggest what might be wrong or even better a
fix??

Btw it is intentional for the site to be running on port 85 as it's only
a throw-away demo test instance.

Thanks.



Kaya




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?1421776765.3146.22.camel>