Yogesh Jalodara
Yogesh Jalodara

Reputation: 53

curl settings for ebay GetOrders api

I want to fetch orders from my ebay seller account. I have integrated successfully on my local but when i hosted it to live then it gives error like :

Warning: curl_exec() has been disabled for security reasons in /home/GetOrders/get-common/eBaySession.php on line 74 Error sending request

when i see my phpinfo() it gives curl enabled. and I'm sure it's enabled because i'm using one another api with curl in my site as well.

help me please to get out from this. Thanks

Upvotes: 2

Views: 277

Answers (2)

marmeladze
marmeladze

Reputation: 6564

look your php.ini file if curl_exec is listed inside disable_functions. if yes, remove it.

ex.

$ locate php.ini
/etc/php/7.0/apache2/php.ini
/etc/php/7.0/cli/php.ini
/etc/php/7.0/fpm/php.ini
/usr/lib/php/7.0/php.ini-development
/usr/lib/php/7.0/php.ini-production
/usr/lib/php/7.0/php.ini-production.cli
$ cat /etc/php/7.0/apache2/php.ini  | grep disable_functions
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,\
pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,\
pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,\
pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,\ pcntl_exec,pcntl_getpriority,pcntl_setpriority,

Upvotes: 0

Gabe Hiemstra
Gabe Hiemstra

Reputation: 269

The module might be activated, but it could be in the disabled list. According to this answer,

There is a php.ini directive called disable_functions. Functions added to this list will be disabled by PHP and when you try to execute those functions, you get this error. As mentioned, in all probability your hosting provider has added exec to the disabled list.

Upvotes: 1

Related Questions