Expand my Community achievements bar.

SOLVED

Trouble With External Authentication!

Avatar

Former Community Member

Hello all!

I have been trying to experiment with external authentication with PHP using the samples provided with the LCCS SDK Navigator.

I have changed the "index.php" page to include all my account info. and have double checked it!  However, when I upload it to my server, I keep getting the following error(s) whenever I click the submit button on the form:

Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /home/tueslcom/public_html/LoginTest2/lccs.php on line 690

Warning: fopen(https://collaboration.adobelivecycle.com/myusername?mode=xml&accountonly=true&) [function.fopen]: failed to open stream: no suitable wrapper could be found in/home/tueslcom/public_html/LoginTest2/lccs.php on line 690

Fatal error: Uncaught exception 'RTCError' with message 'connection-failed' in /home/tueslcom/public_html/LoginTest2/lccs.php:695 Stack trace: #0 /home/tueslcom/public_html/LoginTest2/lccs.php(587): RTC::http_get('https://collabo...', Array) #1 /home/tueslcom/public_html/LoginTest2/lccs.php(254): RTCAccount->do_initialize() #2 /home/tueslcom/public_html/LoginTest2/index.php(33): RTCAccount->__construct('https://collabo...') #3 {main} thrown in /home/tueslcom/public_html/LoginTest2/lccs.php on line 695

I have a bit of experience with PHP, however, going through lccs.php and trying to reverse engineer everything to find out what`s going on is a little beyond my skill level!  Any idea what might be happening/missing here?  This seems like it should be a no-brainer!

Thanks in advance for any help anyone can give.

Matt

1 Accepted Solution

Avatar

Correct answer by
Employee

No, it's really that on some system curl works and streams don't and on some curl doesn't work.

I picked the "stream way" as default because that's what worked on my machine

There is really no difference in the way the two methods work, they both do https requests similarly and curl is one of the best http clients available anyway.

-- Raffaele

View solution in original post

7 Replies

Avatar

Employee

I'll give you my standard answer: you probably don't have the ssl module enabled.

Check the apache error log (or the equivalent if you are using a different server) fir more info.

Also, call phpinfo() and make sure all the requires modules are there (search the forum, there should be more details for what to look for)

Sent from my iPhone

Avatar

Former Community Member

Raff,

Thanks for your quick reply!

I called phpinfo() and it appears that OpenSSL is working:

OpenSSL Support - enabled

OpenSSL Support - OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

Is SSL needed for encrypted communications between the browser and the LCCS server?  When it comes to ports, security, and all the headaches that go with it, I am pretty much a NOOB (by choice)!

Also, the forum search doesn`t seem to be working (at least it`s not returning anything for me).  Any hints as to what other modules are needed?

btw - Is it "http://connectnow.acrobat.com" or "https://collaboration.adobelivecycle.com"?

And it seems that "lccs.php" had been renamed from "afcs.php" along with "RTCAccount", which used to be "AFCSAccount".  The code examples have not been updated to reflect this, and although I fixed this in some of the code, could there still be problems inside "lccs.php"?

Thanks again,

Matt

Avatar

Employee

Matt, you need to have the following "stuff" (from phpinfo) :

Registered PHP Streams: php, file, http, ftp, compress.bzip2, compress.zlib, https, ftps

Registered Stream Socket Transports: tcp, udp, unix, udg, ssl, sslv3, sslv2, tls

Basically php needs to know how to process "https" streams (yes, for encrypted communication with the server).

You can also try to switch from streams to curl (set RTC::$USE_CURL = true in your code).

And again, the Apache error logs should tell you exactly what's going on.

-- Raffaele

Avatar

Former Community Member

Raff,

Thank you so much!

I checked phpinfo and all registered php streams are there except "compress.bzip2".

Everything else is set up fine.  Hmm...this is strange!

Is using curl less secure?  If not, then maybe I`ll use that!

Thanks again,

Matt

Avatar

Former Community Member

Raff,

OMG!!!  Thank you!

Just adding "RTC::$USE_CURL = true;" made it work!

I just had one last question.  The way you made it sound in your last post was that setting $USE_CURL=true was some sort of secondary option to using streams.  I obviously want to use the best, most secure method for external authentication and room management.  Is it ok to do it this way, or are streams better?  Or, am I totally misunderstanding this altogether ; )

Thanks a lot!

Matt

Avatar

Employee

No, using curl is as secure as the other way. It's just that on some systems / versions one way works and the other doesn't

Avatar

Correct answer by
Employee

No, it's really that on some system curl works and streams don't and on some curl doesn't work.

I picked the "stream way" as default because that's what worked on my machine

There is really no difference in the way the two methods work, they both do https requests similarly and curl is one of the best http clients available anyway.

-- Raffaele