Zend Server on I5 ?

General discussion on Zend Core for IBM System i
Post Reply
ledahu
Posts: 19
Joined: Mon Mar 23, 2009 9:36 am

Zend Server on I5 ?

Post by ledahu » Mon Mar 23, 2009 1:51 pm

Hi,

Will you provide a I5 version of Zend Server ?

Thanks,
David Ulrich

massimilianoc
Posts: 699
Joined: Thu Mar 12, 2009 11:58 am

Re: Zend Server on I5 ?

Post by massimilianoc » Mon Mar 23, 2009 2:10 pm

It is already in developement stage.
It is supposed to be in general availability during the third quarter of 2009.

Regards,
Massi.

ledahu
Posts: 19
Joined: Mon Mar 23, 2009 9:36 am

Re: Zend Server on I5 ?

Post by ledahu » Mon Mar 23, 2009 3:38 pm

Will it include Zend Framework with real I5/db2 support ? ;-)
Since several release, it is not the case...
We are several to encounter a lots of problems with it.

zend_i5
Posts: 158
Joined: Mon Mar 23, 2009 5:22 pm

Re: Zend Server on I5 ?

Post by zend_i5 » Mon Mar 23, 2009 5:28 pm

FYI. Zend Framework 1.7 includes real I5/db2 support. The latest ZF version also works with current Zend products for i5.

ledahu
Posts: 19
Joined: Mon Mar 23, 2009 9:36 am

Re: Zend Server on I5 ?

Post by ledahu » Mon Mar 23, 2009 6:08 pm

No it's not.

Zend_Db_Table is not working on all V5 version (i did not try on V6R1 but i should the same).
Zend_Db is not working on V5R3 with latest cum level (works with old one).

Try this code

Code: Select all

<?php
require_once "Zend/Loader.php"; 

// Set up autoload.
Zend_Loader::registerAutoload(); 

$db = Zend_Db::factory('Db2',array(
	'host'=>'',
	'username'=>'',
	'password'=>'',
	'dbname'=>'SXXXXXXXX',
	'schema'=>'YOURSCHEMA',
    'os'=>'i5',
));

Zend_Db_Table::setDefaultAdapter($db);

class Alertes extends Zend_Db_Table_Abstract {
	/**
	 * The default table name 
	 */
	protected $_name = 'YOURFILE';
	protected $_primary = 'IDPRIMARY';
	protected $_schema = 'YOURSCHEMA';
}

$alertes = new Alertes();
$select = $alertes->select();

print_r($alertes->fetchAll($select));

?>
and then you should have this error :

Code: Select all

[23-Mar-2009 17:55:44] PHP Fatal error:  Uncaught exception 'Zend_Db_Statement_Db2_Exception' with message 'Qualificatif de colonne ou table YOURFILE non défini. SQLCODE=-5001' in /usr/local/Zend/ZendFramework-1.7.7/library/Zend/Db/Statement/Db2.php:71
Stack trace:
#0 /usr/local/Zend/ZendFramework-1.7.7/library/Zend/Db/Statement.php(109): Zend_Db_Statement_Db2->_prepare('SELECT "YOUR_FI...')
#1 /usr/local/Zend/ZendFramework-1.7.7/library/Zend/Db/Adapter/Db2.php(230): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Db2), 'SELECT "YOUR_FI...')
#2 /usr/local/Zend/ZendFramework-1.7.7/library/Zend/Db/Adapter/Abstract.php(432): Zend_Db_Adapter_Db2->prepare('SELECT "YOUR_FI...')
#3 /usr/local/Zend/ZendFramework-1.7.7/library/Zend/Db/Table/Abstract.php(1330): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select))
#4 /usr/local/Zend/ZendFramework-1.7.7/library/Zend/Db/Table/Abstract.php(1158): Zend_Db_Table_Abstract->_fetch(Object(Zend_Db_Table_Select))
#5 /www/alertes/public/testdb.php(30): Zend_Db_Table_Abstract->fetchAll(Object(Zend_Db_Table in /usr/local/Zend/ZendFramework-1.7.7/library/Zend/Db/Statement/Db2.php on line 71
and you have this error because sql generated by zend_db_table is not supported by i5/sql :

Code: Select all

echo $select->__toString();
give this :

Code: Select all

SELECT "ALERT_LST".* FROM "ALF"."ALERT_LST"

Post Reply