Osclass Support Forums

General osclass questions => General discussion => Topic started by: Marius on April 28, 2022, 10:07:25 PM

Title: ssl error_log
Post by: Marius on April 28, 2022, 10:07:25 PM
Hello
how can i fix it?

Osclass version: 8.0.1


[28-Apr-2022 01:52:49 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 05:00:42 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 05:00:44 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 05:28:29 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 05:58:14 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 06:27:33 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 06:57:07 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 08:44:27 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 09:09:04 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 09:09:04 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 09:31:48 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 09:54:28 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 10:52:18 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 13:28:47 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 13:49:54 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 14:09:56 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 14:09:56 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 15:48:27 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 16:29:47 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 16:51:33 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 17:14:04 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 17:37:45 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 18:44:15 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 19:30:37 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 20:41:23 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[28-Apr-2022 21:55:45 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
Title: Re: ssl error_log
Post by: MB Themes on April 28, 2022, 10:24:59 PM
Have you checked it with hosting?
Title: Re: ssl error_log
Post by: Marius on April 28, 2022, 10:40:19 PM
no, I said to ask here for the first time
Title: Re: ssl error_log
Post by: MB Themes on April 29, 2022, 09:22:52 AM
It does not sound like related to Osclass.
Title: Re: ssl error_log
Post by: Marius on April 29, 2022, 06:43:06 PM
I talked to the hosting people and they said that everything is fine with them
they said to talk to you
 ;D ;D
so
Title: Re: ssl error_log
Post by: mwindey on April 30, 2022, 07:31:17 AM
Maybe this is the problem? Try another ssl certificate... https://php.bubble.ro/php-warnings/php-warning-fsockopen-unable-to-connect-connection-timed-out/
Title: Re: ssl error_log
Post by: MB Themes on April 30, 2022, 08:06:06 AM
@mwindey
Thanks for sharing, looks like identical issue  :-*
Title: Re: ssl error_log
Post by: mwindey on April 30, 2022, 02:59:19 PM
@MB Themes

Welcome ;) Hopefully it solves the issue.....
Title: Re: ssl error_log
Post by: dsf on April 30, 2022, 05:48:13 PM
We occasionally have this error and we do NOT run Osclasspoint (yet, because we have upgrade issues).

This is either a hosting issue or a legacy Osclass issue, who knows. Nothing to do with certificates.

In our case it happens in classes/utils.php and i guess it is related to some cron or other automated service.
Title: Re: ssl error_log
Post by: Marius on April 30, 2022, 07:17:57 PM
I don't think it works
 :-[
/public_html/oc-includes/osclass/utils.php on line 363
[30-Apr-2022 20:16:38 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to :0 (Failed to parse address "") in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 363
[30-Apr-2022 20:16:38 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to :0 (Failed to parse address "") in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 363
[30-Apr-2022 20:16:38 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to :0 (Failed to parse address "") in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 363
[30-Apr-2022 20:16:39 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to :0 (Failed to parse address "") in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 363
[30-Apr-2022 20:16:40 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to :0 (Failed to parse address "") in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 363
[30-Apr-2022 20:16:40 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to :0 (Failed to parse address "") in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 363
[30-Apr-2022 20:16:41 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to :0 (Failed to parse address "") in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 363
[30-Apr-2022 20:16:41 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to :0 (Failed to parse address "") in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 363
Title: Re: ssl error_log
Post by: mwindey on May 01, 2022, 10:19:30 AM
@Marius

Is your utils.php file correct?
line 362 and 363 are empty spaces..
Starting from lin 332 to line 361 i have the following code:

Code: [Select]
  // extract host, path, port:
  $host = $url['host'];
  $path = $url['path'];
  $port = 80;
  if (isset($url['port'])) {
    $port = $url['port'];
  }

  if (isset($url['scheme']) && $url['scheme'] === 'https') {
    $host = 'ssl://' . $host;
    $port = 443;
  }
  $fp = fsockopen($host, $port);

  if ($fp === false) {
    return false;
  }
  $data        = http_build_query($_data);
  $out         = 'POST ' . $path . ' HTTP/1.1' . PHP_EOL;
  $out         .= 'Host: ' . $url['host'] . PHP_EOL;
  $out         .= 'Referer: Osclass ' . osc_version() . PHP_EOL;
  $out         .= 'Content-type: application/x-www-form-urlencoded' . PHP_EOL;
  $out         .= 'Content-Length: ' . strlen($data) . PHP_EOL;
  $out         .= 'Connection: close' . PHP_EOL . PHP_EOL;
  $out         .= $data;
  $number_bytes_sent = fwrite($fp, $out);
  fclose($fp);

  return $number_bytes_sent; // or false on fwrite() error
}
Title: Re: ssl error_log
Post by: Marius on May 01, 2022, 02:25:34 PM
I put the correct code :-X
I think I'm overwhelmed by the situation
you can write me the code as you think it would work
Maybe I'm wrong somewhere :-\


Title: Re: ssl error_log
Post by: mwindey on May 01, 2022, 03:24:10 PM
@Marius

In your latest post the error shows fsockopen(): unable to connect to :0  - Port 0 should be 80 i think....
Anyway:

I have uploaded  the original file to my server so try to download it and replace yours... Download here: https://deetje.be/doc/utils.rar (https://deetje.be/doc/utils.rar)
Title: Re: ssl error_log
Post by: Marius on May 01, 2022, 05:58:51 PM
the error is gone
Thank you very much 8)
 :P :P :P :P :P :P
I hope it doesn't show up again


Title: Re: ssl error_log
Post by: Marius on May 01, 2022, 07:33:59 PM
 :-[
surprise
[01-May-2022 20:22:13 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
Title: Re: ssl error_log
Post by: mwindey on May 02, 2022, 10:26:57 AM
@Marius

Try this:  In file utils.php search for:

Code: [Select]
  $fp = fsockopen($host, $port);

  if ($fp === false) {
    return false;
  }

And replace with:

Code: [Select]
if($fp = @fsockopen($host, $port, $errno, $errstr, $timeout)) {   
return true;
}else{
return false;
}
Title: Re: ssl error_log
Post by: Marius on May 03, 2022, 06:49:37 PM
@mwindey
thank you again the error is gone
 8) 8) 8) 8) 8) 8) 8)
Title: Re: ssl error_log
Post by: MB Themes on May 03, 2022, 08:00:26 PM
@Marius
Its not gone, just hidden  :o
Title: Re: ssl error_log
Post by: Marius on May 03, 2022, 08:43:24 PM
can it be fixed? :-[
Title: Re: ssl error_log
Post by: MB Themes on May 04, 2022, 12:28:44 PM
@Marius
Based on posted articles, it is some kind of issue with ssl or certificate, no idea what it root cause and what is problem :D
Title: Re: ssl error_log
Post by: Marius on May 07, 2022, 01:14:09 PM
Osclass version: 8.0.2
the error started to be visible again
 :o
Title: Re: ssl error_log
Post by: mwindey on May 07, 2022, 03:13:14 PM
@Marius,

8.02 has overwritten the file.
On line 344:
Code: [Select]
  $fp = fsockopen($host, $port);Replace with:
Code: [Select]
  $fp = fsockopen($host, $port, $errno, $errstr, $timeout = 30);And let us know what error this may show....
Otherwise it is possible to hide the error again with
Code: [Select]
  $fp = @fsockopen($host, $port);This last line hides the problem but is not solving the issue.
Title: Re: ssl error_log
Post by: Marius on May 07, 2022, 04:17:39 PM
I just announced 8)
Title: Re: ssl error_log
Post by: Marius on May 07, 2022, 08:13:46 PM
error occurs but very rarely
[07-May-2022 17:24:38 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[07-May-2022 19:20:53 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
Title: Re: ssl error_log
Post by: MB Themes on May 08, 2022, 09:37:09 AM
Yes it would not be also correct to hide it in osclass as it might hide important issues
Title: Re: ssl error_log
Post by: Marius on May 08, 2022, 02:42:14 PM
you're right
to leave the original file?
Title: Re: ssl error_log
Post by: Ivanko on May 11, 2022, 11:53:08 AM
Hi I had a similar issue on one of mine domain, and it is defenetly the server issue not osclass.
I have updated openssl package on server to solve the problem.
good luck  8)
Title: Re: ssl error_log
Post by: MB Themes on May 11, 2022, 04:36:09 PM
Hi I had a similar issue on one of mine domain, and it is defenetly the server issue not osclass.
I have updated openssl package on server to solve the problem.
good luck  8)

Thanks for sharing   :-*
Title: Re: ssl error_log
Post by: Marius on May 12, 2022, 10:01:48 PM
the problem has been solved .
thank you for help
Title: Re: ssl error_log
Post by: MB Themes on May 13, 2022, 07:58:03 PM
Cool, all problems solved before weekend :)
Title: Re: ssl error_log
Post by: Marius on May 17, 2022, 05:29:44 PM
truth
it started appearing again 8) 8)
 8) 8) 8) ;D
