Saturday, 19 November 2016
  5 Replies
  1.9K Visits
0
Votes
Undo
I just migrated hosting providers. JEvents works fine except now I can't iCal feeds, either through the browser, or via url. It now returns:
file_get_contents() failed, try fsockopen
fsockopen: no connect (each url)

ical refresh url: http://countrysidebible.org/index.php?option=com_jevents&task=icals.reloadall
phpinfo: http://countrysidebible.org/phpinfo.php

allow_url_fopen is ON
allow_url_include is ON

Any Ideas? Is there some PHP setting or module I can tell my new hosting provider to enable?
Monday, 21 November 2016 09:10
·
#179002
0
Votes
Undo
It looks as though the connection to the secure URL doesn't work - we try Curl, file_get_contents and fsockopen. I would suggest you ask your webhost for advice on their server settings.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

Wednesday, 23 November 2016 16:03
·
#179177
0
Votes
Undo
Apparently it was some trouble with php 7. Here is what the tech said:

_________________________

Hello,

Thank you for contacting us. I would be happy to assist you with your file_get_contents() issue for https://api.serviceu.com/rest/events/occurrences?startDate=01/01/2015&endDate=01/01/2018&orgKey=4d75001a-517d-4d51-bb1a-578ec9404d4c&departmentIds=63667&format=ical .

By default , starting in PHP 5.6 , the verify peer SSL option is enabled for cURL transactions and cannot be disabled. The get_file_contents() function uses cURL to process the HTTPS request. I was able to get the test script I created to work by setting your PHP version to 5.5. The test script I used is located at the following URL: http://countrysidebible.org/imh-test.php

The error I received on PHP 5.6 is as follows:

[/home/count116]# php -q test2.php

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/count116/test2.php on line 12

Warning: file_get_contents(): Failed to enable crypto in /home/count116/test2.php on line 12

I was able to get the code to work on PHP 5.6 by adding some code modification to disable the SSL verifications. The script I created on PHP 5.6 is located at http://countrysidebible.org/imh-test2.php . If you require PHP 5.6 for your site you would have to have a developer correct the code on your website to disable the peer's SSL certificate during the HTTPS transaction. I apologize for any inconvenience this may cause.

I believe the PHP version should more than likely be set to 5.5 for this website, as the function works as intended. I did not see any issues at http://countrysidebible.org/index.php?option=com_jevents&task=day.listevents

___________________________


Is there any plan to make JEvents compliant with php7?
Thursday, 24 November 2016 13:49
·
#179212
0
Votes
Undo
It should work with php7 - my server uses php7 and I am able to sync the SSH calendars with no problems.

Can you give me a URL for one of your source calendars so I can see if its a problem with the source URL rather than your own server.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

Monday, 28 November 2016 21:08
·
#179397
0
Votes
Undo
All is working now. Turns out it was a quirk in the hosting provider's php.ini system: php 7.x will not take it's settings from the server root php.ini (but php 5.5 & 5.6 will). php 7.x must have a php.ini in the site root. I think this is just a quirk with my new hosting provider. Thanks for your advice.
  • Page :
  • 1
There are no replies made for this post yet.