Re: [fw-general] Re: Re: re[fw-general] gistry question

2009-07-06 Thread Ralph Schindler
Nothing is keeping you from creating a DomainModel that either uses a 
service layer OR directly ties to DbTable (via composition) to persist 
your data.


A skeleton I like to use for this type of integration is something 
similar to this:


class Person
{

  protected $_row = null;

  static public findById($id)
  {
$table = new SomeTableThatExtendsZendDbTable();
$row = $table->find($id);
if ($row) {
  return new self($row->current());
} else {
  throw new NotFoundException();
}
  }

  public function __construct($options)
  {
if ($options instanceof Zend_Db_Table_Row) {
  $this->_row = $options;
} else {
  $table = new SomeTableThatExtendsZendDbTable();
  $this->_row = $table->createRow();
}
  }

  ...

}


Naturally, your model becomes more dependent on your coding (vs. 
database introspection), but ultimately you have more control.  And, as 
you can see above, its consuming Zend_Db_Table as its persistence layer.


On the other hand, you can use Outlet, or Doctrine.. both are solid set 
of tools for ORM- if that is what you are looking for.


-ralph

KimG wrote:

Zend_db is OO allright. Let me rephrase it: i don't like the model where you
have to extend some base classes in order to get persistency.

i prefer to use the VO / DAO pattern where you persist the VO by means of
some 'external' framework. my background is Java and i've use hibernate a
lot to persist objects and it uses that model.

kim




Matthew Weier O'Phinney-3 wrote:

-- KimG  wrote
(on Tuesday, 23 June 2009, 06:57 AM -0700):

Yes, i'm aware of the zend_auth stuff, but i dislike the zend_db* - and
hence the zend_auth - methods since they work in a non-object oriented
way.

Um... Zend_Auth and Zend_Db are *completely* OOP -- all of ZF is. Could
you please qualify your statement? I'm curious what in particular you
see as non-OO.

--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/






Re: [fw-general] Re: [fw-auth] Zend_Auth_Adapter_DbTable with MySQL View

2009-07-06 Thread Ralph Schindler

Ok, a few notes:

* your _initAuth() boostrapper should probably be more concerened with 
createing a Zend_Auth instance instead of a Zend_Auth_Adapter_DbTable.


The reason being is that the Adapter_DbTable is only needed during the 
AuthController::identifyAction(), its never really needed outside of 
that.  Zend_Auth instance on the other hand, is.


* before $result = $auth->authenticate( $authAdapter );, try calling
this:  echo $auth->getDbSelect();  It will give you a good sense for the
query being generated (minus the CASE PART described in the protected 
method _authenticateCreateSelect).


In general, Adapter_DbTable should not care that you are querying 
against a view.  Your view should have both the identity (username) and 
credential (password) available in it.


Do you get an error code from the query statement? YOu can find this by 
examining the contents of the Exception thrown inside 
_authenticateQuerySelect(Zend_Db_Select $dbSelect) where the original 
exception is thrown.


Hope this helps,
Ralph


Joseph Crawford wrote:
Sorry I failed to show my code, here is the bootstrap method along with 
my AuthController 


http://pastebin.com/f5d37bef4

Thanks,
Joseph Crawford

On Jul 6, 2009, at 4:59 PM, Joseph Crawford wrote:


Hello Everyone,

I had my authentication adapter working just fine using the actual 
database table of isp_partners_aux.  I needed to join it with 
isp_partners though so that I could have the joined data in the users 
identity.


I created a view in Mysql and it works find under the mysql command 
line client.


I seem to get this error when using it with the Auth Adapter though.

*Message:* The supplied parameters to Zend_Auth_Adapter_DbTable failed 
to produce a valid sql statement, please check table and column names 
for validity.


I did some debugging by adding echo $dbSelect->__toString(); on line 
306 of Auth/Adapter/DbTable.php and got shown the following query with 
the username and password marked with ** only for security in the email.


SELECT `isp_partners_view`.*, (CASE WHEN `password` = '*' THEN 1 
ELSE 0 END) AS `zend_auth_credential_match` FROM `isp_partners_view` 
WHERE (`username` = '*')


This query works fine in the mysql command line client so I am not 
sure why it is not working well when used with Zend_Auth_Adapter_DbTable


Has anyone else here successfully used the auth adapter with an MySQL 
view?


Thanks,
Joseph Crawford




Re: [fw-general] Zend_Locale - Zend_Cache temp directory problem]

2009-07-06 Thread Denis Fohl

Thank you Thomas, it works.
You saved my day.

Denis.

Thomas Weidner a écrit :

Denis,

add "Zend_Locale::disableCache(true);" within your bootstrap before 
calling any other Zend_Locale method.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - From: "Denis Fohl" 
To: "Zend Framework" 
Sent: Monday, July 06, 2009 8:47 PM
Subject: [Fwd: Re: [fw-general] Zend_Locale - Zend_Cache temp directory 
problem]




