I've a problem with my app engine while I'm trying to implement Google+ PHP API , it gives me a fatal error in curl file "Goolge_IO.php" it's one of the library files which was provided on https://code.google.com/p/google-api-php-client/
Here's the detailed error
Fatal error: Uncaught exception 'Exception' with message 'Google CurlIO client requires the CURL PHP extension' in C:\Users\joker\Desktop\\plus\src\io\Google_CurlIO.php:47 Stack trace: #0 C:\Users\joker\Desktop\plus\src\Google_Client.php(106): Google_CurlIO->__construct() #1 C:\Users\joker\Desktop\plus\index.php(22): Google_Client->__construct() #2 C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php(100): require('C:\Users\joker\...') #3 {main} thrown in C:\Users\joker\Desktop\plus\src\io\Google_CurlIO.php on line 47
Open config file in - > google-api-php-client/src/config.php
on line 38 , You'll find :
// Which Authentication, Storage and HTTP IO classes to use.
Under it replace with this code :
// Which Authentication, Storage and HTTP IO classes to use.
'authClass' => 'Google_OAuth2',
'ioClass' => 'Google_HttpStreamIO',
'cacheClass' => 'Google_MemcacheCache',
// We need to configure fake values for memcache to work
'ioMemCacheCache_host' => 'does_not_matter',
'ioMemCacheCache_port' => '37337',
You want to read the Error again
'Google CurlIO client requires the CURL PHP extension'
Have you installed cURL? If you're running a Linux system, you want to use something like
apt-get install php5-curl
On Windows, assuming you're using something like XAMPP it will already have the cURL plugin existing in the files, and you'll want to uncomment the line
;extension=php_curl.dll
from your php.ini file.
Related
I've installed Phalcon and trying to create new project: phalcon project store. But instead of this I get these errors:
PHP Fatal error: Uncaught Error: Class "Phalcon\Config" not found in C:\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php:48
Stack trace:
#0 C:\Composer\vendor\phalcon\devtools\src\Commands\Builtin\Project.php(74): Phalcon\DevTools\Builder\Component\AbstractComponent->__construct(Array)
#1 C:\Composer\vendor\phalcon\devtools\src\Script.php(109): Phalcon\DevTools\Commands\Builtin\Project->run(Array)
#2 C:\Composer\vendor\phalcon\devtools\src\Script.php(148): Phalcon\DevTools\Script->dispatch(Object(Phalcon\DevTools\Commands\Builtin\Project))
#3 C:\Composer\vendor\phalcon\devtools\phalcon(65): Phalcon\DevTools\Script->run()
#4 {main}
thrown in C:\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php on line 48
Fatal error: Uncaught Error: Class "Phalcon\Config" not found in C:\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php:48
Stack trace:
#0 C:\Composer\vendor\phalcon\devtools\src\Commands\Builtin\Project.php(74): Phalcon\DevTools\Builder\Component\AbstractComponent->__construct(Array)
#1 C:\Composer\vendor\phalcon\devtools\src\Script.php(109): Phalcon\DevTools\Commands\Builtin\Project->run(Array)
#2 C:\Composer\vendor\phalcon\devtools\src\Script.php(148): Phalcon\DevTools\Script->dispatch(Object(Phalcon\DevTools\Commands\Builtin\Project))
#3 C:\Composer\vendor\phalcon\devtools\phalcon(65): Phalcon\DevTools\Script->run()
#4 {main}
thrown in C:\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php on line 48
My PHP version is 8.0.8 Thread Safe x64, I've installed PSR extension and Phalcon 5.0.0 from here: https://github.com/phalcon/cphalcon/releases/tag/v5.0.0beta3, file phalcon-php8.0-ts-windows2019-vs16-x64.zip, that means I have compatible version of framework. phalcon.bat was added to environment variables. What's the problem?
Usually this error occurs when the extension is not loaded by php, see with phpinfo(), also run the componser install insider phalcon-devtools, but probably it is the php not loading the phalcon extension or PHP is not in the windows PATH , also check if the php-fpm log does not contain any extension loading errors, test in cmd the command php -v
also create a index.php and try it
<?php
use Phalcon\Mvc\Micro;
$app = new Micro();
$app->get('/', function () { echo "<h1>test</h1>";});
$app->handle();
Try do the following Go to Edit The system environment variables -> system variables -> path -> edit add phalcon.bat folder path testing here i used C:\Users\renato\Downloads\phalcon-devtools-4.2.0\phalcon-devtools-4.2.0 ( just path folder where the .sh/.bat it is, do not include the file and extension) and worked fine with php 8.0.16 windows 10 phalcon 5
and then go to the power shell and input phalcon
https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/
Do not forget to run composer install inside phalcon devtools folder.
also on powershell input php -m to see the loaded modules and if it has an error
For a project I want to test the new database from Firebase, Firestore with PHP. But before i can use it, I need a couple of tools. I am trying for a day now to get it work, but no success.
I'm stuck on gRPC. I installed is, and it's working on my Mac and I can install Firestore with Composer, but I can't get it to work with XAMPP.
When I load a page I get
Fatal error: Uncaught Google\Cloud\Core\Exception\GoogleException: The requested client requires the gRPC extension.
Please see https://cloud.google.com/php/grpc for installation instructions. in /vendor/google/cloud-core/src/ClientTrait.php:75 Stack trace: #0 /vendor/google/cloud-firestore/src/FirestoreClient.php(115): Google\Cloud\Firestore\FirestoreClient->requireGrpc() #1 /app/firebase.php(18): Google\Cloud\Firestore\FirestoreClient->__construct() #2 /app/firebase.php(21): App\initialize() #3 /template.php(688): require_once('/Applications/X...') #4 /template.php(647): load_template('/Applications/X...', true) #5 /App in /vendor/google/cloud-core/src/ClientTrait.php on line 75
I added extension=grpc.so to the php.ini that is loaded by XAMPP.
But no success.
Try to use DLL file, download from here https://pecl.php.net/package/gRPC
Open your php.ini file and uncomment the line extension_dir="ext",
add extension="grpc".
Then go to the environment variables in the properties, choose path in the system variables and add the php path you are using.
I am using C:\xampp\php that's where all the magic will happen it's been a tag of war.
I'm trying to implement the google analytics API on localhost site using xampp on Mac OS.
but Im getting this error:
Fatal error: Uncaught Exception: This library must be installed via composer or by downloading the full package. See the instructions at https://github.com/google/google-api-php-client#installation. in /Applications/XAMPP/xamppfiles/htdocs/ga-api/google-api-php-client/autoload.php:14 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/ga-api/index.php(4): require_once() #1 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/ga-api/google-api-php-client/autoload.php on line 14
Can anyone help me with this?
Given that you installed the library using Composer, it will be installed to vendor and will be available in the autoload.php that Composer generates.
I will require_once DIR. '/vendor/autoload.php'; in index.php (preferred) or where I need to instantiate the GoogleClient class.
Ensure that the path to client credentials are rightly referenced when you set auth config like so:
Google_Client->setAuthConfig($pathToCredentials)
Reference:
Setting auth credentials:
https://github.com/google/google-api-php-client#authentication-with-oauth
Autoloading classes:
https://getcomposer.org/doc/01-basic-usage.md#autoloading
At sometime today, this error occurred and the script hanged:
[21-Aug-2013 08:35:06] PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `WScript.shell': CoInitialize has not been called.
' in C:\path\to\my\script.php:357
Stack trace:
#0 C:\path\to\my\script.php(357): com->com('WScript.shell')
#1 {main}
thrown in C:\path\to\my\script.php on line 357
This is the line (running in a loop) causing the error:
$com = new Com('WScript.shell');
This line usually runs fine so I'm not missing any libraries. Why could this happen ?
Go to php.ini and add this line. After that, restart php server. Good luck to you
extension=php_com_dotnet.dll
That is most likely due to desktop heap allocation error. One way to verify is to go to Windows Event Log (system category) and search for "desktop heap allocation failed" error or warning. As an workaround, you can consider using shell_exec.
For more details about desktop heap allocation error, see KB 184802
Effectively include the library "extension = php_com_dotnet.dll" in php.ini can serve in executing $ command = new Com ('WScript.Shell');
in my case it worked with Apache / 2.2.29 server (Win64) PHP / 3.5.29 mod_ssl / 2.2.29
thanks a lot.
I'm trying to test in PHP Amazon S3 on my localhost but keep getting the same error:
Fatal error: Uncaught exception 'cURL_Exception' with message 'cURL
resource: Resource id #69; cURL error: SSL certificate problem, verify
that the CA cert is OK. Details: error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (cURL
error code 60). See http://curl.haxx.se/libcurl/c/libcurl-errors.html
for an explanation of error codes.' in
C:\wamp\www\mysite\application\libraries\awsphp\lib\requestcore\requestcore.class.php:829
Stack trace: #0
C:\wamp\www\mysite\application\libraries\awsphp\sdk.class.php(1034):
RequestCore->send_request() #1
C:\wamp\www\mysite\application\libraries\awsphp\services\sqs.class.php(250):
CFRuntime->authenticate('ListQueues', Array) #2
C:\wamp\www\mysite\application\libraries\awsphp\services\sqs.class.php(582):
AmazonSQS->authenticate('ListQueues', Array) #3
C:\wamp\www\mysite\application\controllers\uploads.php(33):
AmazonSQS->list_queues() #4 [internal function]: Uploads->aw3() #5
C:\wamp\www\mysite\system\core\CodeIgniter.php(359): call_user_func
in
C:\wamp\www\mysite\application\libraries\awsphp\lib\requestcore\requestcore.class.php
on line 829
Test code:
$sqs = new AmazonSQS();
$response = $sqs->list_queues();
var_dump($response->isOK());
I properly installed the AWS SDK to php files and enabled CURL and SSL on me local server. What can I do to make this work? I can't find any help online. I'm using wamp.
Get this file and save it to your hard drive. Call it cacert.pem.
Configure curl.cainfo in php.ini with the full path to the file downloaded in step 1.
Restart Apache.
I'll leave it as an exercise for the reader to find out why this fixes it, all the information you need can be found in the links above.
Are you running on Windows?
Did you take the time to run the SDK Compatibility Test that comes bundled with the SDK?
According to this post you can't work with Amazon AWS on localhost..