This topic is locked

Zend Library Google Calendar

6/26/2013 5:04:44 AM
PHPRunner General questions
M
mik 62 author

hello,

I have a problem in the management of the library zend gdata to google calendar.

the error:

: failed to open stream: No such file or directory"
is returned if I want to read calendar appointments after record after update.
if you launch the same page / library from the menu pagewith a snippet, it works correctly.
know how to solve it
thanks

C
cgphp 6/26/2013

Which version of the Zend framework you are using?

M
mik 62 author 6/27/2013



Which version of the Zend framework you are using?


the version of Zend Framework is 1.12.3

I noticed for example that if there is a file error handling example.

require ("include / dbcommon.php");

Zend calls do not work

thanks

C
cgphp 6/27/2013

It's difficult to tell you what's happening without seeing your actual code. Try to upgrade the framework to the latest version (2.2). It might be a Zend bug.

M
mik 62 author 6/27/2013

hello Cristian

this is a piece of code that use



<?php

ob_start();
session_start();

@ini_set("display_errors","1");

@ini_set("display_startup_errors","1");
require_once 'Zend/loader.php';
$redire = $_SERVER["HTTP_REFERER"];
\Zend_Loader::loadClass('Zend_Gdata');

\Zend_Loader::loadClass('Zend_Gdata_ClientLogin');

\Zend_Loader::loadClass('Zend_Gdata_Calendar');

\Zend_Loader::loadClass('Zend_Http_Client');
echo $_SESSION["codice"]. ' -- ' .$_SESSION["googleA"];
// parameters

$calendar_user = '0470gkp8g7ftv8ov5nfvjplrdk%40group.calendar.google.com';

$calendar_visibility = 'private-50642f5681afbb525ed30d2b94b79b4b';
$user = trim($_SESSION["googleA"]);

$pass = trim($_SESSION["googleP"]);
echo "<h3>".$user."</h3>";

echo "<h3>".$pass."</h3>";
// login

$service ='';

$service = \Zend_Gdata_Calendar::AUTH_SERVICE_NAME;

$client = \Zend_Gdata_ClientLogin::getHttpClient($user, $pass,$service );

$calendar_service = new \Zend_Gdata_Calendar($client);
try {

$listFeed = $calendar_service->getCalendarListFeed();
...

...

...
...

...

...

$_SESSION["ID_GGOOLL"] = $event_id;

// for DB

global $conn;

require ("include/dbcommon.php");

$update_record ="UPDATE dbo.crm_az_ioni SET AZ_GOOGLE_ID='".$event_id."' WHERE AZ_CODICE=".$_SESSION["codice"];

db_exec($update_record,$conn);

// back to page

header("Location: ".$redire);
so it works, but if the require ("include / dbcommon.php") before I insert it to handle events calendar gives me the original problem
for the version of the library to handle google calendar I think the 1.12.3 is the last
thanks