Re: cakephp3 errors..... after edit db info

2015-06-30 Thread Eric Haskins
Yeah I have dedicated servers so not run by GoDaddy let me know.  Since I 
host many sites I am looking into having php 5.5  and php 5.4 for some our 
hosting customers.

I see no issues with cakephp 3 and 5.5 . so maybe they need to change 
minimum requirements 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakephp3 errors..... after edit db info

2015-06-28 Thread Eric Haskins

> Hey All
>
> So Im trying to get version 3 running.  Aside from not liking the composer 
> BS Im having a issue with initial install and setup.  I get it running at 
> http://cake3.farsightedmedia.com on the initial setup and works fine as 
> soon as I change the DB credentials 
>
> //'port' => 'nonstandard_port_number',
> 'username' => 'my_app',
> 'password' => 'secret',
> 'database' => 'my_app',
> 'encoding' => 'utf8',
> 'timezone' => 'UTC',
> 'cacheMetadata' => true,
>
> To actual working credentials I am presented with these errors and they 
> dont go away even if I rollback the changes
>
>
> *Fatal error*: Call to undefined method 
> Cake\Datasource\ConnectionManager::_config() in 
> */home/farsight/public_html/cake3/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php*
>  on 
> line *80*
>
> *Fatal error*: Call to undefined method Cake\View\StringTemplate::get() 
> in 
> */home/farsight/public_html/cake3/vendor/cakephp/cakephp/src/View/StringTemplate.php*
>  on 
> line *176*
>
> I have many apps I would like to start porting over to version 3  
>   Ny servers are all CPanel Suphp
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


cakephp3 errors..... after edit db info

2015-06-28 Thread Eric Haskins
Hey All

So Im trying to get version 3 running.  Aside from not liking the composer 
BS Im having a issue with initial install and setup.  I get it running at 
http://cake3.farsightedmedia.com on the initial setup and works fine as 
soon as I change the DB credentials 

//'port' => 'nonstandard_port_number',
'username' => 'my_app',
'password' => 'secret',
'database' => 'my_app',
'encoding' => 'utf8',
'timezone' => 'UTC',
'cacheMetadata' => true,

To actual working credentials I am presented with these errors and they 
dont go away even if I rollback the changes


*Fatal error*: Call to undefined method 
Cake\Datasource\ConnectionManager::_config() in 
*/home/farsight/public_html/cake3/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php*
 on 
line *80*

*Fatal error*: Call to undefined method Cake\View\StringTemplate::get() in 
*/home/farsight/public_html/cake3/vendor/cakephp/cakephp/src/View/StringTemplate.php*
 on 
line *176*

I have many apps I would like to start porting over to version 3    
Ny servers are all CPanel Suphp

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


file upload

2014-07-23 Thread Eric Yullu
created an application that is utlizing file upload, but when i click 
download button i get error, media.ctp not found

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Pagination Sort, Resetting Data

2014-02-27 Thread Eric Chan
Hello,

I just starting baking with CakePHP and I'm slowly grasping the basics.

So far I've created a view to display all the data in table format from a 
table in the database with pagination.
There is a column in the table that contains browser information (Firefox, 
Chrome, Safari...etc).
So on the view I made some checkboxes using Form->checkbox, with each check 
box representing a browser. 
When the the submit button is pressed, the POST request is sent to the 
searchByBrowser function in the controller and 
the view is updated with the appropiate data.

Now I am adding sort() functionality using Paginator->sort() and it sorts 
by the specified column just fine.  

However, when I use the searchByBrower function to get the appropiate view 
and then try and sort the displayed data, it resets everything
to showing all the full dataset and the checkbox is no longer checked.

Is there a way to get everything to work the way it should with just 
CakePHP?

Thanks.




1 - Full data set view




2 - Just Firefox data



3 - Sorted on http_method, full dataset again (instead of just firefox data)





-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: how to get cache file name in arabic language

2013-09-27 Thread Eric Haskins
That is going to be tied to the OS the files are on. Most Linux webservers 
won't support that charset. You will need to come up with another way

Eric

On Thursday, September 26, 2013 7:50:57 AM UTC-4, Mokdij wrote:
>
> I am developing a website in Arabic language, i need to use a slug in 
> Arabic characters but my problem is that the cache file name show 
> characters like Ù«, ØÃ, ì, ù, à in place of normal characters.
>
> example :
> post_من-نحن ==> the slug is: من-نحن
>
> post_٬مŠ-ومدØ٠ع-كمروي-ÙÙŠ-تØرÙات-ااØ
>
> so how to do to get a cache file name in arabic language ?
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: hasMany weirdness

2013-09-15 Thread Eric Haskins
Yeah I have the primaryKey Set on all the models that don't use just "id" 
 that's why I posted it here to see if anyone else had seen this behavior. 
 Its weird because its consistently the same records that will show blank 
players arrays or Team arrays.   So I just started writing custom queries 
with joins using $this->PlayersToSeasons->query() and the problem is gone. 
I know that will send some Framework nazi's into committing suicide but you 
do what you have to to make your app work. Till I can sort out why cake is 
hanging me out to dry lol

Eric Haskins
High Octane Brands LLC


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: hasMany weirdness

2013-09-13 Thread Eric Haskins
Ok Ill have to wait code is in production right now. 

On Friday, September 13, 2013 2:40:16 PM UTC-4, John Andersen wrote:
>
> Please ensure that the Players, Seasons and Divisions tables primary key 
> is ID and not like tablename_id.
> When done, try again :)
> Enjoy, John
>
> On Friday, 13 September 2013 01:58:43 UTC+3, Eric Haskins wrote:
>>
>> Has anyone else seen where hasMany returns empty arrays's?  Example 
>>
>> Players
>> player_id
>>
>> Seasons
>> season_id
>>
>> Divisions
>> division_id
>>
>> PlayersToSeasons < - hasMany Players, Seasons, Divisions,
>> id
>> season_id
>> player_id
>> division_id
>>
>>
>> So many will come back perfect out of 300 players maybe 20 records will be
>>
>> Array(
>>
>>  [200] => array(
>>[PlayersToSeasons] => array(
>>id => 3
>>season_id => 3
>>.   
>>),
>>[Players] => array(
>>),
>>[Divisions] => array(
>>)
>> )
>> )
>>
>> So the parent where the find is called is perfect but the Players array 
>> will be blank or the Divisions array will be blank.
>>
>> I was forced to write individual queries for all the records I needed.  I 
>> checked all the foreignkeys were the same type and everything
>>
>>
>>  
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


hasMany weirdness

2013-09-12 Thread Eric Haskins
Has anyone else seen where hasMany returns empty arrays's?  Example 

Players
player_id

Seasons
season_id

Divisions
division_id

PlayersToSeasons < - hasMany Players, Seasons, Divisions,
id
season_id
player_id
division_id


So many will come back perfect out of 300 players maybe 20 records will be

Array(

 [200] => array(
   [PlayersToSeasons] => array(
   id => 3
   season_id => 3
   .   
   ),
   [Players] => array(
   ),
   [Divisions] => array(
   )
)
)

So the parent where the find is called is perfect but the Players array 
will be blank or the Divisions array will be blank.

I was forced to write individual queries for all the records I needed.  I 
checked all the foreignkeys were the same type and everything


 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: live validation

2013-08-18 Thread Eric Haskins
So when your server side validation fails the email for the same reason as 
the Live version Dave it some how doesnt expose the users??  

I see you post over and over and Im not sure you have thought out your 
argument 


Eric Haskins


On Friday, August 16, 2013 7:00:34 PM UTC-4, advantage+ wrote:
>
> Live validation exposes all your users. Its too easy to just change filed 
> named and presto you can see if a valid email /  username and a hacker can 
> get to do whatever. Never ever return info to a user.
>
>  
>
> I made a live validation component then hacked it, If you hit the database 
> you give up all validation rules.
>
>  
>
> *Dave *
>
> *From:* cake...@googlegroups.com  [mailto:
> cake...@googlegroups.com ] *On Behalf Of *euromark
> *Sent:* Friday, August 16, 2013 5:10 PM
> *To:* cake...@googlegroups.com 
> *Subject:* Re: bootstrap twitter typeahead , dont work for me in cakephp
>
>  
>
> Never create a new response object
>
> there is already one available in your controller
>
>  
>
> just use 
>
>  
>
> $this->response->body($content);
>
>  
>
> as documented
>
>
>
> Am Freitag, 16. August 2013 19:16:32 UTC+2 schrieb cesar calvo:
>
> I use this in my AppController
>
> public function jsonResponse($array) {
> return new CakeResponse(array('body' => json_encode($array)));
> }
>
> Then on a controller call jsonResponse
>
>
> Note: if you are usin Security component on beforeFilter:
>
> if ($this->request->is('ajax')) $this->Security->unlockedActions = 
> array($this->request->action);
>
> On Thursday, August 15, 2013 11:03:34 PM UTC-3, Renato Bigliazzi wrote:
>
> Hi , I can not do the twitter bootstrap component typeahead work with 
> cake. i use https://github.com/rudylee/cbunny , but dont work form me.
>
>  
>
>  
>
> In my view
>
>  
>
> JS
>
>  
>
> 
>
>  $(document).ready(function(){ 
>
> $('#itemdesc').typeahead({
>
> source: function (query, process) {
>
>   return $.ajax({
>
> url:'<?php echo 
> Router::url(array('controller'=>'Invoices','action'=>'localizaprodutos'));?>',
>
> type: 'get',
>
> data: {q: query},
>
> dataType: 'json',
>
> success: function (json) {
>
>   return process(json);
>
> }
>
>   });
>
> }
>
>   });
>
> });
>
> 
>
>  
>
> HTML
>
>  data-provide="typeahead"/>
>
>  
>
>  
>
> and controller
>
>  
>
> public function localizaprodutos(){
>
> 
>
> $this->autoRender = false;
>
> $this->RequestHandler->respondAs('json');
>
>  
>
> // get the search term from URL
>
> $term = $this->request->query['q'];
>
> $users = 
> $this->Invoice->Invoicedetail->Inventoryitem->find('all',array(
>
> 'conditions' => array(
>
> 'Inventoryitem.desc LIKE' => '%'.$term.'%'
>
> )
>
> ));
>
>  
>
> // Format the result for select2
>
> $result = array();
>
> foreach($produtos as $key => $produto) {
>
> array_push($result, $produto['Inventoryitem']['desc']);
>
> }
>
> $produtos = $result;
>
> 
>
> echo json_encode($produtos);
>
> }
>
>  
>
>  
>
> Thanks
>
>  
>
> Renato
>
>  
>
>  
>
>  
>
>  
>
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+u...@googlegroups.com .
> To post to this group, send email to cake...@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Where are the sites?

2013-08-18 Thread Eric Haskins
Dave,

 I have some Open-Source but I have some proprietary stuff I am 
developing mainly in the SaaS market with CakePHP I would love to share but 
then I lose my companies edge.

Eric Haskins
http://highoctanebrands.com

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: install cakephp with on a sub-domain

2013-08-16 Thread Eric Haskins
Change your RewriteBase /client  

 
RewriteEngine On
RewriteBase /client/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]


Your /login route would be root SPIP directory.  If you have full control 
of the server  I would put in its own account or docroot anyway I hate 
nested sites. I do this for my hosting customers all the time


Eric Haskins
High Octane Brands 
http://highoctanebrands.com

On Friday, August 9, 2013 11:20:59 AM UTC-4, gannher wrote:
>
> I have one web server. I would like run 2 website on this server. 1 
> website with SPIP (already running good) and 1 website with cakephp 
> (problem with it).
>
> > SPIP => /var/www/vitrine/
> > 
> > cakephp => /var/www/client/
>
> The cakephp website is accessible by `client..eu` but when i go to 
> this address, i have a 404 error. Can you say me why ? 
>
> Here my /etc/apache2/sites-available/default :
>
> 
>   ServerAdmin webmaster@localhost
>  
>   DocumentRoot /var/www/vitrine
>   ServerName .eu
>   
> Options FollowSymLinks
> AllowOverride All
>   
>   
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
>   
>  
>   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>   
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
>   
>  
>   ErrorLog ${APACHE_LOG_DIR}/error.log
>  
>   # Possible values include: debug, info, notice, warn, error, crit,
>   # alert, emerg.
>   LogLevel warn
>  
>   CustomLog ${APACHE_LOG_DIR}/access.log combined
> 
>  
> 
>  
>   DocumentRoot /var/www/client/app/webroot
>   ServerName client..eu
>   
> Options Indexes FollowSymlinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
>   
>  
> 
>
>
> Here the /var/www/client/app/.htaccess :
>
> 
> RewriteEngine on
> RewriteBase /
> RewriteRule^$webroot/[L]
> RewriteRule(.*) webroot/$1[L]
> 
>
> Here the /var/www/client/app/webroot/.htaccess :
>
> 
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ index.php [QSA,L]
> 
>
> Thanks :)
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Data validation: Client or Server?

2013-08-16 Thread Eric Haskins
Dave,

 I agree you can over expose but its still valid data by the time it 
gets to the database. We are constantly trying to build a better mousetrap 
to stop people from using servers to submit signups for sites like 
Voodoo.com. So I built a two stage form that asks your name ,company, and 
country.  Which makes a request for cached i18n data of required fields 
like some countries require County or Region etc.  

So basically they made a decision no javascript = no sign up.  Bogus 
signups dropped way off and server load decreased (was never a problem but 
was a noticeable decrease). I still see some good bots getting thru but we 
also store Render time and Submit time which cleaned out a bunch more.

Its fun :-)

Eric Haskins
High Octane Brands 
http://highoctanebrands.com  



On Friday, August 16, 2013 9:59:30 PM UTC-4, advantage+ wrote:
>
> Good stuff, but just think about how it can be manipulated.
>
>  
>
> Filed, for example you mighr be validating Susans hair colur down the 
> road. 
>
> Few tweeks with Firebug and I change to input to [user]…… presto now I can 
> see if you have a valid user, password.
>
>  
>
> Sure I have to try over and over but it exposed you validation set on the 
> model.
>
>  
>
> Stay away from live validation as such it sucks!
>
>  
>
>  
>
> *Dave *
>
> *From:* cake...@googlegroups.com  [mailto:
> cake...@googlegroups.com ] *On Behalf Of *Eric Haskins
> *Sent:* Friday, August 16, 2013 9:29 PM
> *To:* cake...@googlegroups.com 
> *Subject:* Re: Data validation: Client or Server?
>
>  
>
>  
>
> We always use both if not both server-side 
>
>  
>
>  
>
> Eric Haskins
>
> High Octane Brands 
>
> http://highoctanebrands.com
>
> On Friday, August 16, 2013 7:32:29 AM UTC-4, 
> jer...@anthemwebsolutions.comwrote:
>
> I wanted to get some opinions on this. Cake's validation structure is easy 
> to apply and works flawlessly (so far, wink,wink). But I've also written 
> some data validation with jQuery which is activated at the client side. 
>
> Is there still a need to validate at the server if most browsers support 
> javascript? Do some of you leave off the server side validation in lieu of 
> client side? How's that HTML5 data validation working for you?
>
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+u...@googlegroups.com .
> To post to this group, send email to cake...@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Data validation: Client or Server?

2013-08-16 Thread Eric Haskins

We always use both if not both server-side 


Eric Haskins
High Octane Brands 
http://highoctanebrands.com

On Friday, August 16, 2013 7:32:29 AM UTC-4, jer...@anthemwebsolutions.com 
wrote:
>
> I wanted to get some opinions on this. Cake's validation structure is easy 
> to apply and works flawlessly (so far, wink,wink). But I've also written 
> some data validation with jQuery which is activated at the client side. 
>
> Is there still a need to validate at the server if most browsers support 
> javascript? Do some of you leave off the server side validation in lieu of 
> client side? How's that HTML5 data validation working for you?
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


loginError Element

2013-08-15 Thread Eric Haskins
Afternoon all,

 I am having an issue with the Auth Component.  I set  'flash' => 
array('key'=>'auth','element'=>'alerts/error'),  in my Auth config in 
appcontroller.  Permission errors work fine but invalid login is still 
using default element. Am I missing something somewhere?

'Auth' => array(
'authorize' => array('Tiny'),
'authenticate' => array(
'all' => array('userModel' => 'Account'),
'Form' => array(
'fields' => array('username' => 'email', 'password' => 
'password'),
'scope' => array(
'Account.is_active' => 'yes'
),
'recursive' => 1,
)),
'flash' => array('key'=>'auth','element'=>'alerts/error'),
'loginRedirect' => array('controller' => 'home', 'action' => 
'index'),
'logoutRedirect' => array('controller' => 'account', 'action' 
=> 'login'),
'loginAction' => '/login',
)

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


CakePHP 2.x Date Field Helper set year?

2013-08-07 Thread Eric Haskins
Hey everyone quick question. 

 I have an app and Im having issues with "Users" setting birthdates to 
2013-12-13 as an example.  I know I should have a validator to make sure it 
isnt a future date but is there a way to seed the start year say 4 years 
ago?  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache Help

2013-08-01 Thread Eric Haskins
Here is one of my models for dynamic forms. I hope it helps this is CakePHP 
2.x  so I clear cache afterSave (editing a forms structure) or afterDelete 
(selfexplanatory)  

class Forms extends AppModel {
public $primaryKey = 'id';

public function afterSave($created) {
parent::afterSave($created);
Cache::clear();
clearCache();
}

public function  afterDelete() {
parent::afterDelete();
Cache::clear();
clearCache();
}

public function getFormsById($id){
if (($form = Cache::read('getFormsById'.$id)) === false) {
$form = $this->find('first', array('conditions' => 
array('Forms.id'=>$id,'Forms.site_id'=> 
 Configure::read('Settings.site_id';
Cache::write('getFormsById'.$id, $form);
}
return $form;
}
}

Hope this helps.  I am new to Cake cache so if I am wrong someone please 
feel free to point it out

Eric Haskins
High Octane Brands LLC
"Building Brands Not Just Business"

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




2.3 Checkbox validation

2013-07-30 Thread Eric Haskins
Ok I must be doing something wrong on my checkbox validation because its 
always invalid

Snip of validation:

'agever' => array(
'notEmpty' => array(
'rule' => array('equalTo', 'yes'),
'required' => true,
'message' => 'We require you to be over 13 to register without a 
Parent.'
)
),
'agreeterms' => array(
'notEmpty' => array(
'rule' => array('equalTo', 'yes'),
'required' => true,
'message' => 'Please Agree to the Terms if you want to proceed.'
)
),


part of the form

echo 
$this->Form->input('agever',array('type'=>'checkbox','value'=>'yes','label' 
=>'Are you over the age of 13'));
echo 
$this->Form->input('agreeterms',array('type'=>'checkbox','value'=>'yes','label' 
=> 'I agree to the Terms & 
Conditions'));

What the heck am I doing wrong here. 




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirect images url from live javascript

2013-07-06 Thread Eric Haskins
Its a hack and Im just taking a shot in the dark with no idea how you get 
the tags code wise but


var imgurl = '<img src="./images/file.png">'; // I assume this is already 
in a var somewhere just putting for sake of understanding
imgtag = imgurl.replace("./","/ticketstaff/");

alert(imgtag);


Handles the url change.  You need to also download the images or do you 
have them??

Eric

On Thursday, July 4, 2013 2:46:18 AM UTC-4, baur79 wrote:
>
> hi,
>
> i have use the 3rd party jquery ajax javascript 
> it returns me the live code which contain img tags
> as 
>
> my url is example.com/tickets/
> (controller name is TicketsController.php)
>
> so img full path became as example.com/tickets/images/file.png
> and gives me error as
>
> Error: The action images is not defined in controller TicketsController 
> Error: Create TicketsController::images() in file: 
> app/Controller/TicketsController.php. 
>   public function images() { 
>  }
>  } 
> Notice: If you want to customize this error message, create 
> app/View/Errors/missing_action.ctp
>
> how can i redirect only images url to 
> example.com/ticketstaff/images/file.png
> and place the images in folder 
> app/webroot/ticketstaff/images/
>
>
>
>
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirect images url from live javascript

2013-07-06 Thread Eric Haskins
Trying to dechiper the question but I think he is getting the img tags via 
Ajax to render on his site. Can you give us the code you use to request 
said images and maybe we can give you some direction or js code to help you

Eric 


On Thursday, July 4, 2013 2:46:18 AM UTC-4, baur79 wrote:
>
> hi,
>
> i have use the 3rd party jquery ajax javascript 
> it returns me the live code which contain img tags
> as 
>
> my url is example.com/tickets/
> (controller name is TicketsController.php)
>
> so img full path became as example.com/tickets/images/file.png
> and gives me error as
>
> Error: The action images is not defined in controller TicketsController 
> Error: Create TicketsController::images() in file: 
> app/Controller/TicketsController.php. 
>   public function images() { 
>  }
>  } 
> Notice: If you want to customize this error message, create 
> app/View/Errors/missing_action.ctp
>
> how can i redirect only images url to 
> example.com/ticketstaff/images/file.png
> and place the images in folder 
> app/webroot/ticketstaff/images/
>
>
>
>
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Salesforce Integration

2013-07-06 Thread Eric Haskins
Custom Auth?  Im not familiar with the Salesforce API if I have some free 
time this weekend I will try and have a look

Eric Haskins
High Octane Brands

On Friday, June 28, 2013 6:29:59 PM UTC-4, chris graber wrote:
>
> Anyone integrate with Salesforce? I'm trying out several things (PHP 
> Toolkit, etc). Looking for a slam dunk solution so I don't have to do 
> something fully custom. I need to make a site where users are 
> authenticated, but the user/pass are in a Salesforce object. So behind the 
> scenes a connection to Salesforce is made and the user info is looked up.
>
> Ideas?
>
> -c
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Disable pagination in one action

2013-07-04 Thread Eric Haskins
I agree with AD7six why would you need to disable instead of 

$news = $this->paginate('News');

do this and no paginator

$news = $this->News->find('all');

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cakephp Manual Auth login returns true, but not logged in another page

2013-06-21 Thread Eric Haskins
Where do you have your auth stuff setup in appcontroller beforeFilter?

if so make sure the controllers extending AppController have 

public function beforeFilter() {
parent::beforeFilter();
}

I had a similar issue with logins not persisting 

Eric

On Thursday, June 20, 2013 6:37:44 PM UTC-4, Rahul Reddy wrote:
>
> In my cakephp(v 2.3.4) app, I am using the code below to manually login 
> users after they register, as provided in the 
> manual<http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#manually-logging-users-in>
> .
>
> if ($this->User->save($this->request->data)) {
> $id = $this->User->id;
> $this->request->data['User'] = 
> array_merge($this->request->data['User'], array('id' => $id));
> if($this->Auth->login($this->request->data['User'])) {
>   $this->redirect('/homepage');
> }
> }
>
> I am getting the $this->Auth->login($this->request->data['User']) response 
> as true and it is getting redirected to the home page. But the user is not 
> logged in homepage (or in any other page). Please help me in fixing this. 
> Thanks in advance.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: requestAction and Auth issues

2013-06-21 Thread Eric Haskins
Yes it is an element

On Friday, June 21, 2013 2:23:34 PM UTC-4, euromark wrote:
>
> where do you run this statement?
> in the view ctp?
>
>
> Am Freitag, 21. Juni 2013 18:31:07 UTC+2 schrieb Eric Haskins:
>>
>> Hey All,
>>
>>   I am running cakePhp latest and I just ran into an issue with 
>> requestAction and my auth.   It seems like even though I allow index action 
>> in my NewsController 
>>
>> $latest_news = $this -> requestAction(array('controller' => 
>> 'news','action' => 
>> 'index'),array('named'=>array('limit'=>10,'sort'=>'desc')));   
>>
>> will result in a "Your Not Authorized To View This" redirect to 
>> login Im stumped should I move my auth to a different location than 
>> beforeFilter in appcontroller?
>>
>>
>> Eric
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




requestAction and Auth issues

2013-06-21 Thread Eric Haskins
Hey All,

  I am running cakePhp latest and I just ran into an issue with 
requestAction and my auth.   It seems like even though I allow index action 
in my NewsController 

$latest_news = $this -> requestAction(array('controller' => 'news','action' 
=> 'index'),array('named'=>array('limit'=>10,'sort'=>'desc')));   

will result in a "Your Not Authorized To View This" redirect to 
login.... Im stumped should I move my auth to a different location than 
beforeFilter in appcontroller?


Eric

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: unlink()

2013-06-21 Thread Eric Haskins
That looks like your host has disabled the unlink command

Eric
High Octane Brands

On Friday, June 21, 2013 8:00:06 AM UTC-4, raj kumar Pustela wrote:
>
> Hi to all,
>
>   how to resolve below this one.. If you know any one Please help me.
>
>
> Warning: unlink() has been disabled for security reasons in 
> /home/zapojetc/public_html/kake/lib/Cake/Cache/Engine/FileEngine.php on 
> line 243
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: One page with Search/Edit/Add and Delete Buttons

2013-06-20 Thread Eric Haskins
Im assuming the if() is in your controller not a view file??   


Here is a snip of a view for one of my older apps I am working on updating. 
 I use postLinks like this

0){
foreach ($divisions AS $row){
?>




Form->postLink('Edit', 
array('action' => 'edit', 
$row['Divisions']['division_id']),
array('class'=>'button blue'));?>
Form->postLink('Delete', 
array('action' => 'delete', 
$row['Divisions']['division_id']),
array('class'=>'button red', 'confirm' => 'Are you 
sure?'));?>




    No 
Divisions Configured



The delete button would then post to the delete() function in the 
controller etc

Eric

On Thursday, June 20, 2013 8:04:03 AM UTC-4, Mahdi Miad wrote:
>
> Hi all,
> I am new in CakePHP, I developed some applications before and now I need 
> to create my application same as before but with cakePHP, so what I need is 
> one page with add,edit,search and delete button, if I click on search 
> button I need to call search method and edit button with edit method and so 
> on. here is some of my code.
> Thanks for your time.
>
> 
>
> if (isset($this->request->data['Search'])) { 
> // call Search method with EmployeeID as a primery key
>
> } else if (isset($this->request->data['Add'])) { 
>  // call Add method
>
> }else if (isset($this->request->data['Edit'])) { 
> // call Edit method
>
> }else if (isset($this->request->data['Delete'])) { 
> // call Delete method
> }
>
>
>
> echo $this->Form->create('myModel' );
>
> echo $this->Form->input('EmployeeID');
> echo $this->Form->input('First Name' );
> echo $this->Form->input('Last Name');
> echo $this->Form->input('Departement');
> echo $this->Form->input('Address'); 
>   
>
> echo $this->Form->submit('Search' , array('name' =>'Search'  ));
> echo $this->Form->submit('Add' , array('name' =>'Add'));
> echo $this->Form->submit('Edit' , array('name' =>'Edit'));
> echo $this->Form->submit('Delete', array('name' =>'Delete'   ));
>  
>
> echo $this->form->end();
> ?>
>  
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Can anyone help me with editing post_tags ???

2013-06-19 Thread Eric Haskins
What are you trying to do??  Example code?
 

Eric 

On Wednesday, June 19, 2013 4:55:49 AM UTC-4, Lilit Bakunts wrote:
>
>
>
>
>
> -- 
> View this message in context: 
> http://cakephp.1045679.n5.nabble.com/Can-anyone-help-me-with-editing-post-tags-tp5715315.html
>  
> Sent from the CakePHP mailing list archive at Nabble.com. 
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Error: Mysql requires a database connection

2013-06-18 Thread Eric Haskins
Raxit,

   Did you edit the settings to match your User and password for your Mysql 
instance? Mysql is running?

Eric

On Tuesday, June 18, 2013 12:28:00 PM UTC-4, Raxit wrote:
>
> Hi raj kumar,
>
> I have added database.php file with same content under config folder still 
> it gives same error. I am using cake php so it might be reason for this 
> problem. I have check the mysql connection file under webroot, it is 
> working perfectly fine but problem occurs when i call index.php.
>
> Thanks
> Raxit
>
> On Tuesday, June 18, 2013 8:53:12 PM UTC+5:30, raj kumar Pustela wrote:
>>
>> Hi..
>>  do u have database.php file in your config folder.
>>  
>>  If don't create database.php file in your config folder
>>
>>   Follow below process .. it's as a simple.
>>
>> create the database.php file and past the below code.
>>
>> > class DATABASE_CONFIG {
>>
>> public $default = array(
>> 'datasource' => 'Database/Mysql',
>> 'persistent' => false,
>>  'host' => 'localhost',
>> 'login' => 'root',
>> 'password' => '',
>>  'database' => 'test',
>> 'prefix'=>'zp_',
>> );
>> }
>>
>>
>> On Tue, Jun 18, 2013 at 4:56 PM, Raxit  wrote:
>>
>>> *Hi,
>>> *
>>>
>>> *I am facing this problem from past 5 days. Didn't find any solution. I 
>>> have checked connection many times. my team have also checked all the 
>>> connections with Mysql. File is also present under same path.
>>> *
>>>
>>> *Error: * Confirm you have created the file : app\Config\database.php.
>>>
>>> *Notice: * If you want to customize this error message, create 
>>> app\View\Errors\missing_connection.ctp.
>>> Stack Trace 
>>>
>>>- ROOT\lib\Cake\Model\ConnectionManager.php line 
>>> 101<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> DboSource->__construct(array)<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>
>>>  
>>>- ROOT\lib\Cake\Model\Model.php line 
>>> 3417<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> ConnectionManager::getDataSource(string)<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>
>>>  
>>>- ROOT\lib\Cake\Model\Model.php line 
>>> 1083<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> Model->setDataSource(string)<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>
>>>  
>>>- ROOT\lib\Cake\Model\Model.php line 
>>> 3443<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> Model->setSource(string)<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>
>>>  
>>>- ROOT\lib\Cake\Model\Model.php line 
>>> 2698<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> Model->getDataSource()<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>
>>>  
>>>- APP\Model\Setting.php line 
>>> 16<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> Model->find(string)<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>
>>>  
>>>- APP\Controller\FunfordayController.php line 
>>> 268<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> Setting->updateCache()<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>
>>>  
>>>- APP\Controller\FunfordayController.php line 
>>> 47<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> FunfordayController->_loadSettings()<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>
>>>  
>>>- [internal 
>>> function]<http://www.locustgrovefamilymedicine.com/funforday/app/webroot/index.php/#>→
>>>  
>>>
>>> FunfordayController->beforeFilter(CakeEvent)<http://w

Re: login error

2013-06-18 Thread Eric Haskins
Tiago,

We are going to need a bit more to go on. can you post your Candidatos 
controller and model?

Eric 
High Octane Brands

On Monday, June 17, 2013 3:51:02 PM UTC-4, Tiago Cosme wrote:
>
> friends,
>
> I have a problem in cakephp. Simply my application stopped working basic 
> requirements and do not know why. The cakephp not perform the login, do 
> not accuse me session errors (if the user is logged in / not logged in). 
> He does not charge anything for the view. What could it be? because there 
> appears error in no time.
>
> Eg
>
> http://www.recrutalent.com.br/Candidatos/login
>
> Enter email and password whatsoever! it returns nothing. : (I'm trying to 
> solve for three days).
>
> Thank you!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to edit a view in Cake php

2013-06-18 Thread Eric Haskins
Do you have a Customers Model? I have models for all of my tables




On Monday, June 17, 2013 5:38:40 PM UTC-4, Raks wrote:
>
> Returns an Error 
>
> {"code":500,"url":"\/products\/listing_data.json","name":"Call to a member 
> function find() on a non-object"}
>
>
>
> On Mon, Jun 17, 2013 at 1:26 PM, Gaurav Matta 
> 
> > wrote:
>
>> If you only want name of customers then you can add public $uses= 
>> array('product','customer'); as a datamember in your controller class
>>
>> And you can use $this->customer->find('all') in ur action
>>
>> Let me know if this helps
>> On 17-Jun-2013 11:08 PM, "Raks" > wrote:
>>
>>>  Have added a new Column... but m not able to get a column data from 
>>> other model. I want name from customers table in products view.ctp. 
>>>
>>> here's the view code:
>>> *>> $records = array();
>>> foreach ($products as $product){
>>>
>>> $status = ($product['Product']['is_active'] == '1') ? 'Enabled' : 
>>> 'Disabled';
>>>
>>> $records[] = array(
>>> 'Product.model' => array('title' => 
>>> $product['Product']['model'], 'id' => $product['Product']['id']),
>>> 'Product.part_num' => 
>>> $product['Product']['part_num'],
>>> 'ProductFamily.name' => 
>>> $product['ProductFamily']['name'],
>>>// shows customer id.. but want customer name 
>>> from customers table according to customer id. 
>>>   //'Customer.name'=>$product['ProductFamily']['customer_id'],
>>> 'Product.iron_oem' => 
>>> ($product['Product']['iron_oem']) ?  'Iron Systems':'Third Party',
>>> 'ProductType.title' => 
>>> $product['ProductType']['title'],
>>> 'Product.is_active' => $status,
>>> );
>>> }
>>>
>>> $data = json_encode($records);
>>> $ret = "{data:" . $data .",\n";
>>> $ret .= "pageInfo:{totalRowNum:" . $total . "},\n";
>>> $ret .= "recordType : 'array'}";
>>> echo $ret;
>>> ?>*
>>> On Friday, June 7, 2013 11:40:19 AM UTC-7, Raks wrote:

 Hi,
  
 I Have a piece of code having view, model and controller . I nee dto 
 make changes to view only not in the database. 
 So how can i do that. Do I need to edit model and controller as well. 
 I am new to Cakephp and MVC framework too. 
  
 Thanks. 

>>>  -- 
>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>> Find us on Twitter http://twitter.com/CakePHP
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "CakePHP" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to cake-php+u...@googlegroups.com .
>>>
>>> To post to this group, send email to cake...@googlegroups.com
>>> .
>>> Visit this group at http://groups.google.com/group/cake-php.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>  -- 
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "CakePHP" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/cake-php/2KJFo4Ix7Ew/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> cake-php+u...@googlegroups.com .
>> To post to this group, send email to cake...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/cake-php.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> ---*Ravinder Kaur* 
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Switch "validation set" within model?

2013-06-18 Thread Eric Haskins

class Sites extends AppModel {

 public function dataValidate1(){
  $validatevar = array(
 'firstname' => array(
  'mustNotEmpty' => array(
  'rule' => 'notEmpty',
  'message' => 'Please enter your First Name')
  )
);
 $this->validate = $validatevar;
  return $this->validates();
 }
 public function dataValidate2(){
  $validatevar = array(
 'firstname' => array(
  'mustNotEmpty' => array(
  'rule' => 'notEmpty',
  'message' => 'Please enter your First Name')
  ),
  'lastname' => array(
  'mustNotEmpty' => array(
  'rule' => 'notEmpty',
  'message' => 'Please enter your First Name')
  )
);
 $this->validate = $validatevar;
  return $this->validates();
 }
}

In controller:
if ($this->Sites->dataValidate1()) {   <--- Change to whatever validate 
function?
$this->Sites->save($this->request->data, false);
$this->Session->setFlash(__('Your account has been 
successfully updated'),'default',array('class'=>'alert succes_msg'));
$this->redirect('/admin/sites/account');
}

Works for me Not sure if its right or proper (still new to cake)
   

Eric

On Thursday, June 13, 2013 2:55:08 AM UTC-4, LDSign wrote:
>
> Hi
>
> I would liket to switch a complete "validation set" for a model (in the 
> controller). Deeper levels of the application requires more and more user 
> data, so I had the idea to define multiple validation sets within the 
> models for each level.
>
> Best solution will be an automatic switch for a specified action.
>
> Ive already searched a litte and found this:
>
> http://php.dzone.com/news/cakephp-12-multiple-validation
>
> Unfortunatley this is for Cake 1.2 - does anyone have a working solution 
> for 2.3.6?
>
> Or is there a better approach of doing this?
>
> Thanks,
> Frank
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to edit a view in Cake php

2013-06-17 Thread Eric Haskins
Not sure how your getting your *$products *array

You could use a 

$products = $this->{Model}->find('all',array(

'joins' => array(
array(
'table' => 'customers',
'alias' => 'CustomerJoin',
'type' => 'INNER',
'conditions' => array(
'CustomerJoin.customer_id = ProductFamily.customer_id'
)
)
)));

Again I dont know the code before or your table names

Eric

On Monday, June 17, 2013 1:37:38 PM UTC-4, Raks wrote:
>
> Have added a new Column... but m not able to get a column data from other 
> model. I want name from customers table in products view.ctp. 
>
> here's the view code:
> * $records = array();
> foreach ($products as $product){
>
> $status = ($product['Product']['is_active'] == '1') ? 'Enabled' : 
> 'Disabled';
>
> $records[] = array(
> 'Product.model' => array('title' => 
> $product['Product']['model'], 'id' => $product['Product']['id']),
> 'Product.part_num' => 
> $product['Product']['part_num'],
> 'ProductFamily.name' => 
> $product['ProductFamily']['name'],
>// shows customer id.. but want customer name 
> from customers table according to customer id. 
>   //'Customer.name'=>$product['ProductFamily']['customer_id'],
> 'Product.iron_oem' => 
> ($product['Product']['iron_oem']) ?  'Iron Systems':'Third Party',
> 'ProductType.title' => 
> $product['ProductType']['title'],
> 'Product.is_active' => $status,
> );
> }
>
> $data = json_encode($records);
> $ret = "{data:" . $data .",\n";
> $ret .= "pageInfo:{totalRowNum:" . $total . "},\n";
> $ret .= "recordType : 'array'}";
> echo $ret;
> ?>*
> On Friday, June 7, 2013 11:40:19 AM UTC-7, Raks wrote:
>>
>> Hi,
>>  
>> I Have a piece of code having view, model and controller . I nee dto make 
>> changes to view only not in the database. 
>> So how can i do that. Do I need to edit model and controller as well. 
>> I am new to Cakephp and MVC framework too. 
>>  
>> Thanks. 
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: SaaS and AppController

2013-06-17 Thread Eric Haskins
Thx AD  

 I didnt realize the placeholders I had in the layout were the culprit

Eric

On Monday, June 17, 2013 9:19:31 AM UTC-4, AD7six wrote:
>
>
>
> On Monday, 17 June 2013 14:53:26 UTC+2, Eric Haskins wrote:
>>
>> I have an app I am working on and I was wondering if this is the designed 
>> behavior.   As usual my controllers extend AppController I use the 
>> beforeFilter() to determine the site the request is for and setup the 
>> environment widgets,auth etc.
>>
>> My concern is if I put a mail() in the beforeFilter and call the app I 
>> get 9 emails for one request. 
>>
>
> if you log $this->here, you'll almost certainly find that there are 9 
> emails for 9 requests (/expected/url, /expected/url/css/missing.css, 
> /expected/url/js/missing.js, etc.); that or there are 8 requestAction 
> calls. Cake calls the beforefilter only once per request.
>
> AD
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Unable to send mail from cakephp to CentOs (Postfic/DovCot).

2013-06-17 Thread Eric Haskins
Is this on a server under your control or Shared Hosting 
(hostgator,DirectNic, etc)  

Cake shouldnt be blocking or stopping you unless there is a memory issue 
due to how many records.  I would look at your hosting setup some hosts 
have implemented hourly limits etc.  

I have my hosting customers set to default of no more than 1000 emails an 
hour.

Eric  


On Thursday, June 13, 2013 5:28:17 AM UTC-4, Snehal Savaliya wrote:
>
> Hello,
>
> I am trying to send mail from cakephp site to CentOs (Postfic/DovCot).
> But I can able to only send that mail to 950 users.
> but above that I can not able to send.
>
> Is there any limit to send mail.
> I also try to increase/Decrease mail content size. but still the same 
> problem.
>
> Help me Please.
>
> Thank you.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




SaaS and AppController

2013-06-17 Thread Eric Haskins
I have an app I am working on and I was wondering if this is the designed 
behavior.   As usual my controllers extend AppController I use the 
beforeFilter() to determine the site the request is for and setup the 
environment widgets,auth etc.

My concern is if I put a mail() in the beforeFilter and call the app I get 
9 emails for one request. So appcontroller -> beforeFilter is being called 
9 times.  This is alot of overhead for a SaaS app. considering 4 queries 
are run so 36 queries total Is this the expected behavior and is there 
a better way to setting all the required settings etc. 


Thx 
Eric

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: where to make changes

2013-06-08 Thread Eric Haskins
Raks,

  /app/View/{controller}/{action}.ctp

  you really should read the book http://book.cakephp.org/2.0/en/index.html 

Eric


On Friday, June 7, 2013 1:21:43 PM UTC-4, Raks wrote:
>
> Hi,
>  
> Actually I have some code available with me in Cakephp, with model, view 
> and controller. 
> I need to add a column in the view.. not in database only in view. Where 
> do I have to make changes.. in View only or have to change controller and 
> model too.
> I am totally new to MVC farmework + cake php. SO help me out. 
>  
> Thanks
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Using Roles and RolesUser

2013-06-07 Thread Eric Haskins
Ok I found my answer before this question cleared moderation.

public $hasAndBelongsToMany = array(
'Role' => array(
'className' => 'Role',
'joinTable' => 'roles_users',
'foreignKey' => 'user_id',
'assosciationForeignKey' => 'role_id',
'unique' => 'keepExisting'
)
);

function __construct($id = false, $table = null, $ds = null) { 
$this->hasAndBelongsToMany['Role']['conditions'] = 
array('RolesUser.site_id' => Configure::read('Settings.site_id')); 
parent::__construct($id, $table, $ds); 
} 

And as it turns out is was in this group going back to 2010 sometime.  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Using Roles and RolesUser

2013-06-07 Thread Eric Haskins
Hello Everyone,


   Im sorry if this was posted previously I did an exhaustive search 
but im still lost.  I am working on a SaaS app that allows a couple of our 
domains to utilize the same codebase and I have come upon an issue with my 
 1 User to Many Roles.  Im using cakePHP 2.3

I use 2 tables   a Roles (roles) and a RolesUser (roles_users)  Now this is 
working fine IF i was using separate code for each  my problem is I need to 
modify and pass in a site_id so only roles_users associated to the 
site_id,user_id are pulled.

I am using this in my User model

public $hasAndBelongsToMany = array(
'Role' => array(
'className' => 'Role',
'joinTable' => 'roles_users',
'foreignKey' => 'user_id',
'assosciationForeignKey' => 'role_id',
'unique' => 'keepExisting',
)
);

I also have a beforeFind:

public function beforeFind(array $query) {
$query['joins'] = array(
array(
'table' => 'roles_users',
'alias' => 'RolesUser',
'type' => 'INNER',
'conditions' =>
array('User.id=RolesUser.user_id')),
array(
'table' => 'roles',
'alias' => 'Role',
'type' => 'INNER',
'conditions' =>
array('RolesUser.role_id=Role.id')));
   return $query;
}

Cause I am trying to use TinyAuthorize.php (Im flexible here if I need to 
roll my own override of BaseAuthorize)

When I login the SQL dump is 

SELECT 
   `Role`.`id`, `Role`.`alias`, 
   `RolesUser`.`id`,
   `RolesUser`.`site_id`,
   `RolesUser`.`user_id`, 
   `RolesUser`.`role_id`
 FROM 
 `demoleag_league`.`roles` AS `Role` 
JOIN 
 `demoleag_league`.`roles_users` AS `RolesUser` 
ON 
  (`RolesUser`.`user_id` = 3 AND `RolesUser`.`role_id` = `Role`.`id`)

I cant find where this query is being generated

Can anyone point me in a direction  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Problem with CakePlugin on shared server

2012-01-27 Thread Eric
Scratch that, the bug is still present. =(

Sam: "if you remake foo and/or bar I think the issue maybe resolved
even if you don't find the cause to the spookiness"

Re-make in what way? The cake lib is upgraded to 2.0.5, so that's
replaced. I can't re-bake the files in my app folder since they are
highly customized since the first baking. And again, there is no trace
of BAR in the FOO tree. The cache has been reset more times than I can
count.

Besides, this only show up *sometimes*, not every page load. More like
every page load during 10 seconds every 5-30 minutes or so. Quite
random, but slightly persistent. My money is still on the class loader
searching outside the app root for some reason. Since the error is
intermittent, it's rather difficult to trace the problem in the code.

Has this been reported as a bug (haven't found it), or should I do
that?

/Eric

On Jan 27, 10:45 am, Eric  wrote:
> Thanks!
>
> Sadly, there is no such call on line 547 (2.0.5), but there are three
> calls to it on other lines. I chucked in $plugin on the two lines
> missing it (521, 539), and it hasn't exploded yet.
>
> I assume this is a known/reported bug that will be fixed in upcoming
> versions?
>
> For the record, I cleared the cache earlier too. It had no effect
> then.
>
> /Eric
>
> On Jan 26, 7:00 pm, y2k_2000  wrote:
>
>
>
>
>
>
>
> > This is a bug on Core/App.php, caused by a missing `Plugin` key on the
> > paths array on `file_map` cache.
> > To fix it, just find this line on App.php (line 547):
> > self::_map($file, $className);
> > and replace for this one:
> > self::_map($file, $className, $plugin);
>
> > Then clear you persistent cache, and try again.
>
> > ---
>
> > Regards
> > Chris
>
> > On Jan 26, 6:38 pm, Sam Sherlock  wrote:
>
> > > I have cake 1.3 & 2.0 setup on both win7 and ubuntu 11.10
>
> > > various projects bake as projects
>
> > > sharing the cake lib is good also for dev setup
>
> > > if you remake foo and/or bar I think the issue maybe resolved
> > > even if you don't find the cause to the spookiness
>
> > > did you clear the cache?
> > > ie tmp/cache/persistent/cake_core_file_map
>
> > > ceeram clear cache plugin
>
> > >  - S
>
> > > On 26 January 2012 16:25, Eric  wrote:
>
> > > > I'm not using advanced setup (i.e. shared Cake lib, right?) since this
> > > > is a dev server (and production runs only one site per server). Most
> > > > classes are baked using "cake bake all".
>
> > > > And yes, FOO is a copy of BAR (surprise, surprise). I thought about
> > > > that before, but there is no mentioning of BAR in the FOO source (I
> > > > did a grep -rn), so I can't find any culprit that way either. Also,
> > > > the cipherSeed and salt are different (if that matters). Do you think
> > > > the copying could be the problem anyway?
>
> > > > /Eric
>
> > > > On Jan 26, 2:34 pm, Sam Sherlock  wrote:
> > > > > Odd. Have you tried setting up advanced setup with cake baked 
> > > > > projects?
>
> > > > > Also is foo a copy of bar?
>
> > > > > - S
> > > > > On 26 Jan 2012 13:14, "Jon Price"  wrote:
>
> > > > > > Interesting..I've seen this as well but rareand thought I had
> > > > > > misconfigured something. They are 2.0.x installs on a debian style
> > > > linux.
>
> > > > > > On Thu, Jan 26, 2012 at 4:38 AM, Eric  
> > > > > > wrote:
>
> > > > > >> Hi!
>
> > > > > >> I have several CakePHP installations on a server, two of them are 
> > > > > >> 2.0
> > > > > >> (recent installs). I now notice that the 2.0 installations seem to
> > > > > >> collide with eachother. Occationally when loading a page I get this
> > > > > >> error message:
>
> > > > > >> Fatal error: Uncaught exception 'MissingPluginException' with 
> > > > > >> message
> > > > > >> 'Plugin Email could not be found.' in /srv/www/BAR/lib/Cake/Core/
> > > > > >> CakePlugin.php:97
> > > > > >> Stack trace:
> > > > > >> #0 /srv/www/BAR/lib/Cake/Core/CakePlugin.php(129):
> > > > > >> CakePlugin::load('Email', Array)
> > > > > >> #1 /srv/www/FOO/app/Config/boots

Re: Problem with CakePlugin on shared server

2012-01-27 Thread Eric
Thanks!

Sadly, there is no such call on line 547 (2.0.5), but there are three
calls to it on other lines. I chucked in $plugin on the two lines
missing it (521, 539), and it hasn't exploded yet.

I assume this is a known/reported bug that will be fixed in upcoming
versions?

For the record, I cleared the cache earlier too. It had no effect
then.

/Eric


On Jan 26, 7:00 pm, y2k_2000  wrote:
> This is a bug on Core/App.php, caused by a missing `Plugin` key on the
> paths array on `file_map` cache.
> To fix it, just find this line on App.php (line 547):
> self::_map($file, $className);
> and replace for this one:
> self::_map($file, $className, $plugin);
>
> Then clear you persistent cache, and try again.
>
> ---
>
> Regards
> Chris
>
> On Jan 26, 6:38 pm, Sam Sherlock  wrote:
>
>
>
>
>
>
>
> > I have cake 1.3 & 2.0 setup on both win7 and ubuntu 11.10
>
> > various projects bake as projects
>
> > sharing the cake lib is good also for dev setup
>
> > if you remake foo and/or bar I think the issue maybe resolved
> > even if you don't find the cause to the spookiness
>
> > did you clear the cache?
> > ie tmp/cache/persistent/cake_core_file_map
>
> > ceeram clear cache plugin
>
> >  - S
>
> > On 26 January 2012 16:25, Eric  wrote:
>
> > > I'm not using advanced setup (i.e. shared Cake lib, right?) since this
> > > is a dev server (and production runs only one site per server). Most
> > > classes are baked using "cake bake all".
>
> > > And yes, FOO is a copy of BAR (surprise, surprise). I thought about
> > > that before, but there is no mentioning of BAR in the FOO source (I
> > > did a grep -rn), so I can't find any culprit that way either. Also,
> > > the cipherSeed and salt are different (if that matters). Do you think
> > > the copying could be the problem anyway?
>
> > > /Eric
>
> > > On Jan 26, 2:34 pm, Sam Sherlock  wrote:
> > > > Odd. Have you tried setting up advanced setup with cake baked projects?
>
> > > > Also is foo a copy of bar?
>
> > > > - S
> > > > On 26 Jan 2012 13:14, "Jon Price"  wrote:
>
> > > > > Interesting..I've seen this as well but rareand thought I had
> > > > > misconfigured something. They are 2.0.x installs on a debian style
> > > linux.
>
> > > > > On Thu, Jan 26, 2012 at 4:38 AM, Eric  wrote:
>
> > > > >> Hi!
>
> > > > >> I have several CakePHP installations on a server, two of them are 2.0
> > > > >> (recent installs). I now notice that the 2.0 installations seem to
> > > > >> collide with eachother. Occationally when loading a page I get this
> > > > >> error message:
>
> > > > >> Fatal error: Uncaught exception 'MissingPluginException' with message
> > > > >> 'Plugin Email could not be found.' in /srv/www/BAR/lib/Cake/Core/
> > > > >> CakePlugin.php:97
> > > > >> Stack trace:
> > > > >> #0 /srv/www/BAR/lib/Cake/Core/CakePlugin.php(129):
> > > > >> CakePlugin::load('Email', Array)
> > > > >> #1 /srv/www/FOO/app/Config/bootstrap.php(68): CakePlugin::loadAll()
> > > > >> #2 /srv/www/FOO/lib/Cake/Core/Configure.php(81): include('/srv/www/
> > > > >> FOO...')
> > > > >> #3 /srv/www/FOO/lib/Cake/bootstrap.php(138):
> > > > >> Configure::bootstrap(true)
> > > > >> #4 /srv/www/FOO/app/webroot/index.php(77): include('/srv/www/FOO...')
> > > > >> #5 {main} thrown in /srv/www/BAR/lib/Cake/Core/CakePlugin.php on line
> > > > >> 97
>
> > > > >> The sites are installed in /srv/www/FOO and /srv/www/BAR respectively
> > > > >> (FOO and BAR are made up). The error above is from the FOO site. As
> > > > >> you can see it seems to be using the plugin loader from BAR. It in
> > > > >> turn tries to load the Email plugin (which exists in BAR, but not in
> > > > >> FOO) and fails horribly.
>
> > > > >> Why is this happening? Bug? Config problem? Is the class finder in
> > > > >> loadAll() going mad (i.e. outside the root)?
>
> > > > >> Both installs are fairly vanilla, both using it's own MySQL database.
> > > > >> Since it crashes in bootstrap, I'm not sure what I could do to stop
> > > > >> it.

Re: Problem with CakePlugin on shared server

2012-01-26 Thread Eric
I'm not using advanced setup (i.e. shared Cake lib, right?) since this
is a dev server (and production runs only one site per server). Most
classes are baked using "cake bake all".

And yes, FOO is a copy of BAR (surprise, surprise). I thought about
that before, but there is no mentioning of BAR in the FOO source (I
did a grep -rn), so I can't find any culprit that way either. Also,
the cipherSeed and salt are different (if that matters). Do you think
the copying could be the problem anyway?

/Eric

On Jan 26, 2:34 pm, Sam Sherlock  wrote:
> Odd. Have you tried setting up advanced setup with cake baked projects?
>
> Also is foo a copy of bar?
>
> - S
> On 26 Jan 2012 13:14, "Jon Price"  wrote:
>
>
>
>
>
>
>
> > Interesting..I've seen this as well but rareand thought I had
> > misconfigured something. They are 2.0.x installs on a debian style linux.
>
> > On Thu, Jan 26, 2012 at 4:38 AM, Eric  wrote:
>
> >> Hi!
>
> >> I have several CakePHP installations on a server, two of them are 2.0
> >> (recent installs). I now notice that the 2.0 installations seem to
> >> collide with eachother. Occationally when loading a page I get this
> >> error message:
>
> >> Fatal error: Uncaught exception 'MissingPluginException' with message
> >> 'Plugin Email could not be found.' in /srv/www/BAR/lib/Cake/Core/
> >> CakePlugin.php:97
> >> Stack trace:
> >> #0 /srv/www/BAR/lib/Cake/Core/CakePlugin.php(129):
> >> CakePlugin::load('Email', Array)
> >> #1 /srv/www/FOO/app/Config/bootstrap.php(68): CakePlugin::loadAll()
> >> #2 /srv/www/FOO/lib/Cake/Core/Configure.php(81): include('/srv/www/
> >> FOO...')
> >> #3 /srv/www/FOO/lib/Cake/bootstrap.php(138):
> >> Configure::bootstrap(true)
> >> #4 /srv/www/FOO/app/webroot/index.php(77): include('/srv/www/FOO...')
> >> #5 {main} thrown in /srv/www/BAR/lib/Cake/Core/CakePlugin.php on line
> >> 97
>
> >> The sites are installed in /srv/www/FOO and /srv/www/BAR respectively
> >> (FOO and BAR are made up). The error above is from the FOO site. As
> >> you can see it seems to be using the plugin loader from BAR. It in
> >> turn tries to load the Email plugin (which exists in BAR, but not in
> >> FOO) and fails horribly.
>
> >> Why is this happening? Bug? Config problem? Is the class finder in
> >> loadAll() going mad (i.e. outside the root)?
>
> >> Both installs are fairly vanilla, both using it's own MySQL database.
> >> Since it crashes in bootstrap, I'm not sure what I could do to stop
> >> it. I tried changing the default cache to Memcache (with prefixes),
> >> but to no avail. I also changed the session store to database just to
> >> check, no change.
>
> >> --
> >> Our newest site for the community: CakePHP Video Tutorials
> >>http://tv.cakephp.org
> >> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> >> others with their CakePHP related questions.
>
> >> To unsubscribe from this group, send email to
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> >> athttp://groups.google.com/group/cake-php
>
> >  --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with CakePlugin on shared server

2012-01-26 Thread Eric
Ubuntu 11.10 here.

On Jan 26, 2:14 pm, Jon Price  wrote:
> Interesting..I've seen this as well but rareand thought I had
> misconfigured something. They are 2.0.x installs on a debian style linux.
>
>
>
>
>
>
>
> On Thu, Jan 26, 2012 at 4:38 AM, Eric  wrote:
> > Hi!
>
> > I have several CakePHP installations on a server, two of them are 2.0
> > (recent installs). I now notice that the 2.0 installations seem to
> > collide with eachother. Occationally when loading a page I get this
> > error message:
>
> > Fatal error: Uncaught exception 'MissingPluginException' with message
> > 'Plugin Email could not be found.' in /srv/www/BAR/lib/Cake/Core/
> > CakePlugin.php:97
> > Stack trace:
> > #0 /srv/www/BAR/lib/Cake/Core/CakePlugin.php(129):
> > CakePlugin::load('Email', Array)
> > #1 /srv/www/FOO/app/Config/bootstrap.php(68): CakePlugin::loadAll()
> > #2 /srv/www/FOO/lib/Cake/Core/Configure.php(81): include('/srv/www/
> > FOO...')
> > #3 /srv/www/FOO/lib/Cake/bootstrap.php(138):
> > Configure::bootstrap(true)
> > #4 /srv/www/FOO/app/webroot/index.php(77): include('/srv/www/FOO...')
> > #5 {main} thrown in /srv/www/BAR/lib/Cake/Core/CakePlugin.php on line
> > 97
>
> > The sites are installed in /srv/www/FOO and /srv/www/BAR respectively
> > (FOO and BAR are made up). The error above is from the FOO site. As
> > you can see it seems to be using the plugin loader from BAR. It in
> > turn tries to load the Email plugin (which exists in BAR, but not in
> > FOO) and fails horribly.
>
> > Why is this happening? Bug? Config problem? Is the class finder in
> > loadAll() going mad (i.e. outside the root)?
>
> > Both installs are fairly vanilla, both using it's own MySQL database.
> > Since it crashes in bootstrap, I'm not sure what I could do to stop
> > it. I tried changing the default cache to Memcache (with prefixes),
> > but to no avail. I also changed the session store to database just to
> > check, no change.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Problem with CakePlugin on shared server

2012-01-26 Thread Eric
Hi!

I have several CakePHP installations on a server, two of them are 2.0
(recent installs). I now notice that the 2.0 installations seem to
collide with eachother. Occationally when loading a page I get this
error message:

Fatal error: Uncaught exception 'MissingPluginException' with message
'Plugin Email could not be found.' in /srv/www/BAR/lib/Cake/Core/
CakePlugin.php:97
Stack trace:
#0 /srv/www/BAR/lib/Cake/Core/CakePlugin.php(129):
CakePlugin::load('Email', Array)
#1 /srv/www/FOO/app/Config/bootstrap.php(68): CakePlugin::loadAll()
#2 /srv/www/FOO/lib/Cake/Core/Configure.php(81): include('/srv/www/
FOO...')
#3 /srv/www/FOO/lib/Cake/bootstrap.php(138):
Configure::bootstrap(true)
#4 /srv/www/FOO/app/webroot/index.php(77): include('/srv/www/FOO...')
#5 {main} thrown in /srv/www/BAR/lib/Cake/Core/CakePlugin.php on line
97

The sites are installed in /srv/www/FOO and /srv/www/BAR respectively
(FOO and BAR are made up). The error above is from the FOO site. As
you can see it seems to be using the plugin loader from BAR. It in
turn tries to load the Email plugin (which exists in BAR, but not in
FOO) and fails horribly.

Why is this happening? Bug? Config problem? Is the class finder in
loadAll() going mad (i.e. outside the root)?

Both installs are fairly vanilla, both using it's own MySQL database.
Since it crashes in bootstrap, I'm not sure what I could do to stop
it. I tried changing the default cache to Memcache (with prefixes),
but to no avail. I also changed the session store to database just to
check, no change.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


XML->serialize() with CDATA?

2011-12-08 Thread Eric Blanpied
Hello,

I've been exporting Cake data arrays as XML using the XML helper's serialize(), 
and then using that to import into other Cake apps, and it makes a nice way to 
exchange data between our set of app servers. Now, however, I'm dealing with 
data that would be best wrapped in CDATA tags, and while I can see that there's 
support in the XML class, I can't for the life of me figure out how to make it 
do that.

Can someone provide some guidance?

thanks!

-eric

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


ACL Helper?

2011-11-05 Thread Eric Blanpied
Hello,

I'm trying to work out a good system to get at ACL data in my views,
and while the net & list archives have a handful of tips and partial
solutions, I haven't found anything conclusively helpful.

The most promising approaches I've seen add code to the login function
to compile a list of the user's permissions to store in a session var,
and then incorporate a helper to check against this when needed on the
front end. However, that lookup code all uses lots of digging into the
actual acl->aco->etc. hierarchy, or deals directly with the tree
behavior, and feels overwrought in compared to the ease of
$this->Acl->check( $aro, $aco, $action = '*') in a controller action.

So, my questions:

a) What's the overhead of the ACL Component's check() method? ie:
would calling it in a controller action for a page a few times mean
lots of db thrash, or is there some smart caching involved?

b) Does anyone have a working solution they're pleased with? A clean
method to stash a users permissions would be super-useful!

thanks!

-e

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Run a cron job in cakephp

2011-11-04 Thread Eric Blanpied
My workers are just PHP. I've got one doing curl stuff to transfer big
files, and another to drive ffmpeg for slow encodes. You can write
your Gearman clients in pretty much anything, though. They've got a
bunch of client libraries. The PHP one is pretty comprehensive, and
I've experimented with python workers, too. You can also post status
updates back from the worker if you want to do an ajax progress bar or
something.

There's a fair amount of stuff out there about gearman, but I found
this especially useful: http://tinyurl.com/y8vyc8f

I suppose we've left cake territory here, tho...

-e

On Fri, Nov 4, 2011 at 11:29 AM, Werner Petry Moraes  wrote:
> Hi,
> that cake method you call from within the worker, is it written as a shell?
> Or how do you do it?
> I'm not familiar with gearman, but I think I'm gonna need it soon.
> thanks
> atenciosamente,
> Werner Petry Moraes
> werne...@gmail.com
>
>
> On Fri, Nov 4, 2011 at 06:16, Eric Blanpied  wrote:
>>
>> I think the best way to do it is with a queue. After doing several
>> websites in which cron jobs were used for various not-so-cron things
>> (cron job to wake up periodically and check for needed tasks? why not
>> just spawn the tasks?), I came to the conclusion that a job queue was
>> a much smarter answer.
>>
>> Accordingly, I've just woven Gearman (http://gearman.org/) into one of
>> our cake projects, with a very simple component wrapping the gearman
>> client. The workers are pure php, with no knowledge of the app or
>> database, reducing dependencies as well as possible. The client passes
>> the workers json-encoded parameters, and the workers call a cake
>> method when done, again with json-encoded return data, and cake makes
>> any database updates as appropriate. Now we can do all sorts of things
>> outside of the user's browser session, and in the future could move
>> these things off to a different server if we wished.
>>
>> Of course, if your other tasks were very much cake-related, and you
>> wanted them to use the framework, I see no reason why you couldn't
>> write your workers within the framework.
>>
>> There are other queue/messaging systems out there (beanstalk's got a
>> good following), but in my research I liked what gearman had to offer
>> best. There's also Persson's cakephp Queue plugin, but I wanted a
>> lighter system, with no cake dependencies on the worker side.
>>
>> -e
>>
>> On Fri, Nov 4, 2011 at 8:12 AM, flo.kl...@googlemail.com
>>  wrote:
>> > What about using javascript. It would only work while the user is on the
>> > site, but it would be able to call a function (also ajax if you want to
>> > trigger a php method) very x seconds.
>> >
>> > -flosky
>> >
>> >
>> >
>> > Ryan Schmidt  schrieb:
>> >>
>> >> On Nov 4, 2011, at 00:17, zuha wrote:
>> >>
>> >> > is there anyway to run a process separate from the page load.  I
>> >> > would
>> >> > love to run a pseudo cronjob on each page load if it could be done
>> >> > without
>> >> > negatively effecting performance in a serious way.  (I was thinking
>> >> > curl,
>> >> > and ajax, but they didn't really seem to fit the bill)   Any experts
>> >> > out
>> >> > there know how to start a cron task outside of the page load, but
>> >> > triggered
>> >> > by a page load?
>> >>
>> >> cron is a program that schedules things to run at particular times of
>> >> the
>> >> day. "start a cron task ... triggered by a page load" therefore doesn't
>> >> make
>> >> sense.
>> >>
>> >> What kind of task do you want to start? The solution might be different
>> >> depending on the task.
>> >>
>> >>
>> >> --
>> >> Our newest site for the community: CakePHP Video Tutorials
>> >> http://tv.cakephp.org
>> >> Check out the new CakePHP Questions site http://ask.cakephp.org and
>> >> help
>> >> others with their CakePHP related questions.
>> >>
>> >>
>> >> To unsubscribe from this group, send email to
>> >> cake-php+unsubscr...@googlegroups.com For more options, visit this
>> >> group
>> >> at http://groups.google.com/group/cake-php
>> >
>> > --
>> > Our newest site for the community: CakePHP Video Tutorials
>> > http://tv

Re: Run a cron job in cakephp

2011-11-04 Thread Eric Blanpied
I think the best way to do it is with a queue. After doing several
websites in which cron jobs were used for various not-so-cron things
(cron job to wake up periodically and check for needed tasks? why not
just spawn the tasks?), I came to the conclusion that a job queue was
a much smarter answer.

Accordingly, I've just woven Gearman (http://gearman.org/) into one of
our cake projects, with a very simple component wrapping the gearman
client. The workers are pure php, with no knowledge of the app or
database, reducing dependencies as well as possible. The client passes
the workers json-encoded parameters, and the workers call a cake
method when done, again with json-encoded return data, and cake makes
any database updates as appropriate. Now we can do all sorts of things
outside of the user's browser session, and in the future could move
these things off to a different server if we wished.

Of course, if your other tasks were very much cake-related, and you
wanted them to use the framework, I see no reason why you couldn't
write your workers within the framework.

There are other queue/messaging systems out there (beanstalk's got a
good following), but in my research I liked what gearman had to offer
best. There's also Persson's cakephp Queue plugin, but I wanted a
lighter system, with no cake dependencies on the worker side.

-e

On Fri, Nov 4, 2011 at 8:12 AM, flo.kl...@googlemail.com
 wrote:
> What about using javascript. It would only work while the user is on the
> site, but it would be able to call a function (also ajax if you want to
> trigger a php method) very x seconds.
>
> -flosky
>
>
>
> Ryan Schmidt  schrieb:
>>
>> On Nov 4, 2011, at 00:17, zuha wrote:
>>
>> > is there anyway to run a process separate from the page load.  I would
>> > love to run a pseudo cronjob on each page load if it could be done without
>> > negatively effecting performance in a serious way.  (I was thinking curl,
>> > and ajax, but they didn't really seem to fit the bill)   Any experts out
>> > there know how to start a cron task outside of the page load, but triggered
>> > by a page load?
>>
>> cron is a program that schedules things to run at particular times of the
>> day. "start a cron task ... triggered by a page load" therefore doesn't make
>> sense.
>>
>> What kind of task do you want to start? The solution might be different
>> depending on the task.
>>
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Going back to school: ACL

2011-10-30 Thread Eric Blanpied
Jeremy,

I've done a number of cakephp apps (1.1, 1.2, 1.3 - starting a 2.0,
too), and have also always been flummoxed by ACL and gone back to my
own code to deal with it. A current project (1.3) has *lots* of roles,
however, including enough overlap that a many-many groups-users setup
seemed like what I wanted. I persevered with ACLs this time, though,
and I'm ending up glad that I did. As others have said, pulling access
control out of most of the code is very, very nice, and the
flexibility to add new roles with mixed degrees of access via the
database is great. I'm experimenting with hierarchical groups to
handle some of the overlap (add a parent_id to your groups table).

One thing that's helped me is Alaxos' acl plugin (thanks, nIcO!) -
while it doesn't map to what I'm doing exactly, having some tools to
manage the tables is vital, and I'm sure glad I didn't have to write
any myself. One thing I'm curious about, nIcO, is the 2.0 story for
your plugin.

Zuha, can you explain a bit further about mixing prefix routing with
ACLs? Our setup is currently still using admin_ prefixes, but as far
as I can tell that's pretty redundant here, unless it could provide a
second angle of access control.

Thanks, everyone!

-eric

On Fri, Oct 28, 2011 at 11:08 AM, alaxos  wrote:
> Hi Jeremy,
>
> As far as I know, the core ACL does not support multiple groups per
> user.
>
> Before using ACL, I used myself a home made component that allowed to
> grant/deny access based on roles membership and action prefixes like
> you do. It used to work :-) and it also supported many-to-many users-
> groups. But since I have changed my habit, and I now use ACL. As
> mentionned by zuha, I prefer the idea to have the possibility to grant/
> deny specific permission to someone or some people without having to
> update the code. Even if it now does not support many-to-many users-
> groups anymore, I think it is more flexible. But I also have to admit
> that I never developped an application with a lot of different
> profiles (so far 4-5 max).
>
> nIcO
>
> On Oct 27, 6:48 pm, Jeremy Burns | Class Outfit
>  wrote:
>> Thanks Richard.
>>
>> Your point about flexibility and extensibility is a good one. You'd define 
>> specific views to do specific functions and then restrict them with 
>> permissions rather than a prefix. That also means one view can be used by 
>> more than one group (although I guess you could equally do that with 
>> $this->render).
>>
>> My second question is the one that puzzles me most. I've designed some 
>> systems where this is very typical; members of staff are department heads, 
>> managers, subordinates, team members, committee members and so on. So one 
>> person changes his role (group) throughout a single session. I'd be 
>> interested to see what others have to say too.
>>
>> I have some SQL that could speed up the acl table reads if you are using 
>> Innodb.
>>
>> Jeremy Burns
>> Class Outfit
>>
>> http://www.classoutfit.com
>>
>> On 27 Oct 2011, at 17:32, zuha wrote:
>>
>>
>>
>>
>>
>>
>>
>> > #1 : Would require a prefix for every role.   admin_index, manager_index, 
>> > user_index, guest_index, etc.   With ACL being database driven you can 
>> > have unlimited user roles and not be required to add new prefixes every 
>> > time you add a role.
>>
>> > #2 : I don't know, interesting question.  It sounds kind of a-typical to 
>> > me though.  You would probably add a 3rd group in that rare case called 
>> > something like, "board-teachers".
>>
>> > #3 : Yes and its not small.  It can be large and a major slow down.
>>
>> > ACL is very flexible but the flexibility comes with the downside of speed 
>> > performance.  I'm quite sure there are caching solutions to get around it, 
>> > but I have not gotten that far yet (even after 2 years of using ACL 
>> > extensively).
>>
>> > --
>> > Our newest site for the community: CakePHP Video 
>> > Tutorialshttp://tv.cakephp.org
>> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
>> > others with their CakePHP related questions.
>>
>> > To unsubscribe from this group, send email to
>> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>> > athttp://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their Cak

Re: jquery autoComplete in cakephp 1.3

2011-10-11 Thread Eric Blanpied
I've found it quite easy with jquery UI. Something like this ought to
work in your .ctp file. Where #UserName is your field's id, and
$usernames is the list of choices. If you want your autocomplete to do
server-side lookup, check the jquery UI docs.


$(document).ready(function() {
$("#UserName").autocomplete({
source: ,
});
});


you're welcome :)

-e

On Oct 11, 9:30 am, hoss7  wrote:
> tell me best way for create autoComplete with jquery in cakephp 1.3

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Persson Queue Plugin - job progress inspection

2011-09-04 Thread Eric Blanpied
Hello,

I'm working on an app which needs to manage a number of large file
transfers (gigs of full-HD video files) on a periodic basis, and am
planning to implement this via some sort of job queue system with curl-
based workers taking the activity offline from the browser. I had been
planning to use Gearman, but upon discovering the Queue plugin I've
been investigating that Beanstalk-based approach.

My question is about inspecting the progress of the individual jobs. I
would like to be able to have a page with feedback on how the jobs are
progressing, along with a progress percentage for each file's
download. I haven't been able to find any info on how one would get
any kind of data back from a worker mid-job, whether in the context of
David's plugin, or Beanstalk in general. It looks as though this is
more straightforward in Gearman.

Can anyone shed any insight? Any input on how hard it would be to add
Gearman support to the Queue plugin?

thanks

-eric

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Subclassing one's own Controllers

2011-08-18 Thread Eric Blanpied
A component with a set of associated Models and whatnot?

-e

On Aug 18, 3:04 pm, mi...@brightstorm.co.uk wrote:
> > I'm a reasonably-experienced cake developer (several shipping apps
> > over a few years), and I've now got a project with a well-developed
> > Controller class that now requires several variations, all of which
> > would still rely on the same model. My general OOP instinct is to
> > subclass the controller class, but when I try that in cake (1.3) I get
> > a class-not-found error. I've seen some discussion of using behaviors
> > for this, but that seems contrary to this setup, where the main
> > controller has a model, plenty of views, methods, etc.
>
> if you are planning on sub classing the controller, why not write a
> component that all controllers use? move your core functions into the
> component and then set up other controllers that handle the variations and
> use that component.
>
> /2pence
>
>
>
>
>
>
>
>
>
> > Advice?
>
> > thanks
>
> > -eric
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Subclassing one's own Controllers

2011-08-18 Thread Eric Blanpied
I'm a reasonably-experienced cake developer (several shipping apps
over a few years), and I've now got a project with a well-developed
Controller class that now requires several variations, all of which
would still rely on the same model. My general OOP instinct is to
subclass the controller class, but when I try that in cake (1.3) I get
a class-not-found error. I've seen some discussion of using behaviors
for this, but that seems contrary to this setup, where the main
controller has a model, plenty of views, methods, etc.

Advice?

thanks

-eric

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How do you do it?

2011-04-18 Thread Eric Anderson
I've always thought about that same issue. I think there's some good
JQuery  / Ajax image upload and cropping plugins.

On a basic level, I'd probably allow an upload then refresh the same
page after the successful upload. On reload, the page would be in the
"editing" state, so instead of just showing the photo they just
loaded, it's shown within the cropping editor with a "save changes"
button below. Upon clicking that, the co-ordinates are sent to the
controller action again and the page is reloaded again, this time with
the final cropped / edited photo in place.

I'd likely try to streamline this with Ajax image uploading though.

Take a look at Malsup's Ajax image upload plugin for JQuery.
http://jquery.malsup.com/form/#file-upload

On Apr 18, 12:22 pm, "Krissy Masters" 
wrote:
> This is not a code how to question, just general functionality how to
> question.
>
> I have a gallery, upload images and a cropper to select thumbs for the
> images all set up and functionality working.
>
> But I want to know how do you edit your thumbs? Click thumb edit > new page
> with the editor save selection redirect back to gallery set of images?
>
> If just found back and forth very annoying so im trying to come up with an
> easier 1 page type ajax setup but everything just seems to have its
> limitations.
>
> I had it in a lightbox which worked fine but everyone and their brother has
> a lightbox and its just so played out.
>
> Any ideas brainstorm thought would help a stuck baker!
>
> Thanks,
>
> K

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Custom Order by

2011-03-06 Thread Eric Anderson
Hi everyone,

I was wondering if you could help me with this strange ordering issue.
I have a list of posts and I want to order them by date created,
however, I want to have "featured" posts show up in the list BEFORE
the unfeatured posts. Essentially, it would be any post that is
featured, ordered by date created, then followed by unfeatured posts
ordered by date created. I have a list of the IDs of the posts that
are featured.

How would I go about using this list of featured ids to do this
ordering in my find query?

Thanks!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How to properly use "conditions" in model associations

2011-03-02 Thread Eric Anderson
Awesome, thanks everyone!

I think I'm going to opt for removing the associating and just taking
care of it in my queries.

On Mar 2, 5:34 pm, euromark  wrote:
> i agree with gremlin
> foreign_key + model is an example for this
>
> everything else i would set right inside the querying model method
>
> On 2 Mrz., 23:06, gremlin  wrote:
>
>
>
>
>
>
>
> > I tend to define conditions in associations on very few occasions. One
> > good use is for polymorphic models (you need to define the field =>
> > modelName mapping) and for models that have a enum field (or similar)
> > that determines some behavior of the model. IE log models and for
> > defining self referencing tables where I tend to use an relationship
> > alias (ParentNode, ChildNode)
>
> > This isn't the only time you might define conditions in the
> > relationship but these are the only ones that pop to mind.
>
> > On Mar 2, 11:43 am, "Krissy Masters" 
> > wrote:
>
> > > Personaly I never set any conditions in the relations (hasOne, hasMany 
> > > )
>
> > > all conditions are defined in the function since depending on why I am
> > > getting the data and for who conditions constantly change.
>
> > > You can say conditions Posts => 1 //active so you only by default display
> > > all active Post.
>
> > > but then when its time to get all users posts so they can edit their data
> > > you need to set condition where Post.id => $user_id. If you kept the 
> > > regular
> > > condition you would only pull that users active posts not all.
>
> > > But I just developed from day 1 like this so also would be curious to see
> > > what others are doing in regards to the other params available for
> > > relations.
>
> > > Good question :)
>
> > > K
>
> > > -Original Message-
> > > From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On 
> > > Behalf
>
> > > Of Eric Anderson
> > > Sent: Wednesday, March 02, 2011 3:57 PM
> > > To: CakePHP
> > > Subject: How to properly use "conditions" in model associations
>
> > > Hi everyone,
>
> > > I'm wondering what is the 'proper' or 'suggested' way of using
> > > "conditions" in model associations. I'm using an Activity model to log
> > > activities performed throughout my app. I then use this table to
> > > output activity feed / notifications style sections to users. The
> > > problem I'm having is that Cake throws a "column not found" error (I
> > > guess technically it's MySQL throwing the error). When running a
> > > query, Cake for some reason formulates the query so that MySQL is
> > > looking for columns from my Activity table inside of other tables. Do
> > > I need to specify "conditions" in both my User and Activity model, as
> > > shown below? When I remove the conditions from the Activity model,
> > > everything runs fine.
>
> > > 
> > > class Activity extends AppModel {
>
> > >     var $name = 'Activity';
> > >     var $actsAs = array('Containable');
>
> > >         var $belongsTo = array(
>
> > >                 // Doers
> > >                 'User' => array(
> > >                 'className' => 'User',
> > >                 'foreignKey' => 'doer_id',
> > >                         'conditions' => array('Activity.doer_table' =>
> > > 'users')
> > >         )
> > > }
> > > ?>
>
> > > 
> > > class User extends AppModel {
>
> > >     var $name = 'User';
> > >     var $actsAs = array('Containable');
>
> > >     var $hasMany = array(
> > >                 'Activity' => array(
> > >                 'className' => 'Activity',
> > >                 'foreignKey' => 'doer_id',
> > >                         'conditions' => array(
> > >                                 'Activity.doer_table' => 'users'
> > >                         ),
> > >                 'dependent' => true
> > >         );
> > > }
> > > ?>
>
> > > --
> > > Our newest site for the community: CakePHP Video 
> > > Tutorialshttp://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


How to properly use "conditions" in model associations

2011-03-02 Thread Eric Anderson
Hi everyone,

I'm wondering what is the 'proper' or 'suggested' way of using
"conditions" in model associations. I'm using an Activity model to log
activities performed throughout my app. I then use this table to
output activity feed / notifications style sections to users. The
problem I'm having is that Cake throws a "column not found" error (I
guess technically it's MySQL throwing the error). When running a
query, Cake for some reason formulates the query so that MySQL is
looking for columns from my Activity table inside of other tables. Do
I need to specify "conditions" in both my User and Activity model, as
shown below? When I remove the conditions from the Activity model,
everything runs fine.

 array(
'className' => 'User',
'foreignKey' => 'doer_id',
'conditions' => array('Activity.doer_table' => 'users')
)
}
?>

 array(
'className' => 'Activity',
'foreignKey' => 'doer_id',
'conditions' => array(
'Activity.doer_table' => 'users'
),
'dependent' => true
);
}
?>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Fat Models vs. App Controller

2011-02-26 Thread Eric Anderson
Awesome article. Thanks!

I think I'm going to move everything over to my model, via either an
available function I can then call from other controllers or place the
function in beforeSave, afterSave, etc. Should work great.

Eric

On Feb 26, 5:59 pm, Sam Sherlock  wrote:
> to me it sounds list behaviours
>
> all controllers extend the app controller - choose carefully what you put
> here
>
> if the stuff is entity related it goes in model
>
> you can add to app model (& helper & error also) in the same way as you can
> with app controller
>
> fat models, skinny controllers and athletic 
> behaviourshttp://nuts-and-bolts-of-cakephp.com/tag/observable-behavior/
>  - S
>
> On 26 February 2011 23:46, Eric Anderson  wrote:
>
>
>
>
>
>
>
> > Ya a component doesn't necessarily work because I'm interfacing with
> > the DB (inserting, deleting, querying) a lot. I'm thinking from
> > articles I've been digging up (Mark Story's personal site) that
> > putting these functions in my Activity controller makes the most
> > sense, then I can just grab feeds, save data, etc by calling the
> > function through related models.
>
> > As for "libs", what do you mean? I can create a library for these
> > functions? Can you explain further?
>
> > Thanks!
>
> > Eric
>
> > On Feb 26, 4:39 pm, euromark  wrote:
> > > usually you would put functions you use in multiple controllers in
> > > either the model (data?) or a component (logic?)
> > > you can also use libs to "dry" your code :)
>
> > > On 27 Feb., 00:02, Eric Anderson  wrote:
>
> > > > Hi everyone,
>
> > > > Just wondering when it comes to performance and any other factors you
> > > > may deem important, what's the better option for storing functions
> > > > that I will use among many controllers: A function in the model that I
> > > > can then access via $this->Model->Model->function() or a function
> > > > inside of my App Controller?
>
> > > > Moreover, when is it better to put a function in a model and when is
> > > > it better to put it in the app controller?
>
> > > > To put this in context, I'm investigating this for use with an
> > > > activities feature. I track activities and then display them in feeds.
> > > > Of course, I need to quite often save an activity, feeding it
> > > > arguments (as well as delete an activity). Moreover, I need to often
> > > > grab a feed, customized based on the arguments I feed it. I'm trying
> > > > to avoid using RequestAction.
>
> > > > Thanks!
>
> > > > Eric
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Fat Models vs. App Controller

2011-02-26 Thread Eric Anderson
Ya a component doesn't necessarily work because I'm interfacing with
the DB (inserting, deleting, querying) a lot. I'm thinking from
articles I've been digging up (Mark Story's personal site) that
putting these functions in my Activity controller makes the most
sense, then I can just grab feeds, save data, etc by calling the
function through related models.

As for "libs", what do you mean? I can create a library for these
functions? Can you explain further?

Thanks!

Eric

On Feb 26, 4:39 pm, euromark  wrote:
> usually you would put functions you use in multiple controllers in
> either the model (data?) or a component (logic?)
> you can also use libs to "dry" your code :)
>
> On 27 Feb., 00:02, Eric Anderson  wrote:
>
>
>
>
>
>
>
> > Hi everyone,
>
> > Just wondering when it comes to performance and any other factors you
> > may deem important, what's the better option for storing functions
> > that I will use among many controllers: A function in the model that I
> > can then access via $this->Model->Model->function() or a function
> > inside of my App Controller?
>
> > Moreover, when is it better to put a function in a model and when is
> > it better to put it in the app controller?
>
> > To put this in context, I'm investigating this for use with an
> > activities feature. I track activities and then display them in feeds.
> > Of course, I need to quite often save an activity, feeding it
> > arguments (as well as delete an activity). Moreover, I need to often
> > grab a feed, customized based on the arguments I feed it. I'm trying
> > to avoid using RequestAction.
>
> > Thanks!
>
> > Eric

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Fat Models vs. App Controller

2011-02-26 Thread Eric Anderson
Hi everyone,

Just wondering when it comes to performance and any other factors you
may deem important, what's the better option for storing functions
that I will use among many controllers: A function in the model that I
can then access via $this->Model->Model->function() or a function
inside of my App Controller?

Moreover, when is it better to put a function in a model and when is
it better to put it in the app controller?

To put this in context, I'm investigating this for use with an
activities feature. I track activities and then display them in feeds.
Of course, I need to quite often save an activity, feeding it
arguments (as well as delete an activity). Moreover, I need to often
grab a feed, customized based on the arguments I feed it. I'm trying
to avoid using RequestAction.

Thanks!

Eric

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Component or Behavior?

2011-01-09 Thread Eric Anderson
Hi everyone,

I'm creating an app and have a situation where after an event occurs,
I need to save data in many different models. Essentially, when a
competition ends, I need to save the winner, award points to everyone
who entered the competition and as well as award "credits".
Essentially, I end up editing 4 (or more) different models when a
competition ends and needs to be evaluated.

What's the best way to handle things like this, where an event occurs
but the consequences affect many models?

Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Js (Jquery) Helper Append Instead of Update

2011-01-02 Thread Eric Anderson
Alright, figured it out.

Made some adjustments to the jquery_engine.php file.

Essentially, all that you need to do is find the request function, and
replace using "html" for content placement with whatever is stored in
$options['position']. Then, you can specify 'position' in your options
array for Js helper requests. If the option is not set, just fall back
to html. Here is the revised function - you'll notice I only made
minor additions and changes just below my **EDIT** comment. Everything
else was untouched.

/**
 * Create an $.ajax() call.
 *
 * If the 'update' key is set, success callback will be overridden.
 *
 * @param mixed $url
 * @param array $options See JsHelper::request() for options.
 * @return string The completed ajax call.
 * @access public
 * @see JsBaseEngineHelper::request() for options list.
 */
function request($url, $options = array()) {
$url = $this->url($url);
$options = $this->_mapOptions('request', $options);
if (isset($options['data']) && is_array($options['data'])) {
$options['data'] = 
$this->_toQuerystring($options['data']);
}
$options['url'] = $url;
if (isset($options['update'])) {
$wrapCallbacks = isset($options['wrapCallbacks']) ?
$options['wrapCallbacks'] : true;
if ($wrapCallbacks) {

// **EDIT** Changed the following line to 
replace "html" with
$options['position'] so that I can personally specify where I want
this information. Need to default to "html" is no position is
specified though.
if(!isset($options['position'])){
$options['position'] = "html";
}
$success = $this->jQueryObject . '("' . 
$options['update'] . '").'.
$options['position'].'(data);';
} else {
$success = sprintf(
'function (data, textStatus) 
{%s("%s").html(data);}',
$this->jQueryObject,
$options['update']
);
}
$options['dataType'] = 'html';
$options['success'] = $success;
unset($options['update']);
}
$callbacks = array('success', 'error', 'beforeSend', 
'complete');
if (isset($options['dataExpression'])) {
$callbacks[] = 'data';
unset($options['dataExpression']);
}
$options = $this->_prepareCallbacks('request', $options);
$options = $this->_parseOptions($options, $callbacks);
return $this->jQueryObject . '.ajax({' . $options .'});';
}



On Jan 2, 9:26 pm, Eric Anderson  wrote:
> Hi,
>
> Does anyone know how to position the insertion of a returned HTML from
> an AJAX request using the Js helper (JQuery) ? I know there is an
> 'update' option, however there are times when I need append, replace,
> etc instead of just updating a selected element.
>
> I took a look at the jquery_engine.php helper class and it doesn't
> seem to be built, but are there any other ways around this?
>
> Thanks,
>
> Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Js (Jquery) Helper Append Instead of Update

2011-01-02 Thread Eric Anderson
Hi,

Does anyone know how to position the insertion of a returned HTML from
an AJAX request using the Js helper (JQuery) ? I know there is an
'update' option, however there are times when I need append, replace,
etc instead of just updating a selected element.

I took a look at the jquery_engine.php helper class and it doesn't
seem to be built, but are there any other ways around this?

Thanks,

Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Js (Jquery) Helper Confirm before Request

2010-12-30 Thread Eric Anderson
Fantastic! It's a tad different. With the Js helper, it's 'before' not
'beforeSend' and I don't need the function in the before code, just
'return confirm("are you sure?");'.

But you were pretty close considering you don't even use the Js
Helper.

Thank you so much!

On Dec 30, 6:28 pm, cricket  wrote:
> On Thu, Dec 30, 2010 at 4:35 PM, Eric Anderson
>
>
>
>
>
>
>
>
>
>  wrote:
> > Hi everyone,
>
> > I'm trying to use the Js Helper (JQuery) to create a request link that
> > when clicked, confirms before sending the request. If "cancel" in the
> > dialog is clicked, then the request is NOT sent.
>
> > This is what I have so far:
>
> > *CODE*
>
> > Delete Post
>
> >     >        $this->Js->get('#post-'.$post['Post']['id'].' .delete-post-
> > link')->event('click',
> >        $this->Js->request(array(
> >        'controller' => 'posts', 'action' => 'delete', $post['Post']
> > ['id']), array(
> >        'async' => true,
> >        'success' => '$("#post-'.$post['Post']['id'].', #post-'.
> > $post['Post']['id'].'-list").fadeOut();')));
> >    ?>
>
> > *ENDCODE*
>
> > So, this ensures that the anchor above is turned into an AJAX link
> > that sends a request to delete the post I need it to. It even fades
> > out the content after successfully deleting the post. However, I want
> > to have a confirmation dialog appear before sending the request AND if
> > cancel is clicked, the request is NOT sent.
>
> (I don't use JSHelper so I may be wrong here.)
>
> Use the beforeSend callback for $.ajax(). If you return false the
> request is cancelled.
>
> $this->Js->request(
>         array(
>                 ...,
>                 'beforeSend' => 'function(XMLHttpRequest, settings) { return
> confirm("Are you sure about this?"); }'
>         )
> )

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Js (Jquery) Helper Confirm before Request

2010-12-30 Thread Eric Anderson
Hi everyone,

I'm trying to use the Js Helper (JQuery) to create a request link that
when clicked, confirms before sending the request. If "cancel" in the
dialog is clicked, then the request is NOT sent.

This is what I have so far:

*CODE*

Delete Post

Js->get('#post-'.$post['Post']['id'].' .delete-post-
link')->event('click',
$this->Js->request(array(
'controller' => 'posts', 'action' => 'delete', $post['Post']
['id']), array(
'async' => true,
'success' => '$("#post-'.$post['Post']['id'].', #post-'.
$post['Post']['id'].'-list").fadeOut();')));
?>

*ENDCODE*

So, this ensures that the anchor above is turned into an AJAX link
that sends a request to delete the post I need it to. It even fades
out the content after successfully deleting the post. However, I want
to have a confirmation dialog appear before sending the request AND if
cancel is clicked, the request is NOT sent.

Any ideas?

Thanks!

Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP has it's own domain, but placed in a subfolder

2010-10-16 Thread Eric Anderson
You're understanding me correctly. Hmmm... shouldn't it not matter
since I have a domain pointing to domain.com/subfolder and I'm
accessing it via the OTHER domain.com? Once it's on its own domain, I
figured htaccess should work correctly, as it's relative to that
particular domain?

On Oct 16, 2:44 pm, Tilen Majerle  wrote:
> if i understand you good, then u have on domain.com installed Wordpress with
> .htaccess file, and in domain.com/subfolder you want to install cakephp?
>
> so there i think, problem is wordpress's .htaccess...
> --
> Tilen Majerlehttp://majerle.eu
>
> 2010/10/16 Eric Anderson 
>
>
>
> > It does though, as I'm using it to manage a WordPress install in the
> > root as well as another Cake app in a subfolder (without it's own
> > domain, it's being accessed via domain.com/subfolder).
>
> > On Oct 16, 2:35 pm, Tilen Majerle  wrote:
> > > hmm...i think here is problem, because server doesn't support apache
> > module
> > > mod_rewrite
>
> > > check this :D
> > > --
> > > Tilen Majerlehttp://majerle.eu
>
> > > 2010/10/16 Eric Anderson 
>
> > > > Hi guys,
>
> > > > I've done some searching but haven't found a direct answer to this
> > > > question.
>
> > > > I'm pointing a domain of mine to a subfolder on my site. I then
> > > > installed a cake app in that folder, using the production style
> > > > htaccess structure. I figured I don't need to change anything for a
> > > > cake app in a subfolder if the subfolder has its own domain pointing
> > > > to it.
>
> > > > When trying to access the domain however, I receive Internal Server
> > > > Error (500).
>
> > > > Are there amendments I need to make to my htacces if my app is in a
> > > > subfolder, but still has its own domain?
>
> > > > Thanks,
>
> > > > Eric
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > others
> > > > with their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com > > >  om>
> > For more options, visit this
> > group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP has it's own domain, but placed in a subfolder

2010-10-16 Thread Eric Anderson
It does though, as I'm using it to manage a WordPress install in the
root as well as another Cake app in a subfolder (without it's own
domain, it's being accessed via domain.com/subfolder).

On Oct 16, 2:35 pm, Tilen Majerle  wrote:
> hmm...i think here is problem, because server doesn't support apache module
> mod_rewrite
>
> check this :D
> --
> Tilen Majerlehttp://majerle.eu
>
> 2010/10/16 Eric Anderson 
>
>
>
> > Hi guys,
>
> > I've done some searching but haven't found a direct answer to this
> > question.
>
> > I'm pointing a domain of mine to a subfolder on my site. I then
> > installed a cake app in that folder, using the production style
> > htaccess structure. I figured I don't need to change anything for a
> > cake app in a subfolder if the subfolder has its own domain pointing
> > to it.
>
> > When trying to access the domain however, I receive Internal Server
> > Error (500).
>
> > Are there amendments I need to make to my htacces if my app is in a
> > subfolder, but still has its own domain?
>
> > Thanks,
>
> > Eric
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


CakePHP has it's own domain, but placed in a subfolder

2010-10-16 Thread Eric Anderson
Hi guys,

I've done some searching but haven't found a direct answer to this
question.

I'm pointing a domain of mine to a subfolder on my site. I then
installed a cake app in that folder, using the production style
htaccess structure. I figured I don't need to change anything for a
cake app in a subfolder if the subfolder has its own domain pointing
to it.

When trying to access the domain however, I receive Internal Server
Error (500).

Are there amendments I need to make to my htacces if my app is in a
subfolder, but still has its own domain?

Thanks,

Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakeDC Ratings Plugin

2010-09-26 Thread Eric Anderson
Alright, so I got it to work by including the html helper as well as
the ratings helper in my controller. However, I now receive the
following error:

Undefined variable: item [APP/views/posts/home.ctp, line 23]

I'm calling the helper in my view in this way:

echo $this->Rating->display(array(
'item' => $post['Post']['id'],
'type' => 'radio',
'stars' => 5,
'value' => $item['rating'],
'createForm' => array('url' => 
array($this->passedArgs, 'rate'
=> $item['id'], 'redirect' => true;

I'm trying to allow rating of entries in my "post" model. Do I need to
change the $item['rating'] to something else?

Eric

On Sep 26, 8:22 pm, Eric Anderson  wrote:
> Hi there,
>
> I'm currently trying to use CakeDC's ratings plugin, found 
> here:http://github.com/CakeDC/ratings/tree/
>
> However, after following the instructions I get the following error:
>
> Fatal error: Class 'HtmlHelper' not found in /Applications/XAMPP/
> xamppfiles/htdocs/photorious/app/plugins/ratings/views/helpers/
> rating.php on line 20
>
> For some reason the helper cannot find the Html helper which it
> extends. Does anyone have any insight on how to fix this?
>
> Thanks!
>
> Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


CakeDC Ratings Plugin

2010-09-26 Thread Eric Anderson
Hi there,

I'm currently trying to use CakeDC's ratings plugin, found here:
http://github.com/CakeDC/ratings/tree/

However, after following the instructions I get the following error:


Fatal error: Class 'HtmlHelper' not found in /Applications/XAMPP/
xamppfiles/htdocs/photorious/app/plugins/ratings/views/helpers/
rating.php on line 20

For some reason the helper cannot find the Html helper which it
extends. Does anyone have any insight on how to fix this?

Thanks!

Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: How to handle multiple user types

2010-05-14 Thread Eric Anderson
I have a "parties" table as well.

On May 14, 3:17 am, Zaky Katalan-Ezra  wrote:
> What is the other tables?
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


How to handle multiple user types

2010-05-13 Thread Eric Anderson
Hi everyone,

I'm just curious how everyone else out there handles different user
types when they have different data associated with them?

I have a system that has guests, members and hosts. Each user type has
many different fields associated with them. Currently I handle it by
having a main user table that has the common data (email, username,
password) and also has a "role" field which stores what type of user
they are.

I then link my user table to the other tables using the $hasOne. In
each of my other tables (guest, member, host) I have all the
particular data associated with that member type.

While I originally felt this was the best way to handle this, I feel
like it's getting messy. Of course, I couldn't hold all those
different field types in one users table. I kept the user table as it
allows for easy integration with the Auth component (I know it can get
difficult to use Auth with many different tables holding usernames and
passwords).

Any thoughts?

Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


AJAX Pagination for "more commments" style functionality

2010-05-02 Thread Eric Anderson
Hi everyone,

I'm having a problem getting AJAX Pagination to work when adding
additional content to an unordered list.

So, what I want to set up is something along the lines of a Twitter
"more comments" AJAX loading system. When you click "more
comments" (the only pagination control element that will display) it
loads the next X many comments into the UL as LI elements.

So, here is my original code:

options(array('url'=>$this->passedArgs));
$paginator->options(array('update' => 'comment-list', 'indicator' =>
'spinner', 'position' => 'bottom'));
?>
flash(); ?>




On  by 



next('More comments', null, null, array('class'
=> 'disabled')); ?>

However, when you click "more comments" it ALSO loads all the controls
as well as the UL all over again. How can I get it to NOT display the
controls, as well as the UL when loading the next set of comments?

Thanks in advance!

Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Calling actions inside a controller

2010-04-26 Thread Eric Anderson
Thank you both so much! I really appreciate it.

Eric

On Apr 26, 1:06 am, Jeremy Burns  wrote:
> Good point.. As far as I know, the key difference is:
>
> $this->functionName() is used to call another function that ought to return a 
> value back to the calling function.
> $this->setAction() effectively terminates the calling action and starts the 
> called action, which then (probably) renders a view.
>
> Or at least that's how I use them.
>
> Jeremy Burns
> jeremybu...@me.com
> (Skype) +44 208 123 3822 (jeremy_burns)
> (m) +44 7973 481949
> (h) +44 208 530 7573
>
> On 26 Apr 2010, at 08:00, Miles J wrote:
>
>
>
> > Or you can use $this->setAction().
>
> > On Apr 25, 10:54 pm, Jeremy Burns  wrote:
> >> $this->functionName();
>
> >> Jeremy Burns
> >> jeremybu...@me.com
>
> >> On 25 Apr 2010, at 23:40, Eric Anderson wrote:
>
> >>> Hi everyone,
>
> >>> I was unable to find the answer to this question in the 1.2.x
> >>> documentation or in this group (although I have a feeling it must have
> >>> already been answered somewhere).
>
> >>> How do I properly call another action of the controller inside another
> >>> action? All within the same controller. I just need to call one
> >>> controller action inside of another. I know it's simple, but I can't
> >>> seem to figure it out.
>
> >>> Thanks!
>
> >>> Eric
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> >>> with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups 
> >>> "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> >>> athttp://groups.google.com/group/cake-php?hl=en
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> >> with their CakePHP related questions.
>
> >> You received this message because you are subscribed to the Google Groups 
> >> "CakePHP" group.
> >> To post to this group, send email to cake-php@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> >> athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Calling actions inside a controller

2010-04-25 Thread Eric Anderson
Hi everyone,

I was unable to find the answer to this question in the 1.2.x
documentation or in this group (although I have a feeling it must have
already been answered somewhere).

How do I properly call another action of the controller inside another
action? All within the same controller. I just need to call one
controller action inside of another. I know it's simple, but I can't
seem to figure it out.

Thanks!

Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Simple Acl controlled Application Tutorial - Problem with release 1.2.5??

2009-09-30 Thread Eric

I was having the same problem today.  I made one change that got rid
of the problem, however, since I'm new to Acl I am not sure that the
change I made is correct.

I changed the line that you have to the following and the fatal error
went away.

$Controllers = Configure::listObjects('controller');

Now when I go to the url: http://localhost/groups/build_acl I get the
following output:

app/controllers/groups_controller.php (line 147)

Array
(
[0] => Created Aco node for Pages
[1] => Created Aco node for display
[2] => Created Aco node for Groups
[3] => Created Aco node for index
[4] => Created Aco node for view
[5] => Created Aco node for add
[6] => Created Aco node for edit
[7] => Created Aco node for delete
[8] => Created Aco node for build_acl
[9] => Created Aco node for Posts
[10] => Created Aco node for index
[11] => Created Aco node for view
[12] => Created Aco node for add
[13] => Created Aco node for edit
[14] => Created Aco node for delete
[15] => Created Aco node for Users
[16] => Created Aco node for login
[17] => Created Aco node for logout
[18] => Created Aco node for index
[19] => Created Aco node for view
[20] => Created Aco node for add
[21] => Created Aco node for edit
[22] => Created Aco node for delete
[23] => Created Aco node for Widgets
[24] => Created Aco node for index
[25] => Created Aco node for view
[26] => Created Aco node for add
[27] => Created Aco node for edit
[28] => Created Aco node for delete
)

After this I get some errors about not having a view for this
controller, but I think that is expected.

Hopefully this helps...

Eric


On Sep 29, 9:10 am, robmcvey  wrote:
> We aregoing through the "Simple Acl controlled Application Tutorial"
> as per the manual.
>
> Everything is going fine until we try and run the "Automated tool for
> creating ACOs" in this section;
>
> http://book.cakephp.org/view/647/An-Automated-tool-for-creating-ACOs
>
> When we run this method we get the follwing Fatal Error;
>
> Fatal error: Call to undefined method App::objects()
>
> The line causing the error is;
>
> $Controllers = App::Objects('controller');
>
> I seem to remember doing this tutorial in an earlier version of cake
> without problems
>
> Anyone have any ideas whats going on? Is this a latest version bug?
>
> Thanks
>
> Rob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache not configured properly

2009-07-27 Thread Eric

Thanks - memcached was not installed correctly.

So it was defaulting back to file caching? I didn't realize you can
cache an individual variable with file caching like that. With no load
on the server, it was just as fast.

On Jul 26, 12:04 pm, "euromark (munich)" 
wrote:
> i thought so
>
> with
> apt-get install php5-memcache
>
> + editing of php.ini
>
> BUT i found a typo
> extension=memcached.so  (/etc/php5/apache2/php.ini)
> should be
> extension=memcache.so  (/etc/php5/apache2/php.ini)
>
> then it works just fine:
>
> "The MemcacheEngine is being used for caching. To change the config
> edit APP/config/core.php "
>
> On 26 Jul., 17:05, brian  wrote:
>
>
>
> > On Sun, Jul 26, 2009 at 7:48 AM, euromark
>
> > (munich) wrote:
>
> > > i doubt that your memcache is working^^
> > > actually, it falls back to "file caching" if memcache cannot be used:
>
> > > trigger_error('Cache not configured properly. Please check
> > > Cache::config(); in APP/config/core.php', E_USER_WARNING);
> > > $cache = Cache::config('default', array('engine' => 'File'));
>
> > > you can see that if you check out the default "home" page (home.ctp in
> > > cake)
>
> > > anyway.. in my case the problem seems to be that there is no
> > > "Memcache" class
>
> > > $memcache = new Memcache; $memcache->addServer('xxx.xx.xx.xx', 11211);
> > > $version = $memcache->getVersion(); print_r($memcache->getExtendedStats
> > > ()); $cacheKey = $memcache->get("cake_homepage"); echo($cacheKey);
> > > echo "Server's version: ".$version."\n";
>
> > > returns
>
> > > Fatal error: Class 'Memcache' not found in /home/web/test/comm/views/
> > > pages/homes.ctp on line 2
>
> > > any idea whats missing here?
> > > thx, mark
>
> > memcached? Is it installed?http://www.danga.com/memcached/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session/Cookie problem with Facebook JS + PHP

2009-07-27 Thread Eric

Just as a followup, I have had no side effects using localhost.com ...
and it definitely did not work using "localhost"

On Jul 21, 7:10 am, rchavik  wrote:
> I agree.
>
> A better way would be to stage your application with myapp.com (or
> whatever name you want), and set that in your hosts file.
>
> You'll need to adjust your Facebook App setting and your apache
> configuration to reflect this change.
>
> On Jul 21, 6:56 pm, Smelly Eddie  wrote:
>
>
>
> > Something is wrong
>
> > removing localhost from your hosts file may have  a negative impact on
> > any applications that expect localhost, a de facto standard, to be the
> > local loopback address. Besides that it should not affect cookies from
> > another domain.
>
> > Although the two may be related, I don't think you should declare
> > victory yet.
>
> > On Jul 20, 2:19 am, "eric.winch...@gmail.com"
>
> >  wrote:
> > > The bad news is I am an idiot.
>
> > > The good news is the solution is to not use LOCALHOST. I changed C:
> > > \Windows\System32\drivers\etc\hosts 'localhost' to 'localhost.com' and
> > > Facebook cookies work the way they should.
>
> > > On Jul 19, 11:12 pm, "eric.winch...@gmail.com"
>
> > >  wrote:
> > > > More information:
>
> > > > I checked to be sure Facebook is instantiating correctly. I think
> > > > CakePHP is preventing the Facebook class from getting the cookie data.
> > > > Facebook::get_valid_fb_params() tries to access $_COOKIE but the only
> > > > thing in there is $_COOKIE['CAKEPHP']
>
> > > > There is a weird fix on the FB Wiki but tricking Cake to use
> > > > Facebook's session seems like the wrong thing to do.
>
> > > > Given this problem, I don't understand how this 
> > > > works:http://cutfromthenorth.com/integrating-facebook-connect-with-cakephps...
>
> > > > On Jul 19, 4:02 pm, "eric.winch...@gmail.com"
>
> > > >  wrote:
> > > > > I'm attempting to use Facebook Connect with its PHP library.
>
> > > > > 
>
> > > > > That gets the user logged in ok but then using the PHP libs:
>
> > > > > $facebook->get_loggedin_user() is always NULL. Anyone run into this?
> > > > > I'm wondering if it has something to do with Cake taking over the
> > > > > sessions and cookies.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache not configured properly

2009-07-25 Thread Eric

Turns out it is actually working, but I'd still like to fix the error
msg for debug mode if possible.

On Jul 25, 11:35 pm, "eric.winch...@gmail.com"
 wrote:
> Warning (512): Cache not configured properly. Please check
> Cache::config(); in APP/config/core.php [CORE\cake\libs\configure.php,
> line 663]
>
> core.php:
>
> Configure::write('Cache.check', true);
> Configure::write('Cache.disable', false);
> Cache::config('default', array(
>                                                         'engine' => 
> 'Memcache' //[required]
>                                                         'duration'=> 3600, 
> //[optional]
>                                                         'probability'=> 100, 
> //[optional]
>                                                         'servers' => 
> array('127.0.0.1:11211'), //[optional]
>                                                         'compress' => false, 
> // [optional] compress data in Memcache
> (slower, but uses less memory)
>                                                 )
> );
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $ajax->form - NOT WORKING!!!!! ARGHHHH

2009-07-22 Thread Eric Silva

you called the prototype.js?

--
Eric Silva



On Wed, Jul 22, 2009 at 10:24 PM, David wrote:
>
> Hello,
>
> I am trying to work with ajax helper to do a comments form on a test
> blog system.
> I am fairly new...but have managed to pick most things up...but this
> is doing my head in!
>
> Okay so I show a blog post and people can comment on them so I use
> this in the view file:
>
> form(null,'post',array
> ('update'=>'comment','url'=>array
> ('controller'=>'comments','action'=>'add')));
>  ?>
> input('Comment.name'); ?>
> input('Comment.content'); ?>
> input('Comment.post_id', array
> ('type'=>'hidden','value'=>$post['Post']['id'])); ?>
> end('Add Comment'); ?>
>
> ---
> then the logic for this in the Comments controller / add function is :
>
> function add() {
>                if(!empty($this->data)){
>                        $this->Comment->create();
>                        if($this->Comment->save($this->data)) {
>                                
> $comments=$this->Comment->find('all',array('conditions'=>array
> ('post_id'=>$this->data['Comment']['post_id']),'recursive'=>-1));
>                                $this->set(compact('comments'));
>                                $this->render('add_success','ajax');
>                        }else{
>                                $this->render('add_failure','ajax');
>                        }
>                }
>        }
>
> ..now it all displays good..BUT when I click 'Add Comment'
> It doesnt do ANYTHING!!! I have searched high and low and
> cannot find any help on the web, so I am hoping some superstar on here
> can help??
>
> WHY is it not doing ANYTHINGatleast if I got an error I could take
> it from there, but I get NOTHING!
>
>
> PLEASE HELP!!
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake function that does "Model.Field" to $array["Model"]["Field"]

2009-06-26 Thread Eric Silva
$array["Model"]["*f*ield"] ??

--
Eric Silva


On Fri, Jun 26, 2009 at 8:37 AM, Ernesto  wrote:

>
> Hello
>
> i can't find the CakePHP's built-in function that does "Model.Field"
> to $array["Model"]["Field"]
>
> i'll use that function in a Helper.
>
> is that correct?
>
> better ideas?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Database design

2009-05-27 Thread Eric Silva

First, sorry my bad English...

Well, you could have a field "type" that reference the entity that has 
the commentary.  Pattern Single Table.


Braindead wrote:
> Well, my problem is not directly related to CakePHP, but as it's about
> database design maybe I'll get some good answers.
>
> On my page I have news, downloads and users. These three can be
> commented. Additionally I have a shoutbox and a guestbook. The
> comments, shoutbox and guestbook have all the same fields. So they
> could reside in the same table.
>
> Is it best practice to only have one table for all comments (news,
> downloads, users), the shoutbox and the guestbook and actually filter
> based on a type column? Or is it better to separate everything into
> it's own table?
>
> Using only one table has the advantage, that I could use only one
> controller and a limited set of views, where as using multiple tables
> would mean multiple controllers and duplicated views (as they are all
> nearly the same).
>
> So what do you recomment?
> >
>   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Validation messages and redirect issue

2009-05-04 Thread Eric Martin

Thanks brian! I've decided to either just send the user to the user/
register page if an error occurs (which will maintain the messages) or
do as you suggested.


On May 4, 9:05 am, brian  wrote:
> Yes, the redirect is the problem because it forces a new request to
> the server. Validation messages are not the same as Session flash()
> messages in that they're not saved in the session and available at a
> later time.
>
> If you consider a typical action involving a form submission, if
> there's no save() (ie. because of invalid data) PHP will run through
> the method without reaching a redirect. Because of this, Cake will
> redisplay the action's view (the form). And FormHelper, in drawing up
> the things its responsible for, will catch and display any validation
> error messages. They're just view variables, in other words.
>
> Someone else might have a better idea, but I think the easiest
> solution would be to put the messages in the session and display them
> in the same manner as session flash messages. That is, go around
> FormHelper completely for displaying the errors. The downside is that
> the errors won't be displayed inline with the form but, if you're
> registration is on the homepage, I'm assuming there are only a couple
> of fields. Even if not, it might not be so bad.
>
> So, before redirection, check $this->User->validationErrors and, if
> not empty, use $this->Session->flash() to transport it to the next
> view. I suppose you'll need to loop through the array and grab
> whatever errors are present. Use
> die(debug($this->User->validationErrors)) in your action to see how
> its laid out.
>
> Does that make sense?
>
> On Mon, May 4, 2009 at 1:07 AM, Eric Martin  wrote:
>
> > I'm having a problem getting validation messages to show up for a
> > register/sign-up form. I have the form on the home page, which is
> > accessed through a HomeController.
>
> > The register/sign-up form posts to the UsersController, register
> > function, which does the save. Regardless of the result, it redirects
> > back to the home page but the form validation messages are gone.
>
> > If I move the register/sign-up form to its own url/page, it all works,
> > so I'm pretty sure that the redirect is wiping out the validation
> > messages.
>
> > Being fairly new to CakePHP, I'd appreciate any suggestions on how to
> > make this work.
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Validation messages and redirect issue

2009-05-04 Thread Eric Martin

I'm having a problem getting validation messages to show up for a
register/sign-up form. I have the form on the home page, which is
accessed through a HomeController.

The register/sign-up form posts to the UsersController, register
function, which does the save. Regardless of the result, it redirects
back to the home page but the form validation messages are gone.

If I move the register/sign-up form to its own url/page, it all works,
so I'm pretty sure that the redirect is wiping out the validation
messages.

Being fairly new to CakePHP, I'd appreciate any suggestions on how to
make this work.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffolding and Bake Question

2009-01-12 Thread Eric

The event types for both is INT.  There is not a title in either
table.

On Jan 12, 1:55 pm, Rob Wilkerson  wrote:
> On Jan 12, 2:36 pm, Eric  wrote:
>
>
>
> > Hello,
>
> > I have an entity called "Event" and an entity called "Gathering".  A
> > "Gathering" is comprised of one or more "Event".
> > I have a table called "events" and a table called "gatherings".  I
> > also have a table called "events_gatherings" that contains 2 fields
> > "event_id" and "gathering_id".
>
> > The "Gathering" model contains the line: "var $hasAndBelongsToMany =
> > 'Event';".  When this relationship is defined and scaffold is turned
> > on, my add Gathering page presents me with a select list of events to
> > choose from (this is what I expect).  However when I run bake and
> > define the same type of relationship between "Event" and "Gathering"
> > the resulting add page for Gathering does not present a select list of
> > events to choose from.
>
> > Why is this?  Am I doing something wrong, or was I meant to do this
> > part for myself?  I figured if I get the select list with scaffolding,
> > I would get it with the code generation from bake.
>
> In the respective tables, what is the data type for event_id and
> gathering_id? Is there a "title" field in both?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Scaffolding and Bake Question

2009-01-12 Thread Eric

Hello,

I have an entity called "Event" and an entity called "Gathering".  A
"Gathering" is comprised of one or more "Event".
I have a table called "events" and a table called "gatherings".  I
also have a table called "events_gatherings" that contains 2 fields
"event_id" and "gathering_id".

The "Gathering" model contains the line: "var $hasAndBelongsToMany =
'Event';".  When this relationship is defined and scaffold is turned
on, my add Gathering page presents me with a select list of events to
choose from (this is what I expect).  However when I run bake and
define the same type of relationship between "Event" and "Gathering"
the resulting add page for Gathering does not present a select list of
events to choose from.

Why is this?  Am I doing something wrong, or was I meant to do this
part for myself?  I figured if I get the select list with scaffolding,
I would get it with the code generation from bake.

Thanks...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Acl example help.

2009-01-12 Thread Eric

I just installed cakePHP 1.2, I am at step 10.2.6 in the "Example
Applications" section of the manual.  I have added the buildAcl()
function to the app_controller.php file, but how do I run the
function?

I have tried several methods, but keep getting errors.  Any help is
appreciated.

Thanks...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: About CakePHP

2008-11-07 Thread Eric Saboia (Fortes Informatica)

Hey..
Nobody can ask my question?

On 6 nov, 09:56, "Eric Saboia (Fortes Informatica)"
<[EMAIL PROTECTED]> wrote:
> Hello,
> I´m looking for some of Cake´s history (why it begun, what inspirated
> it, etc)... where can i get information about that?
>
> Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



About CakePHP

2008-11-06 Thread Eric Saboia (Fortes Informatica)

Hello,
I´m looking for some of Cake´s history (why it begun, what inspirated
it, etc)... where can i get information about that?

Thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



SQL expressions in paginate or find

2008-09-26 Thread Eric C. Weaver

In one model's (controller's) index action, I'd like to fetch an
additional column to tell whether the timestamp field is recent.
What I'd like to be able to do (and tried unsuccessfully) would be
something like

$this->paginate['fields'] = array('Model.*', "(ts > current_timestamp
- interval '4 hours')");

Any clues how to do this?

Thanks...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Filemaker and CakePHP

2008-07-17 Thread Eric


The database is going to be updated primarily from an existing
Filemaker application. However, there will be some changes from the
web site that will need to be added to the database, ie. new user
registration, new "posts" from the users. I would expect there to be
daily modifications of existing data from the filemaker client, and a
large influx of new data from the FileMaker client about once a month.

The database is relational and is being run on the latest version of
Filemaker. There is not a huge amount of data currently, but the site
is expected to grow.

Thanks.

On Jul 16, 9:44 pm, GravyFace <[EMAIL PROTECTED]> wrote:
> Is the data on the website going to be read-only?  How often is the
> data going to change?  How much data?  Is the data relational?  What
> version if Filemaker? Can't really expect us to give you advice
> without knowing what it is you're trying to do.
>
> On Wed, Jul 16, 2008 at 8:19 PM, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> > A few years ago I had to work with Cake and Filemaker - but thankfully
> > I convinced them that the website could use it's own database, and
> > their internal Filemaker database would just synchronise from this
> > live site with a Filemaker script (one way synch only).  There was
> > just a cake action that output appropriate data as an XML file
> > suitable for Filemaker, and the Filemaker script updated from this
> > (with a recorded macro, as I recall).
>
> > But the final solution is quite limited (one way, not automatic), and
> > it was a pain to work with - I really didn't like FileMaker after
> > that.
>
> > Admittedly, this was back when Filemaker was not relational either (FM
> > 6 or 7 as I recall), so maybe things have improved.  But if it still
> > doesn't support SQL, maybe not.
>
> > On Jul 17, 5:24 am, Eric <[EMAIL PROTECTED]> wrote:
> >> Hi,
>
> >> Has anyone had success using Filemaker as a repository for Cake? There
> >> have been a few posts here on the issue, but nothing for quite some
> >> time.
>
> >> I realize it is quite a task since Filemaker does not really handle
> >> SQL. Filemaker does have a PHP API and there is something called
> >> FX.php which is another way of accessing the data.
>
> >> The problem that I am facing is that a customer has an internal
> >> Filemaker database which they would like users of their website to
> >> have access to some of the data. They are moving their site's hosting
> >> internally to facilitate this change. If anyone has any other ideas of
> >> how to get the filemaker data into Cake, I am all ears. I was thinking
> >> some sort of database synchronization, but I think that will be more
> >> trouble then it is worth, if it is even possible.
>
> >> Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Filemaker and CakePHP

2008-07-16 Thread Eric

Hi,

Has anyone had success using Filemaker as a repository for Cake? There
have been a few posts here on the issue, but nothing for quite some
time.

I realize it is quite a task since Filemaker does not really handle
SQL. Filemaker does have a PHP API and there is something called
FX.php which is another way of accessing the data.

The problem that I am facing is that a customer has an internal
Filemaker database which they would like users of their website to
have access to some of the data. They are moving their site's hosting
internally to facilitate this change. If anyone has any other ideas of
how to get the filemaker data into Cake, I am all ears. I was thinking
some sort of database synchronization, but I think that will be more
trouble then it is worth, if it is even possible.

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth Redirect Losing $_GET value

2008-07-05 Thread Eric

You may be able to turn off the Auth redirect and handle it yourself.
I think the redirect location is stored in the Session object.

This thread may help.

http://groups.google.com/group/cake-php/browse_thread/thread/557a6367f823ef61/db0ffd9be8548bad#db0ffd9be8548bad


On Jul 4, 8:31 am, Kyle Decot <[EMAIL PROTECTED]> wrote:
> if I go to localhost/admin/view-user.php?id=1 and am not logged in I
> get redirected to the login screen. Once I have logged in, I get
> redirected back to localhost/admin/view-user.php and my id parameter
> is lost. Any suggestions on how to have this not happen?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Model Validation Rule Builder

2008-07-04 Thread Eric

I created a new way of creating validation rules for models, which I
think is kind of slick, but I don't really think the way I have it
working is very "cake-like" and I need some advice on how best it
should be implemented.

Right now in a model I am doing the following to add my RuleBuilder

addRule(new AlphaNumSpaceRule(true, false));

$field_contactName = new ValidationField('contact_name');
$field_contactName->addRule(new AlphaNumSpaceRule(true, false));

$field_phoneNumber = new ValidationField('contact_number');
$field_phoneNumber->addRule(new PhoneNumberRule());

$this->validate = array_merge($field_name-
>getFieldAsArray(),
  
$field_contactName->getFieldAsArray(),
  
$field_phoneNumber->getFieldAsArray());
}

What the code is doing is really just building the validates array by
using the builder design pattern. The good part is that adding
validation rules to your model is easy, it is simple to add multiple
validation rules to a field, and any custom validation rules (i.e. the
AlphaNumSpaceRule) you create are shared among all of the models.

My question is, should I be using a behavior, or is it ok, from a cake
perspective, to just go with my current implementation?

BTW, I think I can use $array1 += $array2 etc... instead of
array_merge which should help performance but I have not tried it yet.

Thanks in advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Use models/views object from other controllers/models/views ?

2008-07-04 Thread Eric

I am not entirely sure of what you are going after, but if
otherController and Foo are related in some way, you can do the
following.

public function myaction(){
 $this->otherController->Foo->setText("hello world");
 $this->set('foo', $this->otherController->Foo);
}

That said, in general if there is some "view" code that you want to
share between controllers (you mentioned a grid or table which has
similar properties) you can use an Element which is accessible from
any view.

Here is the link to the Elements section of the Manual for more info.
http://book.cakephp.org/view/97/elements

Good luck.



On Jul 4, 10:46 am, FluF <[EMAIL PROTECTED]> wrote:
> This is what i'm trying to do
>
> class FooController extends AppController{
>   var $name = "Foo";
>   var $useTable = false;
>
> };
>
> class Foo extends AppModel{
>   var $name = "Foo";
>   var $useTable = false;
>   private $text = "";
>
>   public function setText($txt){$this->text = $txt;}
>   public function getText(){return $this->text;}
>
> };
>
> /** foo.ctp **/
> getText(); ?>
>
> class otherController extends AppController{
>  /* ... */
>  public $uses = array('Foo');
>
>  public function myaction(){
>    $this->Foo->set('my text');
>    $this->set('foo', 'my text');
>  }
>
> }
>
> /** otherController/myaction.ctp **/
> render(); ?>
>
> Of course it doesn't work, beczuse in otherController, Foo is a Model
> not a controller so Foo->render() doesn't exist.
>
> maybe i have to do something like :
> public function myaction(){
>  load FooController
>  $this->FooController->Foo->setText("hello world");
>  $this->set('foo', $this->FooController);
>
> }
>
> but how can i load controller from an other controller ?
>
> On Jul 3, 2:56 pm, the_woodsman <[EMAIL PROTECTED]> wrote:
>
> > There are various approaches.
>
> > One is to create a view called default_index.ctp, which refers to
> > generic names, i.e $mainModel, or something similar.
>
> > Then in your controllers, make sure you pass the data in a similar
> > format to the view, with the correct generic names, i.e
>
> > $this->set('mainModel','User');
>
> > Then, force the controllers to render the default view with $this-
>
> > >render('viewPath').
>
> > I believe scaffolding works in a vaguely similar way. But as I said,
> > there are other approaches too...
>
> > On 3 Jul, 09:44, FluF <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > I'm working on a project to display many statistics from many
> > > Models( clients, phonecalls, benefits, ..).
> > > Those statistics have the same presentation :
> > >  - html table with different CSS but the same HTML code
> > >  - ordonnable columns (not all)
> > >  - tooltips for columns
> > >  ...
> > >  - graphics using GD2
>
> > > So before i found CakePhp ( and MVC) , i wrote this:
>
> > > class ArrayToTable {
> > >  public function __construct($my2DArray, $params){
> > >     /*...*/
> > >  }
> > >  /* other functions */
> > >  public function process(){
> > >    /* do some stuff with my2DArray */
> > >  }
> > >  public function render(){
> > >    /* return the HTML code */
> > >  }
>
> > > };
>
> > > And i used
> > > $bar = new ArrayToTable($result);
> > > /* work with $bar */ ;
> > > echo $bar->render();
>
> > > I found requestAction, but i don't know if it is the correct way.
>
> > > So how can i do that with cakePHP ?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth login redirect unreliable?

2008-07-02 Thread Eric

I had a similar problem and here is what I did.

1. Change your setupAuth function like this
function setupAuth(  )
{
...
$this->Auth->loginRedirect = '/users/loginRedirect';
$this->Auth->autoRedirect = false; // <-- handle redirecting yourself
}

2. create a loginRedirect action which determines where to go after a
login has succeeded

function loginRedirect()
{
 $this->log('users/LoginRedirect()', LOG_DEBUG);
 if (parent::getAuthGroup() ===  "ADMIN")
 {
  $this->log('--redirecting to admin', LOG_DEBUG);
  $this->redirect('/admin/myCtrl/index');
 }
 else
 {
  $this->log('--redirecting to normal', LOG_DEBUG);
  $this->redirect('/myCtrl/index');
}

3. Your login action is pretty simple then

function login()
{
 if ($this->Auth->login())
 {
   $this->loginRedirect();
 }
 else
 {
  if (!empty($this->data))
$this->Session->setFlash($this->Auth->loginError);
 }
}

I think you can get the page that the user was trying to access via
the session, and redirect there, but taking them to the front page
works for me
.
Hopefully this helps.

-Eric


On Jul 2, 10:44 am, leo <[EMAIL PROTECTED]> wrote:
> On 2 Jul, 17:27, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
>
> > I see what you mean, but I'm not sure that you can put 'action' => '/'
> > or 'controller' => '/'.
>
> Sorry, I missed that. Nope, I wouldn't want to be doing that even if
> it was valid.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP 1.2 RC2 - Apache Crash on Vista

2008-07-01 Thread Eric Martin

Ahh...thanks floob. I didn't think to search on trac (duh), but will
next time. At least now there is mention of it here in the groups (I
couldn't find anything previously).

On Jul 1, 12:53 am, floob <[EMAIL PROTECTED]> wrote:
> Hi Eric,
>
> I believe I had the same issue a few days ago.  There's already a bug
> report filed for it (https://trac.cakephp.org/ticket/5010).  I'm not
> familiar with Vista's server setup, but if you install a php debugger,
> I'd bet you'll find the application stuck in an infinite loop.
>
>
>
> On Mon, Jun 30, 2008 at 9:54 PM, Eric Martin <[EMAIL PROTECTED]> wrote:
>
> > I ran into an issue tonight that caused Apache 2.2 to crash on Vista
> > using RC2. Basically, I deleted a helper file from my file-system but
> > forgot to remove the reference to it (var $helpers = array()) from my
> > app_controller.php file, which caused httpd.exe to crash/shut down.
>
> > I'm not sure if it is something that CakePHP can do to prevent, but
> > just wanted to post a note in case others run into the same/similar
> > issue.
>
> >http://www.ericmmartin.com/cakephp-12-rc2-apache-crash-on-vista/- Hide 
> >quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP 1.2 RC2 - Apache Crash on Vista

2008-07-01 Thread Eric Martin

I ran into an issue tonight that caused Apache 2.2 to crash on Vista
using RC2. Basically, I deleted a helper file from my file-system but
forgot to remove the reference to it (var $helpers = array()) from my
app_controller.php file, which caused httpd.exe to crash/shut down.

I'm not sure if it is something that CakePHP can do to prevent, but
just wanted to post a note in case others run into the same/similar
issue.

http://www.ericmmartin.com/cakephp-12-rc2-apache-crash-on-vista/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Should I learn cake 1.1 or 1.2?

2008-05-31 Thread Eric Martin

As long as you understand the pros and cons of each, it's really up to
you. I personally chose to work with 1.2 and have been using the
nightly builds. IMO, the new features outweigh any "lack of
documentation" (real or perceived). I believe a 1.2 RC release is
expected soon, if that influences your decision any. Bottom line,
either version is great and it just comes down to your preference.

On May 30, 7:25 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
> I learned the very basics of codeigniter before school started and now
> that school is out I decided to learn cakephp instead.  However I just
> realized that there is a 1.1 and 1.2 beta.  Which one should I learn?
> It seems that if a learn 1.1, by the time that I finish learning it
> enough to be able to release a website, 1.2 will then be out and I
> will want to learn that one. Which one should I learn?  I also noticed
> that they both have separate documentations, which one would be easier
> to learn from?
>
> Thanks,
> Jonah

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 1.2 is-dir Error

2008-01-25 Thread ERic ZoU

Anyone?

On Jan 24, 9:33 am, ERic ZoU <[EMAIL PROTECTED]> wrote:
> Hi, everyone,
>
> I update my 1.19 to 1.2. There are errors occur below. What happened?
> Is the error from my Host?
>
> Warning: is_dir() [function.is-dir]: open_basedir restriction in
> effect. File(/usr/share/pear/cake/libs/model) is not within the
> allowed path(s): (/webhosting/katiezhou) in /webhosting/katiezhou/
> wwwroot/cake/libs/configure.php on line 461
>
> http://www.sellcentre.cn/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



  1   2   3   >