Error integrating Google Analytics in PyroCMS - php

There was no error before i filled up the Google Analytics Setting in the Integration option of Setting menu in Admin Panel.
When I submitted the form after filling up the Google Analytics Setting and went to Dashboard, the following error occurred and the graph is not displaying in the Dashboard.
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: http_response_header
Filename: libraries/Analytics.php
Line Number: 424
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: http_response_header
Filename: libraries/Analytics.php
Line Number: 427
Please help me with this.

Google analytics uses CURL. In a shared hosting CURL might be disabled, So such problems are likely to occur.

Related

how do I check for errors in the result object. Braintree

Am getting this after making my transaction
PHP Notice: Undefined property on Braintree\Result\Successful: message in C:\Users\kevin Muigai\Documents\My Web Sites\myWeb\best\best\braintree-php-3.34.0\lib\Braintree\Instance.php on line 35
I solved the problem by upgrading to the latest braintree sdk

Hybridauth Social Login Failure

I'm following this example of social login integration using Hybridauth with Google and Twitter:
Hybridauth Example
When I try to sign up (first time), HTTP Error 500 appears (or blank page when I'm using Firefox). However, the new user is created in de database.
Then, I try to log in again with the same user, and it shows this error:
Error: Duplicate entry 'xxxxx#gmail.com' for key 'email'
(I'm using echo when it catches an exception in login.php)
When I check error_log the following error appears:
[01-Nov-2016 15:34:33 UTC] PHP Notice: Database error: in /***/conect.php on line 19
[01-Nov-2016 15:34:34 UTC] PHP Fatal error: Call to a member function fetch_object() on a non-object in /***/conect.php on line 18
This is working the same for Google and Twitter
I can't figure out what's going wrong

Trying to access url that returns json results in connection reset by peer error

My php web app is trying to access another URL on the same site that returns a json payload. My web app is using file_get_contents() on the url that returns the json and then does something with it.
I have tried using curl instead of file_get_contents, but i get the same errors which are:
A PHP Error was encountered
Severity: Notice
Message: file_get_contents(): send of 24 bytes failed with errno=104 Connection reset by peer
Filename: xxxxxx.php
Line Number: 46
And
A PHP Error was encountered
Severity: Notice
Message: file_get_contents(): send of 2 bytes failed with errno=32 Broken pipe
Filename: xxxx.php
Line Number: 46
Now, this worked on the previous server the web app was hosted on i'm told and this is now on some shared hosting.
So, to recap, when you visit the url http://example.com/getjson it runs some php that does:
$foo = file_get_contents('http://example.com/twitter.json/?user_id=xxxxxx&count=500&include_rts=1&page=1&include_entities=5');
If i visit http://example.com/twitter.json/?user_id=xxxxxx&count=500&include_rts=1&page=1&include_entities=5 in my browser i see the json, if i try and get it with php, i get the errors above.
I just can't think what to try next!
Any help gratefully received!

CodeIgniter production deployment error 404

I finished my CodeIgniter application, managed to deploy it to shared hosting, but I'm getting error 404 and a warning.
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/53627/virtual/www/application/config/config.php:1)
Filename: core/Common.php
Line Number: 568
Backtrace:
File: /data/web/virtuals/53627/virtual/www/index.php
Line: 292
Function: require_once
I've only had this issue since I switched to Codeigniter 3.0. When I deploy my site with CodeIgniter 2.2.0. Any idea what might be the cause? I'm getting this error regardless of using .htacess. If it help, here is a link to the site.

nuSOAP library error when run in CodeIgniter

while running nusoap 0.9.5 i get this error
A PHP Error was encountered
Severity: Warning
Message: Attempt to modify property of non-object
Filename: nusoap/nusoap.php
Line Number: 4694
i found a patch while searching Dr. Google that supposed to solve this probem
nusoap-version-0-9-5-attempt-to-modify-property-of-non-object-in-nusoap-php
and even though it solved the problem while run not from inside CodeIgniter, while i do it came up with a new error
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 0
Filename: nusoap/nusoap.php
Line Number: 4693
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 0
Filename: nusoap/nusoap.php
Line Number: 4695
Fortunately Noah Eltzroth from http://www.noaheltzroth.com/
helped me to solve this problem
after doing this
To fix this problem I modified line 4694 in nusoap.php from:
$this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true;
To this:
$this->schemas[$ns][$ns2]->imports[$ns2][$ii]['loaded'] = true;
if you still get the same error i got in the CodeIgniter, simply add # operator to remove the errors
the script works even though it shows the error, it is fine to hide the error
if (! #$list2[$ii]['loaded']) {
$this->schemas[$ns][$ns2]->imports[$ns2][$ii]['loaded'] = true;
$url = #$list2[$ii]['location'];

Categories