Hi Martin,

thank you for answering, yes /tmp exists and is writeable for apache
process ls -l /tmp says :

total 0
-rw---  1 apache  apache 0 jui  6 13:17 307X7k
-rw---  1 apache  apache 0 jui  6 12:35 3POxYc
-rw---  1 apache  apache 0 jui  6 13:19 4tnBoL
-rw---  1 apache  apache 0 jui  6 13:08 adeWur
-rw---  1 apache  apache 0 jui  6 12:44 aOvtdg
-rw---  1 apache  apache 0 jui  6 12:35 eP1Ca1
-rw---  1 apache  apache 0 jui  6 12:37 hex8km
-rw---  1 apache  apache 0 jui  6 13:20 i3bcKi
-rw---  1 apache  apache 0 jui  6 13:47 IXVkhl
-rw---  1 apache  apache 0 jui  6 12:27 jKBSay
srw-rw-rw-  1 popuser root   0 ao� 11  2008 spamd_full.sock
-rw---  1 apache  apache 0 jui  6 13:46 uqPkiB
-rw---  1 apache  apache 0 jui  6 13:14 utGR4c
-rw---  1 apache  apache 0 jui  6 13:13 wdwjnD
-rw---  1 apache  apache 0 jui  6 13:09 wjcZac
-rw---  1 apache  apache 0 jui  6 13:37 zd25zl

I still can't fix my problem for the moment and i don't know zend_cache
at all.
I have another site on this server wich is running fine with ZF 1.6 or
1.7 and using Zend_Locale wihout problem.

The exception occurs with an app using ZF 1.8.

Thanks again for your help.

Denis.

Martin Martinov a écrit :

2009/7/6 Denis Fohl :

Hi all,

my app is running fine on my dev box (linux ubuntu) but when i 
upload it to

my client's production server (fedora / plesk) i have got the following
message :

'Zend_Cache_Exception' with message 'Could not determine temp 
directory,

please specify a cache_dir manually'

it seems that it is thrown in my index.php where i set the locale :

Zend_Registry::set('locale', new
Zend_Locale(Zend_Registry::get('currentLang')));

If i try to set the temp directory to /tmp :

Zend_Cache_Backend_File::setCacheDir('/tmp');

i've got the following error :

'Zend_Cache_Exception' with message 'cache_dir must be a directory'

although /tmp is a valid directory.

Thanks for help.

Denis.




Are you sure that the /tmp directory exists and is writeable by the
owner of the apache/httpd process? What does ls -l /tmp say?











[fw-general] Re: [fw-auth] Zend_Auth_Adapter_DbTable with MySQL View

2009-07-06 Thread Joseph Crawford
Sorry I failed to show my code, here is the bootstrap method along  
with my AuthController


http://pastebin.com/f5d37bef4

Thanks,
Joseph Crawford

On Jul 6, 2009, at 4:59 PM, Joseph Crawford wrote:


Hello Everyone,

I had my authentication adapter working just fine using the actual  
database table of isp_partners_aux.  I needed to join it with  
isp_partners though so that I could have the joined data in the  
users identity.


I created a view in Mysql and it works find under the mysql command  
line client.


I seem to get this error when using it with the Auth Adapter though.

Message: The supplied parameters to Zend_Auth_Adapter_DbTable failed  
to produce a valid sql statement, please check table and column  
names for validity.


I did some debugging by adding echo $dbSelect->__toString(); on line  
306 of Auth/Adapter/DbTable.php and got shown the following query  
with the username and password marked with ** only for security in  
the email.


SELECT `isp_partners_view`.*, (CASE WHEN `password` = '*' THEN 1  
ELSE 0 END) AS `zend_auth_credential_match` FROM `isp_partners_view`  
WHERE (`username` = '*')


This query works fine in the mysql command line client so I am not  
sure why it is not working well when used with  
Zend_Auth_Adapter_DbTable


Has anyone else here successfully used the auth adapter with an  
MySQL view?


Thanks,
Joseph Crawford




Re: [fw-general] Zend_Db_Table Relationships

2009-07-06 Thread Ralph Schindler

That will do it.  :)

The major difference between getParentRow and getDependentRowset() is 
that getParentRow() will return a single row whereas 
getDependentRowset() will return a rowset of (in your use case), a 
single row.  But both will work.


-ralph

Joseph Crawford wrote:
Please dis-reguard this question, i am just an idiot and had the table 
name incorrect in my AUX model class.


Thanks,
Joseph Crawford

On Jul 6, 2009, at 1:38 PM, Joseph Crawford wrote:

I did some debugging by also adding the echo $select->__toString() in 
the /Zend/Db/Table/Row/Abstract.php on line 914 which is in the 
findDependentRowset method.


It seems to be outputting the same exact sql query

SELECT `isp_partners`.* FROM `isp_partners`

So for some odd reason it is not getting the dependent 
rowset rather doing the same query and I am not sure why :(


Thanks,
Joseph Crawford


On Jul 6, 2009, at 1:19 PM, Ralph Schindler wrote:



In situations where I have auxiliary and/or errata tables (basically 
a 1-1 relationship), I would look into peering to those rows via the 
findParentRow($parentTable) method rather than finding as a 
DependentRowset.


http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.fetching.parent

It is modeled effectively the same way, but you are using a different 
approach for finding the actual Row.


Let me know if that helps!
-ralph

Now I have it working for the websites and keywords but cannot get 
the isp_partners_aux to work.  The issue seems to be that when I do 
the findDependantRowset it does not get any data from the 
isp_partners_aux table, rather it only contains the data from the 
isp_partners table.  There is only 1 row in each table that will 
match.  The aux table is just an external table that holds data 
about isp_partners such as the username, etc.  Below is my 
controller followed by my model classes and then the output.









Re: Re: [fw-general] Zend_Locale - Zend_Cache temp directory problem]

2009-07-06 Thread Thomas Weidner

Denis,

add "Zend_Locale::disableCache(true);" within your bootstrap before calling 
any other Zend_Locale method.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: "Denis Fohl" 

To: "Zend Framework" 
Sent: Monday, July 06, 2009 8:47 PM
Subject: [Fwd: Re: [fw-general] Zend_Locale - Zend_Cache temp directory 
problem]




Hi Martin,

thank you for answering, yes /tmp exists and is writeable for apache
process ls -l /tmp says :

total 0
-rw---  1 apache  apache 0 jui  6 13:17 307X7k
-rw---  1 apache  apache 0 jui  6 12:35 3POxYc
-rw---  1 apache  apache 0 jui  6 13:19 4tnBoL
-rw---  1 apache  apache 0 jui  6 13:08 adeWur
-rw---  1 apache  apache 0 jui  6 12:44 aOvtdg
-rw---  1 apache  apache 0 jui  6 12:35 eP1Ca1
-rw---  1 apache  apache 0 jui  6 12:37 hex8km
-rw---  1 apache  apache 0 jui  6 13:20 i3bcKi
-rw---  1 apache  apache 0 jui  6 13:47 IXVkhl
-rw---  1 apache  apache 0 jui  6 12:27 jKBSay
srw-rw-rw-  1 popuser root   0 ao� 11  2008 spamd_full.sock
-rw---  1 apache  apache 0 jui  6 13:46 uqPkiB
-rw---  1 apache  apache 0 jui  6 13:14 utGR4c
-rw---  1 apache  apache 0 jui  6 13:13 wdwjnD
-rw---  1 apache  apache 0 jui  6 13:09 wjcZac
-rw---  1 apache  apache 0 jui  6 13:37 zd25zl

I still can't fix my problem for the moment and i don't know zend_cache
at all.
I have another site on this server wich is running fine with ZF 1.6 or
1.7 and using Zend_Locale wihout problem.

The exception occurs with an app using ZF 1.8.

Thanks again for your help.

Denis.

Martin Martinov a écrit :

2009/7/6 Denis Fohl :

Hi all,

my app is running fine on my dev box (linux ubuntu) but when i upload it 
to

my client's production server (fedora / plesk) i have got the following
message :

'Zend_Cache_Exception' with message 'Could not determine temp directory,
please specify a cache_dir manually'

it seems that it is thrown in my index.php where i set the locale :

Zend_Registry::set('locale', new
Zend_Locale(Zend_Registry::get('currentLang')));

If i try to set the temp directory to /tmp :

Zend_Cache_Backend_File::setCacheDir('/tmp');

i've got the following error :

'Zend_Cache_Exception' with message 'cache_dir must be a directory'

although /tmp is a valid directory.

Thanks for help.

Denis.




Are you sure that the /tmp directory exists and is writeable by the
owner of the apache/httpd process? What does ls -l /tmp say?







[Fwd: Re: [fw-general] Zend_Locale - Zend_Cache temp directory problem]

2009-07-06 Thread Denis Fohl

Hi Martin,

thank you for answering, yes /tmp exists and is writeable for apache
process ls -l /tmp says :

total 0
-rw---  1 apache  apache 0 jui  6 13:17 307X7k
-rw---  1 apache  apache 0 jui  6 12:35 3POxYc
-rw---  1 apache  apache 0 jui  6 13:19 4tnBoL
-rw---  1 apache  apache 0 jui  6 13:08 adeWur
-rw---  1 apache  apache 0 jui  6 12:44 aOvtdg
-rw---  1 apache  apache 0 jui  6 12:35 eP1Ca1
-rw---  1 apache  apache 0 jui  6 12:37 hex8km
-rw---  1 apache  apache 0 jui  6 13:20 i3bcKi
-rw---  1 apache  apache 0 jui  6 13:47 IXVkhl
-rw---  1 apache  apache 0 jui  6 12:27 jKBSay
srw-rw-rw-  1 popuser root   0 ao� 11  2008 spamd_full.sock
-rw---  1 apache  apache 0 jui  6 13:46 uqPkiB
-rw---  1 apache  apache 0 jui  6 13:14 utGR4c
-rw---  1 apache  apache 0 jui  6 13:13 wdwjnD
-rw---  1 apache  apache 0 jui  6 13:09 wjcZac
-rw---  1 apache  apache 0 jui  6 13:37 zd25zl

I still can't fix my problem for the moment and i don't know zend_cache
at all.
I have another site on this server wich is running fine with ZF 1.6 or
1.7 and using Zend_Locale wihout problem.

The exception occurs with an app using ZF 1.8.

Thanks again for your help.

Denis.

Martin Martinov a écrit :

2009/7/6 Denis Fohl :

Hi all,

my app is running fine on my dev box (linux ubuntu) but when i upload it to
my client's production server (fedora / plesk) i have got the following
message :

'Zend_Cache_Exception' with message 'Could not determine temp directory,
please specify a cache_dir manually'

it seems that it is thrown in my index.php where i set the locale :

Zend_Registry::set('locale', new
Zend_Locale(Zend_Registry::get('currentLang')));

If i try to set the temp directory to /tmp :

Zend_Cache_Backend_File::setCacheDir('/tmp');

i've got the following error :

'Zend_Cache_Exception' with message 'cache_dir must be a directory'

although /tmp is a valid directory.

Thanks for help.

Denis.




Are you sure that the /tmp directory exists and is writeable by the
owner of the apache/httpd process? What does ls -l /tmp say?






Re: [fw-general] Zend_Db_Table Relationships

2009-07-06 Thread Joseph Crawford
Please dis-reguard this question, i am just an idiot and had the table  
name incorrect in my AUX model class.


Thanks,
Joseph Crawford

On Jul 6, 2009, at 1:38 PM, Joseph Crawford wrote:

I did some debugging by also adding the echo $select->__toString()  
in the /Zend/Db/Table/Row/Abstract.php on line 914 which is in the  
findDependentRowset method.


It seems to be outputting the same exact sql query

SELECT `isp_partners`.* FROM `isp_partners`

So for some odd reason it is not getting the dependent rowset rather  
doing the same query and I am not sure why :(


Thanks,
Joseph Crawford


On Jul 6, 2009, at 1:19 PM, Ralph Schindler wrote:



In situations where I have auxiliary and/or errata tables  
(basically a 1-1 relationship), I would look into peering to those  
rows via the findParentRow($parentTable) method rather than finding  
as a DependentRowset.


http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.fetching.parent

It is modeled effectively the same way, but you are using a  
different approach for finding the actual Row.


Let me know if that helps!
-ralph

Now I have it working for the websites and keywords but cannot get  
the isp_partners_aux to work.  The issue seems to be that when I  
do the findDependantRowset it does not get any data from the  
isp_partners_aux table, rather it only contains the data from the  
isp_partners table.  There is only 1 row in each table that will  
match.  The aux table is just an external table that holds data  
about isp_partners such as the username, etc.  Below is my  
controller followed by my model classes and then the output.









Re: [fw-general] Zend_Db_Table Relationships

2009-07-06 Thread Joseph Crawford
I did some debugging by also adding the echo $select->__toString() in  
the /Zend/Db/Table/Row/Abstract.php on line 914 which is in the  
findDependentRowset method.


It seems to be outputting the same exact sql query

SELECT `isp_partners`.* FROM `isp_partners`

So for some odd reason it is not getting the dependent rowset rather  
doing the same query and I am not sure why :(


Thanks,
Joseph Crawford


On Jul 6, 2009, at 1:19 PM, Ralph Schindler wrote:



In situations where I have auxiliary and/or errata tables (basically  
a 1-1 relationship), I would look into peering to those rows via the  
findParentRow($parentTable) method rather than finding as a  
DependentRowset.


http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.fetching.parent

It is modeled effectively the same way, but you are using a  
different approach for finding the actual Row.


Let me know if that helps!
-ralph

Now I have it working for the websites and keywords but cannot get  
the isp_partners_aux to work.  The issue seems to be that when I do  
the findDependantRowset it does not get any data from the  
isp_partners_aux table, rather it only contains the data from the  
isp_partners table.  There is only 1 row in each table that will  
match.  The aux table is just an external table that holds data  
about isp_partners such as the username, etc.  Below is my  
controller followed by my model classes and then the output.







Re: [fw-general] Zend_Db_Table Relationships

2009-07-06 Thread Joseph Crawford

Ralph,

Doing it that way would require me to instantiate the  
Model_DbTable_ISPPartnersAux() class and that is not how I have it  
setup.


Theoretically I should be able to instantiate the Partner model and  
say now find all rowsets that are in the dependent table based on the  
common id.  I fixed a few things in the code so here is what I have now.


I did some debugging by adding echo $select->__toString() in my Zend/ 
Db/Table/Abstract.php fetchRow method and found that the sql query is  
just this.


SELECT `isp_partners`.* FROM `isp_partners`

view->headTitle('Keyword Management', 'APPEND');
$partners   = new Model_DbTable_ISPPartners();
$partners_aux   = new Model_DbTable_ISPPartnersAux();

$partner = $partners->fetchRow("code = 'red'");
// THIS WORKS FINE WHEN NOT COMMENTED
//$results = $partner- 
>findManyToManyRowset('Model_DbTable_ISPKeywords',  
'Model_DbTable_ISPWebsites');


// THIS DOES NOT SEEM TO GET HIT OR SOMETHING.
$aux_data = $partner- 
>findDependentRowset('Model_DbTable_ISPPartnersAux', 'PartnersAux');

//echo ''.print_r($results, true).''; exit;
$this->view->results = $results;

}
}

   array(
'columns'   =>   array('isp_id'),
'refTableClass' =>   
'Model_DbTable_ISPPartnersAux',
'refColumns'=>   array('isp_id')
)
);
}

   array(
'columns'   =>   array('isp_id'),
'refTableClass' =>   
'Model_DbTable_ISPPartners',
'refColumns'=>   array('isp_id')
)
);

}



