Skip to content

phpthumb fopen(): SSL operation failed with code 1. OpenSSL Error messages #172

@aldoexpert

Description

@aldoexpert

[v1.7.16]

Dear all,

if someone got error fopen(): SSL operation failed with code 1. OpenSSL Error messages and ssl use let's encrypt and domain can viewed normally,
but still got error that

I have solution for this
Open filename phpthumb.functions.php at line 824 - 825 like show bellow
ob_start();
if ($fp = fopen($url, 'rb') {

Change to like this
ob_start();
$opts = array(
"ssl" => array(
"verify_peer" => false,
"verify_peer_name" => false,
),
);
if ($fp = fopen($url, 'rb', false, stream_context_create($opts))) {

and Error fopen ssl is gone
Thanks

Sir @JamesHeinrich maybe you can add this for next release. Thanks

This show for error at debug
` * phpThumb() v1.7.16-202012161640
http://phpthumb.sourceforge.net

Error opening "https://........../foto/12.png?_=20210309222933":

CURL available but returned no data; UNKNOWN[2]
fopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
File: /home/aldo/........../external/phpThumb/phpthumb.functions.php
Line: 825

UNKNOWN[2]
fopen(): Failed to enable crypto
File: /home/aldo/........../external/phpThumb/phpthumb.functions.php
Line: 825

UNKNOWN[2]
fopen(https://........../foto/12.png?_=20210309222933): failed to open stream: operation failed
File: /home/aldo/........../external/phpThumb/phpthumb.functions.php
Line: 825; "allow_url_fopen" enabled but returned no data (UNKNOWN[2]
fopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
File: /home/aldo/........../external/phpThumb/phpthumb.functions.php
Line: 825

UNKNOWN[2]
fopen(): Failed to enable crypto
File: /home/aldo/........../external/phpThumb/phpthumb.functions.php
Line: 825
`
Sorry some text are censored by me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions