[Pushed] curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values
#1
Hi,
I try updating from 1810 to 1811 (with changed files) So.... Congratulations, your copy of MyBB has successfully been updated to 1.8.11
But in top of the "MyBB Installation Wizard" page:


Warning [2] curl_setopt_array(): Array keys must be CURLOPT constants or equivalent integer values - Line: 6889 - File: inc/functions.php PHP 5.6.30 (Linux)
File
Line
Function[PHP]
 
errorHandler->error
/inc/functions.php
6889
curl_setopt_array
/inc/tasks/versioncheck.php
23
fetch_remote_file
/inc/functions_task.php
88
task_versioncheck
/install/upgrade.php
639
run_task
/install/upgrade.php
382
upgradedone
Warning [2] curl_setopt_array(): Array keys must be CURLOPT constants or equivalent integer values - Line: 6889 - File: inc/functions.php PHP 5.6.30 (Linux)
File
Line
Function[PHP]
 
errorHandler->error
/inc/functions.php
6889
curl_setopt_array
/inc/class_feedparser.php
46
fetch_remote_file
/inc/tasks/versioncheck.php
64
FeedParser->parse_feed
/inc/functions_task.php
88
task_versioncheck
/install/upgrade.php
639
run_task
/install/upgrade.php
382
upgradedone


   




and any time trying to check for update from ACP. (version_check) i got same error and mail:
Your copy of MyBB running on (http://site.com) has experienced an error. Details of the error include:
---
Type: 2
File: inc/functions.php (Line no. 6889)
Message
curl_setopt_array(): Array keys must be CURLOPT constants or equivalent integer values
-
Reply
#2
Can you post the version displayed under cURL Information (curl section) in ACP: Tools & Maintenance → View PHP Info?

Do you have the possibility of upgrading your PHP version?
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply
#3
I use PHP 7.1.3 and don't have this issue. If this requires PHP 7 to work though, I think the code needs to change because we shouldn't change the minimum PHP version required in a minor release.
Reply
#4
(2017-04-05, 12:35 AM)dragonexpert Wrote: I use PHP 7.1.3 and don't have this issue.  If this requires PHP 7 to work though, I think the code needs to change because we shouldn't change the minimum PHP version required in a minor release.

We've encountered a similar issue with CURLOPT_CONNECT_TO because some popular PHP packages turned out to be compiled with outdated versions of curl, which is why there's an additional check for the curl version here: https://github.com/mybb/mybb/blob/mybb_1....php#L6870

If the cause is the same here, we'll update the check for CURLOPT_RESOLVE to
elseif(version_compare(PHP_VERSION, '5.5', '>=') && version_compare($curl_version, '7.21.3', '>='))
in the next version.
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply
#5
(2017-04-05, 12:01 AM)Devilshakerz Wrote: Can you post the version displayed under cURL Information (curl section) in ACP: Tools & Maintenance → View PHP Info?

curl
cURL support enabled
cURL Information 7.53.1



(2017-04-05, 12:01 AM)Devilshakerz Wrote: Do you have the possibility of upgrading your PHP version?

Current Stable PHP 5.6.30
-
Reply
#6
eh ? how to solve it ??

$context = stream_context_create([ from line 6100
Reply
#7
^ if you have the same issue then provide your php version & curl version & wait for reply
Reply
#8
(2017-04-05, 12:01 AM)Devilshakerz Wrote: Can you post the version displayed under cURL Information (curl section) in ACP: Tools & Maintenance → View PHP Info?
cURL = 7.53.1
PHP = 5.6.30

(2017-04-05, 12:01 AM)Devilshakerz Wrote: Do you have the possibility of upgrading your PHP version?
Unfortunately no. The only version available in my CPanel is the version above.
Reply
#9
same issue

cURL 7.51.0
PHP 5.6.29
Reply
#10
Try replacing inc/functions.php with the one attached.


Attached Files
.php   functions.php (Size: 207.53 KB / Downloads: 295)
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)