On Jul 6, 2009, at 1:19 PM, Ralph Schindler wrote:



In situations where I have auxiliary and/or errata tables (basically  
a 1-1 relationship), I would look into peering to those rows via the  
findParentRow($parentTable) method rather than finding as a  
DependentRowset.


http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.fetching.parent

It is modeled effectively the same way, but you are using a  
different approach for finding the actual Row.


Let me know if that helps!
-ralph

Now I have it working for the websites and keywords but cannot get  
the isp_partners_aux to work.  The issue seems to be that when I do  
the findDependantRowset it does not get any data from the  
isp_partners_aux table, rather it only contains the data from the  
isp_partners table.  There is only 1 row in each table that will  
match.  The aux table is just an external table that holds data  
about isp_partners such as the username, etc.  Below is my  
controller followed by my model classes and then the output.







Re: [fw-general] Zend_Db_Table Relationships

2009-07-06 Thread Ralph Schindler


In situations where I have auxiliary and/or errata tables (basically a 
1-1 relationship), I would look into peering to those rows via the 
findParentRow($parentTable) method rather than finding as a DependentRowset.


http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.fetching.parent

It is modeled effectively the same way, but you are using a different 
approach for finding the actual Row.


Let me know if that helps!
-ralph



Now I have it working for the websites and keywords but cannot get the 
isp_partners_aux to work.  The issue seems to be that when I do the 
findDependantRowset it does not get any data from the isp_partners_aux 
table, rather it only contains the data from the isp_partners table. 
 There is only 1 row in each table that will match.  The aux table is 
just an external table that holds data about isp_partners such as the 
username, etc.  Below is my controller followed by my model classes and 
then the output.





[fw-general] Zend_Db_Table Relationships

2009-07-06 Thread Joseph Crawford

Hello Everyone,

I have a few database tables that I need to relate to each other.  I  
have it setup like this


isp_partners (primary key isp_id)
isp_partners_aux (primary key isp_id, related by isp_id)
keywords (primary key kw_id, related by ws_id)
websites (primary key ws_id, related by isp_id)

Now I have it working for the websites and keywords but cannot get the  
isp_partners_aux to work.  The issue seems to be that when I do the  
findDependantRowset it does not get any data from the isp_partners_aux  
table, rather it only contains the data from the isp_partners table.   
There is only 1 row in each table that will match.  The aux table is  
just an external table that holds data about isp_partners such as the  
username, etc.  Below is my controller followed by my model classes  
and then the output.


view->headTitle('Keyword Management', 'APPEND');
$partners   = new Model_DbTable_ISPPartners();
$partners_aux   = new Model_DbTable_ISPPartnersAux();
$websites   = new Model_DbTable_ISPWebsites();
$keywords   = new Model_DbTable_ISPKeywords();

$partner = $partners->fetchRow("code = 'red'");
$results = $partner->findManyToManyRowset($keywords,  
$websites);

