MyBB Community Forums
[Pushed] curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Development (https://community.mybb.com/forum-161.html)
+--- Forum: MyBB 1.8 Development (https://community.mybb.com/forum-165.html)
+---- Forum: 1.8 Bugs and Issues (https://community.mybb.com/forum-157.html)
+----- Forum: Pushed (https://community.mybb.com/forum-183.html)
+----- Thread: [Pushed] curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values (/thread-209577.html)

Pages: 1 2


curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - OMID_HXC - 2017-04-04

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



RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - Devilshakerz - 2017-04-05

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?


RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - dragonexpert - 2017-04-05

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.


RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - Devilshakerz - 2017-04-05

(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_1811/inc/functions.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.


RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - OMID_HXC - 2017-04-05

(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


RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - gamemaster - 2017-04-05

eh ? how to solve it ??

$context = stream_context_create([ from line 6100


RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - .m. - 2017-04-05

^ if you have the same issue then provide your php version & curl version & wait for reply


RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - snakeoilos - 2017-04-05

(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.


RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - iso - 2017-04-05

same issue

cURL 7.51.0
PHP 5.6.29


RE: curl_setopt_array Array keys must be CURLOPT constants or equivalent integer values - Devilshakerz - 2017-04-05

Try replacing inc/functions.php with the one attached.