Title: Re: ssl error_log
Post by: pavini on May 17, 2022, 07:27:01 PM
Thanks @mwindey

Your code work for me ;)

Title: Re: ssl error_log
Post by: Marius on May 25, 2022, 03:51:18 PM
the page has dropped

Osclass Error
Osclass database server is not available. Need more help?

--error_log--
[24-May-2022 09:09:02 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 10:48:30 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 11:07:04 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 12:00:30 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 16:45:28 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 16:45:28 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 17:45:50 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 18:56:17 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 23:01:41 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 23:27:10 Europe/Bucharest] PHP Warning:  fsockopen(): unable to connect to ssl://pgn.ro:443 (Connection timed out) in /home/pgnro/public_html/oc-includes/osclass/utils.php on line 344
[24-May-2022 23:58:01 Europe/Bucharest] PHP Warning:  mysqli::query(): MySQL server has gone away in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 957
[24-May-2022 23:58:01 Europe/Bucharest] PHP Warning:  mysqli::query(): Error reading result set's header in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 957
[25-May-2022 00:17:19 Europe/Bucharest] PHP Warning:  mysqli::query(): MySQL server has gone away in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 957
[25-May-2022 00:17:19 Europe/Bucharest] PHP Warning:  mysqli::query(): Error reading result set's header in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 957
[25-May-2022 00:36:41 Europe/Bucharest] PHP Warning:  mysqli::query(): MySQL server has gone away in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 957
[25-May-2022 00:36:41 Europe/Bucharest] PHP Warning:  mysqli::query(): Error reading result set's header in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 957
[25-May-2022 00:48:00 Europe/Bucharest] PHP Warning:  mysqli::query(): MySQL server has gone away in /home/pgnro/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 957
Title: Re: ssl error_log
Post by: MB Themes on May 25, 2022, 04:07:57 PM
Looks like your database fly away
Title: Re: ssl error_log
Post by: Marius on May 25, 2022, 05:32:02 PM
Looks like the problem was with the hosting :'(
Title: Re: ssl error_log
Post by: rooman on August 19, 2022, 05:46:54 PM
This error is still in osclass 8.0.2

