Google CurlIO client requires the CURL PHP extension (Google Calendar API) - php

I am new to using google calendar api and I need help with this issue. I worked on a php code, let us call this cal.php, and I opened it up on my website. On my website, I get this error, Fatal error: Uncaught exception 'Exception' with message 'Google CurlIO client requires the CURL PHP extension' in my directory.
To fix this issue, I downloaded curl and in my command line, when I type 'curl', I don't get an error message. However, the problem occurs when I ssh into my website and try typing in the word curl. I get this message curl: command not found. I tried putting my curl.exe and libssh2.dll in my website directory but that didn't work out. Any help is appreciated.
I have a windows 8 and I have php but I use iis 8.

Have you checked the php.ini file - make sure there is not a semi colon before the following line.
extension=php_curl.dll

Related

GuzzleHttp\Exception\RequestException: cURL error 0 -- IIS -- Windows 10 -- PHP V 7+

Enabled app insights on php project, it is working on host machine. However, during running the same code on local box getting following error: [seems some IIS config issue or update not sure]
Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 0: The cURL request was retried 3 times and did not succeed. The most likely reason for the failure is that cURL was unable to rewind the body of the request and subsequent retries resulted in the same error. Turn on the debug option to see what went wrong. See https://bugs.php.net/bug.php?id=47204 for more information. (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in ....\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 186
and
Warning: curl_setopt_array(): Unable to create temporary file. in ....\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 56
Trace:
trace while running an application from IIS
check the plugins and look through the debug.log file in wp-content and most likely it is a plugin that is causing this issue. I found that Mailjet causes this issue when unconfigured. Simply activate the plugins found in the error log and this will help solve it. The Microsoft version of cURL in PHP will throw the error and the Linux variant will not.

Error HTTP_Request2 in Tesco Api php script

Note: Beginner to php and programming on web databases.
I am trying to implement the Tesco API on the 000webhost webhosting site. I've copied the PHP script at the Tesco labs page, put it in the database at 000webhost where I call it with the index.php script, however when I tried to implement the code, it gives me this error:
Warning: require_once(HTTP/Request2.php): failed to open stream: No such file or directory in /storage/ssd4/772/1967772/public_html/tesco_api.php on line 3
Fatal error: require_once(): Failed opening required 'HTTP/Request2.php' (include_path='.:/usr/share/pear:/usr/share/php') in /storage/ssd4/772/1967772/public_html/tesco_api.php on line 3
From the error message, the culprit is this line in the Tescolab API script:
require_once 'HTTP/Request2.php';
$request = new Http_Request2('https://dev.tescolabs.com/product/');
Which seems to give an error because of some missing pear installation (don't really understand this)
It seems impossible to install this pear thing on 000webhost, and I've tried searching for workarounds for the HTTP_Request2, such as by using curl, but I can't seem to find a working solution. I also couldn't understand what the comment in the Tesco API meant:
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
If someone could propose a solution to this issue, either with a curl workaround, or by managing to install the pear thing

Lua error - MediaWiki templates

After installing Scribunto (adding the extension to the folder and adding in LocalSettings the following code:)
require_once "$IP/extensions/Scribunto/Scribunto.php";
I have imported the Template:Infobox and Module:Infobox (along with the ones which come with those), and after testing a basic infobox I received the Script error -
Lua error: Internal error. Error reading from pipe.
Afterwards, I have done some research and I added the following line (in LocalSettings):
$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/binaries/lua5_1_4_Win64_bin/';
Then, the Script error changes to:
Lua error: Internal error: The interpreter exited with status 1.
I use Windows 10. How can I fix this?

S3Client gives fatal error - Fatal error: Class 'Aws\Common\Client\AbstractClient' not found

I have aws sdk in current directory. I have included sdk in file like this..
include("Aws/S3/S3Client.php");
use Aws\S3\S3Client;
class myClass{
}
It gives me fatal error like..
Fatal error: Class 'Aws\Common\Client\AbstractClient' not found in /somePath/Aws/S3/S3Client.php on line 117
Please help.
To avoid all these error while sending request or getting response from AWS, set up AWS SDK using http://aws.amazon.com/developers/getting-started/php/, or use
git clone https://github.com/awslabs/aws-php-sample.git
curl -sS https://getcomposer.org/installer | php
php composer.phar install
By installing AWS SDK in this way, you'll get a file at vendor/autoload.php
It'll take care of all the required files into the script.
I had the exact same issue and wasn't able to find an answer anywhere. So, in case anyone has the same problem in the future, for me it was simply a matter of using a version of AWS SDK that was incompatible with my PHP version.
Once I upgraded my server's PHP version it all worked fine.

PHP Fatal error: Class 'OAuth' not found in /var/www/html/twitters/TwitterAutoReply.php on line 24

I was setting up a Twitter auto reply bot on my VPS. When I ran the PHP script it gave me an error. Yes, obviously I installed the PECL OAuth extension, added the code to the php.ini file & even checked it to see if it was enabled by creating a phpinfo.php file. Still, nothing.
So I'm really confused here. I even rebooted the server & restarted apache but with no success. So what should I do? Here's the output when I run the script:
PHP Fatal error: Class 'OAuth' not found in
/var/www/html/twitters/TwitterAutoReply.php on line 24
root#Graffocp:/var/www/html/twitters#
Thanks for your help :)

Categories