$aux_data = $partner->findDependentRowset($partners_aux);
//echo ''.print_r($results, true).''; exit;
echo ''.print_r($aux_data, true).''; exit;
$this->view->results = $results;

}
}

	protected $_dependantTables = array('Model_DbTable_ISPWebsites',  
'Model_DbTable_ISPPartnersAux');

}

   array(
'columns'   =>   array('isp_id'),
'refTableClass' =>   
'Model_DbTable_ISPPartners',
'refColumns'=>   array('isp_id')
)
);

}

   array(
'columns'   =>   array('ws_id'),
'refTableClass' =>   
'Model_DbTable_ISPWebsites',
'refColumns'=>   array('ws_id')
)
);
}

   array(
'columns'   =>   array('ws_id'),
'refTableClass' =>   
'Model_DbTable_ISPKeywords',
'refColumns'=>   array('ws_id')
),
'Partner'   =>   array(
'columns'   =>   array('isp_id'),
'refTableClass' =>   
'Model_DbTable_ISPPartners',
'refColumns'=>   array('isp_id')
)
);
}


OUTPUT OF $results

[0] => Array
(
[ws_id] => 1
[navigation_url] => http://www.namespaceinc.com/
[isp_id] => 8
[enabled] => 1
[kw_id] => 3
[keyword] => nsg-home
[start_date] => 2009-07-01 00:00:00
[end_date] => 2009-07-31 00:00:00
)

[1] => Array
(
[ws_id] => 2
[navigation_url] => 
http://www.namespacestrategy.com/products.htm
[isp_id] => 8
[enabled] => 1
[kw_id] => 2
[keyword] => nsg-products
[start_date] => 2009-07-01 00:00:00
[end_date] => 2009-07-31 00:00:00
)

OUTPUT of $aux_data

[0] => Array
(
[isp_id] => 8
[nwp_id] => 8
[code] => RED
[description] => Paxfire
[enabled] => 1
[fallback_uri] =>
[linkshare_code] => 8
[cj_code] => 1209416
[ebay_code] => 5335857452
)




Re: [fw-general] Zend_Application is not running the session resource.

2009-07-06 Thread Jamie Krasnoo
Yea, that's what I did. I failed to mention that I had an _initSession in
the bootstrap too. That prevented the resource from being run. So I changed
it to _initSessionStart() and placed $this->bootstrap('session') in front
like you said and that fixed the problem.

On Mon, Jul 6, 2009 at 7:31 AM, ozzycan  wrote:

>
>
> // In your Bootstrap: To make sure that the session resource configuration
> is actually executed before you call start
>
> $this->bootstrap('session');
>
> // Start the Session
> Zend_Session::start();
>
>
> That's what I would do.
>
>
> Specks wrote:
> >
> > That's what I did do. However the session isn't being configured at all
> by
> > the resource. When I do create a new session namespace or use
> > Zend_Session::start() the session goes to the default configuration.
> >
> > On Mon, Jul 6, 2009 at 2:28 AM, ozzycan  wrote:
> >
> >>
> >> Use
> >>
> >> Zend_Session::start();
> >>
> >> or
> >>
> >> define a new session namespace in your Bootstrap (or elsewhere),
> >>
> >> when you're ready to start the session.
> >>
> >> "Zend_Application_Resource_Session allows you to configure Zend_Session
> >> as
> >> well as optionally initialize a session SaveHandler." It doesn't start
> >> it,
> >> AFAIK.
> >>
> >>
> >>
> >> Specks wrote:
> >> >
> >> > I followed the documentation for configuring the session resource
> >> through
> >> > the Application.ini. However Zend_Application doesn't run the Session
> >> > resource to configure sessions.
> >> >
> >> > I have the following in the ini below the [production] section. I just
> >> > want
> >> > to configure the regular file session. Am I missing anything?
> >> >
> >> > resources.session.save_path = APPLICATION_PATH "/../data/session"
> >> > resources.session.use_only_cookies = true
> >> > resources.session.remember_me_seconds = 864000
> >> > resources.session.name = "A NAME"
> >> >
> >> > Any help would be appreciated.
> >> >
> >> > Jamie
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Zend_Application-is-not-running-the-session-resource.-tp24349578p24352157.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zend_Application-is-not-running-the-session-resource.-tp24349578p24356513.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] Zend_Application is not running the session resource.

2009-07-06 Thread ozzycan


// In your Bootstrap: To make sure that the session resource configuration
is actually executed before you call start

$this->bootstrap('session'); 

// Start the Session
Zend_Session::start();


That's what I would do.