Quote
PHP Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/ffgrrrg/html/oc-includes/osclass/utils.php on line 344
PHP Warning: fsockopen(): unable to connect to search.yahooapis.com:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/ffgrrrg/html/oc-includes/osclass/utils.php on line 344
Title: Re: ssl error_log
Post by: mwindey on August 19, 2022, 06:12:31 PM
@rooman

https://forums.osclasspoint.com/all-in-one-seo-plugin/sitemap-generator-error/msg31502/#msg31502
Title: Re: ssl error_log
Post by: rooman on August 20, 2022, 04:28:28 PM
@rooman

https://forums.osclasspoint.com/all-in-one-seo-plugin/sitemap-generator-error/msg31502/#msg31502

I disabled this a while ago and the message expired
But now the problem is back
Shall I re-enable it?

Code: [Select]
function ping_engines(){
        osc_doRequest('http://www.google.com/webmasters/sitemaps/ping?sitemap='.urlencode(osc_base_url().'sitemap-index.xml'), array());
        osc_doRequest('http://www.bing.com/webmaster/ping.aspx?siteMap='.urlencode(osc_base_url().'sitemap-index.xml'), array());
      //osc_doRequest('http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid='.osc_page_title().'&url='.urlencode(osc_base_url().'sitemap-index.xml'), array());
        osc_doRequest('http://webmaster.yandex.ru/wmconsole/sitemap_list.xml?host='.urlencode(osc_base_url() . 'sitemap-index.xml'), array());
    }

//osc_doRequest('http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid='.osc_page_title().'&url='.urlencode(osc_base_url().'sitemap-index.xml'), array());
Title: Re: ssl error_log
Post by: MB Themes on August 23, 2022, 09:17:22 PM
Yahoo api is down.
Title: Re: ssl error_log
Post by: rooman on August 24, 2022, 01:28:13 PM
Yes, I know, I activated it
The problem is that it recurs every once in a while
disappear for a long time
then appear
Code: [Select]
function ping_engines(){
        osc_doRequest('http://www.google.com/webmasters/sitemaps/ping?sitemap='.urlencode(osc_base_url().'sitemap-index.xml'), array());
        osc_doRequest('http://www.bing.com/webmaster/ping.aspx?siteMap='.urlencode(osc_base_url().'sitemap-index.xml'), array());
        osc_doRequest('http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid='.osc_page_title().'&url='.urlencode(osc_base_url().'sitemap-index.xml'), array());
        osc_doRequest('http://webmaster.yandex.ru/wmconsole/sitemap_list.xml?host='.urlencode(osc_base_url() . 'sitemap-index.xml'), array());
    }
Title: Re: ssl error_log
Post by: mwindey on August 24, 2022, 02:05:57 PM
Why not just delete the whole line instead off backslashes.... yahooapis will never return so just throw it away
Cut line:
Code: [Select]
osc_doRequest('http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid='.osc_page_title().'&url='.urlencode(osc_base_url().'sitemap-index.xml'), array());
Title: Re: ssl error_log
Post by: MB Themes on August 26, 2022, 01:19:03 PM
@mwindey
Yes it will not come back ever :)