PHP Warning: fsockopen(): Failed to enable crypto

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
sweboy
New Member
New Member
Posts: 2
Joined: Mon Jan 08, 2018 4:56 pm

PHP Warning: fsockopen(): Failed to enable crypto

Post by sweboy »

Hi!

After enabled the cert (SSL) in my virtual host webbserver on Linux Mint I get the below message when I open the "Module Manager" in the admin panel - "A problem occurred communicating whit the module server". Is it that the CMS can't use SSL internally for "Module Manager"? Or have I missed something? :)

PHP Warning: fsockopen(): unable to connect to ssl://www.domain.com:443 (Unknown error) in /var/www/html/modules/CmsJobManager/CmsJobManager.module.php on line 300, referer: http://www.domain.com

PHP Warning: fsockopen(): Failed to enable crypto in /var/www/html/modules/CmsJobManager/CmsJobManager.module.php on line 300 referer: http://www.domain.com

Br Daniel
jce76350
Beta Tester
Beta Tester
Posts: 2032
Joined: Mon May 29, 2006 1:20 pm
Location: Rouen

Re: PHP Warning: fsockopen(): Failed to enable crypto

Post by jce76350 »

I have the same error on a local server at the login page
PHP 7.0.27-0+deb9u1 + apache/2.4.25 (debian) linux 4.9.0-5-amd64 on x86_64

Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in .../modules/CmsJobManager/CmsJobManager.module.php on line 300

Warning: fsockopen(): Failed to enable crypto in ....modules/CmsJobManager/CmsJobManager.module.php on line 300

Warning: fsockopen(): unable to connect to ssl://localtracfoil.com:443 (Unknown error) in .../modules/CmsJobManager/CmsJobManager.module.php on line 300
Jean-Claude Etiemble
sweboy
New Member
New Member
Posts: 2
Joined: Mon Jan 08, 2018 4:56 pm

Re: PHP Warning: fsockopen(): Failed to enable crypto

Post by sweboy »

In my install of CMSMS 2.2.5 on a Linux Mint host, I made some changes
to this file:
/var/www/html/modules/CmsJobManager/CmsJobManager.module.php
since it showed up several times in the Apache error.log.

Code: Select all


And since my site has an Apache RewriteRule for visitors so they will
always use https, I had to make an exception for localhost, which is
the third line in this rewrite config:

RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !=localhost
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

This way CMSMS won't try to use https when making "loopback"
connections. There could be another (better) way to make it work but
I'm happy so far... hope it won't affect system security too much.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: PHP Warning: fsockopen(): Failed to enable crypto

Post by paulbaker »

sweboy, your post had a code hack which is not allowed in the forum, see section 14 of
viewtopic.php?f=40&t=76470

The code hack has been removed from your post. Thank you for your understanding.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Locked

Return to “CMSMS Core”