Specks wrote:
> 
> That's what I did do. However the session isn't being configured at all by
> the resource. When I do create a new session namespace or use
> Zend_Session::start() the session goes to the default configuration.
> 
> On Mon, Jul 6, 2009 at 2:28 AM, ozzycan  wrote:
> 
>>
>> Use
>>
>> Zend_Session::start();
>>
>> or
>>
>> define a new session namespace in your Bootstrap (or elsewhere),
>>
>> when you're ready to start the session.
>>
>> "Zend_Application_Resource_Session allows you to configure Zend_Session
>> as
>> well as optionally initialize a session SaveHandler." It doesn't start
>> it,
>> AFAIK.
>>
>>
>>
>> Specks wrote:
>> >
>> > I followed the documentation for configuring the session resource
>> through
>> > the Application.ini. However Zend_Application doesn't run the Session
>> > resource to configure sessions.
>> >
>> > I have the following in the ini below the [production] section. I just
>> > want
>> > to configure the regular file session. Am I missing anything?
>> >
>> > resources.session.save_path = APPLICATION_PATH "/../data/session"
>> > resources.session.use_only_cookies = true
>> > resources.session.remember_me_seconds = 864000
>> > resources.session.name = "A NAME"
>> >
>> > Any help would be appreciated.
>> >
>> > Jamie
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Zend_Application-is-not-running-the-session-resource.-tp24349578p24352157.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Application-is-not-running-the-session-resource.-tp24349578p24356513.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Application is not running the session resource.

2009-07-06 Thread Jamie Krasnoo
That's what I did do. However the session isn't being configured at all by
the resource. When I do create a new session namespace or use
Zend_Session::start() the session goes to the default configuration.

On Mon, Jul 6, 2009 at 2:28 AM, ozzycan  wrote:

>
> Use
>
> Zend_Session::start();
>
> or
>
> define a new session namespace in your Bootstrap (or elsewhere),
>
> when you're ready to start the session.
>
> "Zend_Application_Resource_Session allows you to configure Zend_Session as
> well as optionally initialize a session SaveHandler." It doesn't start it,
> AFAIK.
>
>
>
> Specks wrote:
> >
> > I followed the documentation for configuring the session resource through
> > the Application.ini. However Zend_Application doesn't run the Session
> > resource to configure sessions.
> >
> > I have the following in the ini below the [production] section. I just
> > want
> > to configure the regular file session. Am I missing anything?
> >
> > resources.session.save_path = APPLICATION_PATH "/../data/session"
> > resources.session.use_only_cookies = true
> > resources.session.remember_me_seconds = 864000
> > resources.session.name = "A NAME"
> >
> > Any help would be appreciated.
> >
> > Jamie
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zend_Application-is-not-running-the-session-resource.-tp24349578p24352157.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] Help in creating Dojo Combo Box and Date Picker

2009-07-06 Thread Matthew Weier O'Phinney
-- jigen7  wrote
(on Monday, 06 July 2009, 12:34 AM -0700):
> Matthew Weier O'Phinney-3 wrote:
> > -- jigen7  wrote
> > (on Sunday, 05 July 2009, 08:56 PM -0700):
> > > Hi I'm new in using Zend Dojo Form and most of the tutorials is for
> > > version 1.7 as the latest ver is 1.8 
> > 
> > The changes to 1.8 will not affect Dojo integration in the least; the
> > tutorials that exist are still relevant.
> > 
> > > can anyone help me to add a combo box in my
> > > page where i can select default values or i can input my value when the
> > > value is not present in the list and also a date picker. 
> > 
> > Do you want to know (a) how to do a ComboBox AND (b) how to do a
> > DateTextBox, or are you (c) trying to combine the two? The latter, (c),
> > is something Dojo specific, and you would need to ask on the Dojo
> > mailing lists about creating custom widgets. For the former -- (a)
> > and/or (b) -- please read the Zend_Dojo documentation online.
> > 
> > > how will i declare it in the form.php then create a new form in the
> > > controller. what are the codes required in the layout so the dojo
> > > elements will run thanks  
> 
> the documentation is not that accurate as i dont have experience how to
> implement it 1st. I just want to display a combo box and a date picker
> separately

I'm not sure what you consider inaccurate about the documentation; if
you could clarify, that would be great.

The basics, however, are quite simple:

$form = new Zend_Dojo_Form();

$form->addElement('ComboBox', 'foo', array(
// specify your options:
'label' => 'Some options',
'multiOptions' => array(...), // specify options here...
'store' => array( // or setup a dojo.data store
'type'   => '',
'id' => ''.
'params' => array(...), // data store parameters
),
));

$form->addElement('DateTextBox', 'bar', array(
// specify your options
'label' => 'A date text box',
));


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Zend_Locale - Zend_Cache temp directory problem

2009-07-06 Thread Martin Martinov
2009/7/6 Denis Fohl :
> Hi all,
>
> my app is running fine on my dev box (linux ubuntu) but when i upload it to
> my client's production server (fedora / plesk) i have got the following
> message :
>
> 'Zend_Cache_Exception' with message 'Could not determine temp directory,
> please specify a cache_dir manually'
>
> it seems that it is thrown in my index.php where i set the locale :
>
> Zend_Registry::set('locale', new
> Zend_Locale(Zend_Registry::get('currentLang')));
>
> If i try to set the temp directory to /tmp :
>
> Zend_Cache_Backend_File::setCacheDir('/tmp');
>
> i've got the following error :
>
> 'Zend_Cache_Exception' with message 'cache_dir must be a directory'
>
> although /tmp is a valid directory.
>
> Thanks for help.
>
> Denis.
>
>

Are you sure that the /tmp directory exists and is writeable by the
owner of the apache/httpd process? What does ls -l /tmp say?

-- 
Regards,
Martin Martinov
http://mmartinov.com/


[fw-general] Zend_Locale - Zend_Cache temp directory problem

2009-07-06 Thread Denis Fohl

Hi all,

my app is running fine on my dev box (linux ubuntu) but when i upload it 
to my client's production server (fedora / plesk) i have got the 
following message :


'Zend_Cache_Exception' with message 'Could not determine temp directory, 
please specify a cache_dir manually'


it seems that it is thrown in my index.php where i set the locale :

Zend_Registry::set('locale', new 
Zend_Locale(Zend_Registry::get('currentLang')));


If i try to set the temp directory to /tmp :

Zend_Cache_Backend_File::setCacheDir('/tmp');

i've got the following error :

'Zend_Cache_Exception' with message 'cache_dir must be a directory'

although /tmp is a valid directory.

Thanks for help.

Denis.



Re: [fw-general] Bootstrap and modules again

2009-07-06 Thread Václav Vaník


keith Pope-4 wrote:
> 
> 
> I think you may need to put an empty module bootstrap in your admin
> module:
> 
 -- modules
-- admin
-- controllers
-- views
>   Bootstrap.php
-- other-module
> 

Thx, my problem was that i had class Admin_Boostrap extends
Zend_Application_Bootstrap_Bootstrap insteadof
Zend_Application_Module_Bootstrap :)
-- 
View this message in context: 
http://www.nabble.com/Bootstrap-and-modules-again-tp24335501p24353355.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Application is not running the session resource.

2009-07-06 Thread ozzycan

Use

Zend_Session::start();

or

define a new session namespace in your Bootstrap (or elsewhere),

when you're ready to start the session.

"Zend_Application_Resource_Session allows you to configure Zend_Session as
well as optionally initialize a session SaveHandler." It doesn't start it,
AFAIK.



Specks wrote:
> 
> I followed the documentation for configuring the session resource through
> the Application.ini. However Zend_Application doesn't run the Session
> resource to configure sessions.
> 
> I have the following in the ini below the [production] section. I just
> want
> to configure the regular file session. Am I missing anything?
> 
> resources.session.save_path = APPLICATION_PATH "/../data/session"
> resources.session.use_only_cookies = true
> resources.session.remember_me_seconds = 864000
> resources.session.name = "A NAME"
> 
> Any help would be appreciated.
> 
> Jamie
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Application-is-not-running-the-session-resource.-tp24349578p24352157.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Help in creating Dojo Combo Box and Date Picker

2009-07-06 Thread jigen7



Matthew Weier O'Phinney-3 wrote:
> 
> -- jigen7  wrote
> (on Sunday, 05 July 2009, 08:56 PM -0700):
>> Hi I'm new in using Zend Dojo Form and most of the tutorials is for
>> version
>> 1.7 as the latest ver is 1.8 
> 
> The changes to 1.8 will not affect Dojo integration in the least; the
> tutorials that exist are still relevant.
> 
>> can anyone help me to add a combo box in my
>> page where i can select default values or i can input my value when the
>> value is not present in the list and also a date picker. 
> 
> Do you want to know (a) how to do a ComboBox AND (b) how to do a
> DateTextBox, or are you (c) trying to combine the two? The latter, (c),
> is something Dojo specific, and you would need to ask on the Dojo
> mailing lists about creating custom widgets. For the former -- (a)
> and/or (b) -- please read the Zend_Dojo documentation online.
> 
>> how will i declare it in the form.php then create a new form in the
>> controller. what are the codes required in the layout so the dojo
>> elements will run thanks  
> 
> -- 
> Matthew Weier O'Phinney
> Project Lead| matt...@zend.com
> Zend Framework  | http://framework.zend.com/
> 
> 

the documentation is not that accurate as i dont have experience how to
implement it 1st. I just want to display a combo box and a date picker
separately
-- 
View this message in context: 
http://www.nabble.com/Help-in-creating-Dojo-Combo-Box-and-Date-Picker-tp24349470p24350981.html
Sent from the Zend Framework mailing list archive at Nabble.com.