Wednesday, October 28, 2015

Re: 404 requests filling view cache

@euromark This affects caching? The issue is that the bad requests are nonetheless being saved to the cache views dir.

@ojtibi Sorry, should have included that.

core.php:

Configure::write('Cache.disable', false);
Configure::write('Cache.check', true);

$engine = 'File';
if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
        $engine = 'Apc';
}

$duration = '+999 days';
if (Configure::read('debug') >= 1) {
        $duration = '+10 seconds';
}

Cache::config('_cake_core_', array(
        'engine' => $engine,
        'prefix' => 'cake_core_',
        'path' => CACHE . 'persistent' . DS,
        'serialize' => ($engine === 'File'),
        'duration' => $duration
));

Cache::config('_cake_model_', array(
        'engine' => $engine,
        'prefix' => 'cake_model_',
        'path' => CACHE . 'models' . DS,
        'serialize' => ($engine === 'File'),
        'duration' => $duration
));


bootstrap.php:
Cache::config('default', array('engine' => 'File'));

Just a simple site, nothing special, as you can see.

I'm wondering if it's less to do with cache config but in error handling. Something to tell Cake, "btw, don't cache this". But I'm not seeing anything like that.

On Wed, Oct 28, 2015 at 7:36 AM, euromark <dereuromark@gmail.com> wrote:
Yes, in 2.4+ there is a skipLog param:

But I just log them to a different log file via custom handler:

Mark



Am Mittwoch, 28. Oktober 2015 01:34:43 UTC+1 schrieb cricket:
Cake 2.2.4 (Yeah, i know -- need to upgrade this site!)

I just noticed that the view cache dir has a bunch of files along the lines of:

s_2fabc_2fabc_2fabc_2f_24_7b_40print_28md5_28base64_decode_28mzywd2vic2nhbg_29_29_29_7d_2f.php

Looks like the work of script kiddies. However, I'm also seeing things like this:

articles_deep_denial_or_disinformation.php
articles_dee.php

The first is the correct name/path and the second one is incomplete. There are several examples of this. I dunno if it's a Cake issue or not but the latter really shouldn't be cached as it's a 404.

Is there some way to tell Cake *not* to cache these?

--
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+unsubscribe@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.

--
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+unsubscribe@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: 404 requests filling view cache

Yes, in 2.4+ there is a skipLog param:
http://book.cakephp.org/2.0/en/appendices/2-4-migration-guide.html#errorhandler

But I just log them to a different log file via custom handler:
See https://github.com/dereuromark/cakephp-tools/wiki/Included-fixes-and-migration-tweaks#bugfixes--useful-adjustments
and https://github.com/dereuromark/cakephp-tools/blob/master/src/Error/ErrorHandler.php .

Mark



Am Mittwoch, 28. Oktober 2015 01:34:43 UTC+1 schrieb cricket:
Cake 2.2.4 (Yeah, i know -- need to upgrade this site!)

I just noticed that the view cache dir has a bunch of files along the lines of:

s_2fabc_2fabc_2fabc_2f_24_7b_40print_28md5_28base64_decode_28mzywd2vic2nhbg_29_29_29_7d_2f.php

Looks like the work of script kiddies. However, I'm also seeing things like this:

articles_deep_denial_or_disinformation.php
articles_dee.php

The first is the correct name/path and the second one is incomplete. There are several examples of this. I dunno if it's a Cake issue or not but the latter really shouldn't be cached as it's a 404.

Is there some way to tell Cake *not* to cache these?

--
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+unsubscribe@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.

Tuesday, October 27, 2015

Re: 404 requests filling view cache

How does your cache configuration look like?

On Wednesday, October 28, 2015 at 8:34:43 AM UTC+8, cricket wrote:
Cake 2.2.4 (Yeah, i know -- need to upgrade this site!)

I just noticed that the view cache dir has a bunch of files along the lines of:

s_2fabc_2fabc_2fabc_2f_24_7b_40print_28md5_28base64_decode_28mzywd2vic2nhbg_29_29_29_7d_2f.php

Looks like the work of script kiddies. However, I'm also seeing things like this:

articles_deep_denial_or_disinformation.php
articles_dee.php

The first is the correct name/path and the second one is incomplete. There are several examples of this. I dunno if it's a Cake issue or not but the latter really shouldn't be cached as it's a 404.

Is there some way to tell Cake *not* to cache these?

--
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+unsubscribe@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.

404 requests filling view cache

Cake 2.2.4 (Yeah, i know -- need to upgrade this site!)

I just noticed that the view cache dir has a bunch of files along the lines of:

s_2fabc_2fabc_2fabc_2f_24_7b_40print_28md5_28base64_decode_28mzywd2vic2nhbg_29_29_29_7d_2f.php

Looks like the work of script kiddies. However, I'm also seeing things like this:

articles_deep_denial_or_disinformation.php
articles_dee.php

The first is the correct name/path and the second one is incomplete. There are several examples of this. I dunno if it's a Cake issue or not but the latter really shouldn't be cached as it's a 404.

Is there some way to tell Cake *not* to cache these?

--
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+unsubscribe@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: belongsToMany issue



Il giorno lunedì 26 ottobre 2015 18:58:55 UTC+1, John Andersen ha scritto:
Is your Achievements class an extension of the Table class?

oh, yes ! 

--
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+unsubscribe@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.

View cells and helpers

Hi

Feel like i'm starting to get to grips with cakephp. Really loving it now.

Here's something that's got me stumped though.

I've build a plugin (For learning purposes) that builds a menu. It has a helper that builds the menu. I wanted to get access to this helper in the view cell file and i found it has a helpers property.

However, when i add the name of my helper to this property the helper is not available in the view cell file. It is available in the display file though!

I would really like to access this helper in the viewcell and i just wanted to know if anyone one here knows how to do that?

Cheers.

--
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+unsubscribe@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.

Monday, October 26, 2015

Help CakePhp 3.0

How to write the tags below to the version 3.0 of the cake?

<a href="./layout/boxed.html"><i class="fa fa-circle-o"></i> New </a>


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+unsubscribe@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: Avoid converting date/datetime fields to Cake/Time instances with CakePHP 3

Jose,

It turns out that I AM MISTAKEN...  The input field I was looking at was defined as a "datetime".

However...  The real issue is that the datetime input field is populated by cake always as yyyy-mm-dd hh:mm:ss  If it is a date object, it is yyy-mm-dd.  If I am in locale en-US and have added the following to the boostrap.php
DispatcherFactory::add('LocaleSelector', ['locales' => ['en_US']]);

Type::build('datetime')->useLocaleParser();
Type::build('date')->useLocaleParser()->setLocaleFormat(['MM/dd/yyyy', \IntlDateFormatter::NONE]);
Type::build('time')->useLocaleParser()->setLocaleFormat([\IntlDateFormatter::NONE, 'hh:mm a']);

Then, the parser on any attempt to save the data will die... returns null... and then attempts to use null as a pointer.

If I change the parser to they mysql yyy-mm-dd or remove the parser altogether, then it works.  All of this is just to keep from using 3 fields to enter a date, or 6 fields to enter a datetime!  I want to use a js datepicker and have LOCALE style inputs.

In DateTimeType.php the "marshal" function uses sprintf() to format the date/time and probably should be using  a "time->i18nFormat()" to get the default user time shown and then the parser should use new Time( $input_str, USER_TIMEZONE) to parse the string... it accepts multiple types of input strings and "figures" out the order of MDY.  Then it should store the time in the yyy-mm-dd hh:mm:ss converted to SERVER_TIMEZONE.

The use of setLocaleFormat just complicates everything... If the i18n->locale is set, Time:: takes care of parsing the string!

Sorry for all the blather, I'm just trying to explain what I think it should be doing.  Again, I'm sorry for mistakenly stating that the time is always output for a "date" field.  By the way, "time" fields are also fixed format in the marshaller!



On Monday, October 26, 2015 at 4:36:21 AM UTC-6, José Lorenzo wrote:
It is an unimplemented feature... Someone need to solve that issue of showing time in a date column

On Friday, October 23, 2015 at 9:56:34 PM UTC+2, glk wrote:
@JoseLorenzo

The reason is that the cake $this->Form->input('date_field') always generates 3 input fields.  If the input uses type=text, the field is populated with mm/dd/yyyy, hh:mm:ss
And all we should have is mm/dd/yyyy... of course it should also be LOCALE format.


--
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+unsubscribe@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: belongsToMany issue

Is your Achievements class an extension of the Table class?
I did not see that in your original post.
Enjoy, John

On Monday, 26 October 2015 19:39:21 UTC+2, lorenzoshake wrote:


Il giorno lunedì 26 ottobre 2015 18:19:01 UTC+1, John Andersen ha scritto:
Check your model associations - is any of them relying on CakePHP identifying the keys?
Check your queries - is any of them specifying the offending column?

Enjoy, John

On Monday, 26 October 2015 18:44:29 UTC+2, lorenzoshake wrote:
i 've a strange assoc problem:

class Achievements
{
        $this->belongsToMany('SocialUsers', [
            'foreignKey' => 'achievement_id',
            'targetForeignKey' => 'user_id',
            'joinTable' => 'achievements_users',
            'through'=>'AchievementsUsers'
        ]);
 ...


if i delete all cache i raise error:
 Column not found: 1054 Unknown column 'AchievementsUsers.social_user_id' in 'field list' 
but if i reload the page all works fine ( until the next cache delete)
It's like targetForeignKey was not readed first time execution.
I've a lot of this belongsToMany but only here there is this issue
Some suggests?!

if do  a query:
$user =  SocialUsers->find()->where(...)contain( ... 'Achievements')->first(); 
if I remove 'Achievements' from contain  all works fine
the assotiation in SocialUsers is:

$this->belongsToMany('Achievements', [
'className'=>'Achievements',
            'joinTable' => 'achievements_users',
            'foreignKey' => 'user_id',
            'targetForeignKey'=>'achievement_id',
            
        ]);

don't know why doesn't works with Achievments in contain!




--
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+unsubscribe@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: belongsToMany issue



Il giorno lunedì 26 ottobre 2015 18:19:01 UTC+1, John Andersen ha scritto:
Check your model associations - is any of them relying on CakePHP identifying the keys?
Check your queries - is any of them specifying the offending column?

Enjoy, John

On Monday, 26 October 2015 18:44:29 UTC+2, lorenzoshake wrote:
i 've a strange assoc problem:

class Achievements
{
        $this->belongsToMany('SocialUsers', [
            'foreignKey' => 'achievement_id',
            'targetForeignKey' => 'user_id',
            'joinTable' => 'achievements_users',
            'through'=>'AchievementsUsers'
        ]);
 ...


if i delete all cache i raise error:
 Column not found: 1054 Unknown column 'AchievementsUsers.social_user_id' in 'field list' 
but if i reload the page all works fine ( until the next cache delete)
It's like targetForeignKey was not readed first time execution.
I've a lot of this belongsToMany but only here there is this issue
Some suggests?!

if do  a query:
$user =  SocialUsers->find()->where(...)contain( ... 'Achievements')->first(); 
if I remove 'Achievements' from contain  all works fine
the assotiation in SocialUsers is:

$this->belongsToMany('Achievements', [
'className'=>'Achievements',
            'joinTable' => 'achievements_users',
            'foreignKey' => 'user_id',
            'targetForeignKey'=>'achievement_id',
            
        ]);

don't know why doesn't works with Achievments in contain!




--
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+unsubscribe@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: belongsToMany issue

Check your model associations - is any of them relying on CakePHP identifying the keys?
Check your queries - is any of them specifying the offending column?

Enjoy, John

On Monday, 26 October 2015 18:44:29 UTC+2, lorenzoshake wrote:
i 've a strange assoc problem:

class Achievements
{
        $this->belongsToMany('SocialUsers', [
            'foreignKey' => 'achievement_id',
            'targetForeignKey' => 'user_id',
            'joinTable' => 'achievements_users',
            'through'=>'AchievementsUsers'
        ]);
 ...


if i delete all cache i raise error:
 Column not found: 1054 Unknown column 'AchievementsUsers.social_user_id' in 'field list' 
but if i reload the page all works fine ( until the next cache delete)
It's like targetForeignKey was not readed first time execution.
I've a lot of this belongsToMany but only here there is this issue
Some suggests?!

--
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+unsubscribe@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.

belongsToMany issue

i 've a strange assoc problem:

class Achievements
{
        $this->belongsToMany('SocialUsers', [
            'foreignKey' => 'achievement_id',
            'targetForeignKey' => 'user_id',
            'joinTable' => 'achievements_users',
            'through'=>'AchievementsUsers'
        ]);
 ...


if i delete all cache i raise error:
 Column not found: 1054 Unknown column 'AchievementsUsers.social_user_id' in 'field list' 
but if i reload the page all works fine ( until the next cache delete)
It's like targetForeignKey was not readed first time execution.
I've a lot of this belongsToMany but only here there is this issue
Some suggests?!

--
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+unsubscribe@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: New CakePHP ORM to CakePHP 2.x

I don't get your problem guys. :) Add the new ORM via composer.

Just create the folders inside your 2.x app:
  • app/Model/Table
  • app/Model/Entity
Make sure your autoloader is finding the classes based on their namespace and put your tables and entities in there just as you would do it in Cake3. Then use the TableRegistry instead of the ClassRegistry to get your table objects. Just the fact that Cake2 is not using newer php language features doesn't mean you can't use them. You can create and use traits within your app as well to make getting tables more easy for example.

BUT: If you're after a magic "convert all and everything" to the new ORM, this is not going to happen, you'll have to do it by hand.

The way we do it is to slowly migrate what we need, when we need it. So we'll slowly replace the old with the new ORM, they can co-exist. This way we get the fancy new ORM but can slowly migrate our app as we go.

--
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+unsubscribe@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: Avoid converting date/datetime fields to Cake/Time instances with CakePHP 3

It is an unimplemented feature... Someone need to solve that issue of showing time in a date column

On Friday, October 23, 2015 at 9:56:34 PM UTC+2, glk wrote:
@JoseLorenzo

The reason is that the cake $this->Form->input('date_field') always generates 3 input fields.  If the input uses type=text, the field is populated with mm/dd/yyyy, hh:mm:ss
And all we should have is mm/dd/yyyy... of course it should also be LOCALE format.


--
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+unsubscribe@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: CakePHP 3.x - Schema, Mysql and LONGTEXT

Re-opening thread. Migration plugins for both versions 2 and 3 should support MEDIUMTEXT and LONGTEXT. The fact is, the developer should be the one responsible in determining if their data is compatible with their desired database engine, which means it shouldn't be a problem that these fields are MySQL/MariaDB specific.

For example, if the developer chooses to move their database to MSSQL or PostgreSQL, they are still responsible to do sanity checks on the actual data stored on the new engines, and update their Migration schemas accordingly.

On Sunday, April 27, 2014 at 4:06:08 PM UTC+8, Thomas von Hassel wrote:
I take it there is still no good way to express LONGTEXT type via the schema system ?

/thomas

--
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+unsubscribe@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.

Sunday, October 25, 2015

Fw: new message

Hey!

 

New message, please read http://floridadentalanesthesia.com/opposite.php

 

lucbernard@telenet.be

Friday, October 23, 2015

Re: Avoid converting date/datetime fields to Cake/Time instances with CakePHP 3

@JoseLorenzo

The reason is that the cake $this->Form->input('date_field') always generates 3 input fields.  If the input uses type=text, the field is populated with mm/dd/yyyy, hh:mm:ss
And all we should have is mm/dd/yyyy... of course it should also be LOCALE format.


--
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+unsubscribe@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: Cakephp Inline Editing

In your code you are already using $stop as an array:

        $this->set('stop',$stop['Leave']['event_stop_time']);

so when you try to calculate the $hours, then you have an array - a value :)

Try and fix that!
Enjoy, John

On Friday, 23 October 2015 12:43:47 UTC+3, Para K wrote:
I'm working on a project for Payroll Dept. I have included inline editing feature in my code.

When the user edits start date, the program should calculate and update the hours field by subtracting the stop date from start date. I'm stuck on the calculation part giving an error "Unsupported Operand Types". Below is my code snippet

case 'event_date':
           
             if ($this->request->data['Leave']['event_date'] == $value) {
                   
                    $stop = $this->Leave->find('first', array('conditions' => array('event_date' => $value)));
                    $this->set('stop',$stop['Leave']['event_stop_time']);
                   
                    $start = $this->request->data['Leave']['event_date'];
                                   
                    $hours = ($stop - $start);
                    $this->request->data['Leave']['hours'] = $hours;
                    $this->set('updated_value', $hours);
               
             }

Any form of help is much appreciated as I'm a newbie to cakephp

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+unsubscribe@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.

Connecting to MSSQL Database with PDO_DBLIB

Hello,
I'm currently running a cakeapp on my OSX and wanting to connect to a MSSQL Database using the PDO_DBLIB.
I'm able to connect using freetds and using the mssql_ functions, but I'd like to use it as a DBO Source object.
Can anyone help?
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+unsubscribe@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: loading plugin in cake 1.3 bootstrap

Never mind.

Just in case someone is not daring enough to try, it is done in the same way by adding:

public $components = array( 'DebugKit.Toolbar' );

to AppController or the specific one where it is needed.

--
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+unsubscribe@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: loading plugin in cake 1.3 bootstrap

I realize this is ancient history, but I cannot find in the docs/books how to enable DebugKit in CakePHP 1.3.

(I am doing support on an old app that seems to have been stripped of all the "unused" files).

GitHub docs for DebugKit refer to lighthouse.com, but there does not seem to be anything there anymore.

Can someone help or point me to where the old docs are (if any) ?

--
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+unsubscribe@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.

Thursday, October 22, 2015

cakephp 3.1 - mySQL data field types of DATE and TIME don't seem to populate the input fields correctly when using input type = text

Since I don't want to use 3 fields of input for a date, the idea of using a text field with a datepicker seemed logical.

I've set :   
    //Config\USER_LOCALE = 'en_US'

    I18n
::locale( Config\USER_LOCALE );
   
Time::$defaultLocale =  Config\USER_LOCALE;

So I'm expecting the have a date formatted as 9/5/2015.

At the time $this->Form->input is called with type=text, the Entity holds:
+ [on_date]
    $_fomatters
    $_toStringFormat
[ 3, 3 ]
    $date
= 2015-09-05 00:00:00.000000
    $defaultLocale
= en_US
    $timezone
= UTC
    $toStringFormat
= Y-m-d H:i:s


The toStringFormat is what mySQL wants to give use for a DATETIME, and what it wants back of course.  I was expecting to get the Y-m-d format for the input field... but the input field is created and populated with "9/5/15, 12:00 AM"  Which is correct form for LOCALE, but has time involved.

Since this is a DATE field, the time specifier should not be there... the opposite is true when I have a TIME field... it has a DATE.

It would seem to me that the Time routine that is called as the text field is populated should at least use the LOCALE format for the DATE and leave the time out!  Then maybe the Validation routines would work.  If it uses the toStringFormat of the date object, that would be ok with me as long as the time is left out.

Now, I can get what I want... but I have to drop the ORM and get a ->hydrate(false)->toArray() ...alter the date and time field to use the locale and no time...  edit... build an entity from array, change the format of the date and time to keep mySQL happy, and then save.

As usual, there is probably something very simple that I've missed, but I've wasted a lot of time trying to get this to work the "cakePHP" way.  Any ideas, or suggestions would be greatly appreciated.








--
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+unsubscribe@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.

Load flash in my component

Hi group ? How to load component flash on my component ?

Error: Call to a member function success() on null 
File /var/www/uniaoestudantil/src/Controller/Component/ComprovanteuploadComponent.php 
Line: 16


--
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+unsubscribe@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: Plugin appController beforeFilter() action doesn't work anymore

There are changes made with each minor release that can affect your app; start here (http://book.cakephp.org/2.0/en/appendices.html) to see them listed all in one place. - Rob Maurer

--
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+unsubscribe@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: New CakePHP ORM to CakePHP 2.x

Also interested in this question.

Partial Migration would be great.

I'm looking for a way to migrate some models to new ORM and gradually migrate the others..



On Tuesday, September 22, 2015 at 9:23:50 AM UTC+2, Sulian Lanteri wrote:
Hello

Before migrate a big application in CakePHP3, I want first use the new ORM in this CakePHP 2.6 application, any idea how to do that (and/or a good example) ?

Sulian

--
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+unsubscribe@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: Use Bake with another PHP version

Find the PHP.INI for your desirde PHP Version, and view the executable path marked with "PHP_BINDIR" variable.

Then do /path/to/php cake bake

hope it works... i have not tested :(

On Wednesday, October 14, 2015 at 10:45:06 PM UTC+2, Sebastian S wrote:
Hi all 
I have trouble using bin/bake, because of my server setup (dedicated), I think. It uses PHP as CGI and in default the terminal uses PHP 4. 

(13:38:26) [webfiles] bin/cake bake all users
X-Powered-By: PHP/4.4.9
Content-type: text/html

<br />
<b>Warning</b>:  Unexpected character in input:  '\' (ASCII=92) state=1 in <b>/mypath/webfiles/bin/cake.php</b> on line <b>33</b><br />
<br />
<b>Parse error</b>:  syntax error, unexpected T_STRING in <b>/mypath/webfiles/bin/cake.php</b> on line <b>33</b><br />
(13:38:29) [webfiles]

Is there any way to call bake with another PHP version?

Thanks!!

Sebastian

--
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+unsubscribe@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: Pesquisa de Frameworks PHP

Respondindo

On Wednesday, October 14, 2015 at 10:45:06 PM UTC+2, cassiane silva wrote:
Oi gente, sou Cassiane estou fazendo meu TCC sobre frameworks PHP em visão de fazer o meu próprio para Trabalho de Conclusão em Analise e Desenvolvimento de Sistema
Demora apenas 5 minutos e preciso muito que ao menos 10 respondam pois voces já utilizam o cake e provavelmente já usaram outro framework por favor gente é muito importante
preciso de uma amostra de pelo menos 30 pessoas.


Este é o link do google drive
https://docs.google....m?usp=send_form


Quem achar que é vírus ou etc... 
Pode deixar o email que eu envio por email até pq pode responder depois quem sabe.
Obrigada gente nem que seja só por terem lido.

--
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+unsubscribe@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.

Wednesday, October 21, 2015

Plugin appController beforeFilter() action doesn't work anymore

Since my update from CakePhp 2.3. to CakePhp 2.7., my beforeFilter() action in pluginAppController doesn't work anymore:

<?php

class CoasterCmsAppController extends AppController
{
   
public $helpers = array(
       
'Html',
       
'Form',
       
'Session'
   
);
   
   
public $components = array(
       
'Session',
       
'Paginator',
       
'Auth' => array(
           
'loginAction' => array(
               
'plugin' => 'coaster_cms',
               
'controller' => 'users',
               
'action' => 'login'
           
),
           
'loginRedirect' => array(
               
'plugin' => 'coaster_cms',
               
'controller' => 'attractions',
               
'action' => 'index'
           
),
           
'authenticate' => array(
               
'Form' => array(
                   
'passwordHasher' => 'Blowfish'
               
)
           
),
           
'authError' => 'No rights to visit this page.'
       
)
   
);
   
   
public function beforeFilter()
   
{
debug
('test'); // No "test" output in any of my plugin actions
        parent
::beforeFilter()
   
}
}

?>

Does anybody knows what could possibly go wrong in my application that causes this?

--
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+unsubscribe@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 Url Problem

Hello everyone!

i am new to cakephp, i have an issue in pagination urls, First page link is not correct other page urls are perfect. Please help. First page url is links to the current page url. its really awesome.
https://www.savnpik.com/abu-dhabi-deals/autos/3 check 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+unsubscribe@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.

Tuesday, October 20, 2015

Bug in 3.1.2?

I've recently updated my application to 3.1.2 from 3.1.1. I'm encountering an exception:

Exception: Cannot convert value to bool in [PATHTO\vendor\cakephp\cakephp\src\Database\Type\BoolType.php, line 47]

I'm using MySQL and SQLite for database.
This error didn't occur in 3.1.1

When I pr($value) in BoolType::toDatabase(), the value is empty.

--
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+unsubscribe@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.

Cakephp Inline Editing

I'm working on a project for Payroll Dept. I have included inline editing feature in my code.

When the user edits start date, the program should calculate and update the hours field by subtracting the stop date from start date. I'm stuck on the calculation part giving an error "Unsupported Operand Types". Below is my code snippet

case 'event_date':
           
             if ($this->request->data['Leave']['event_date'] == $value) {
                   
                    $stop = $this->Leave->find('first', array('conditions' => array('event_date' => $value)));
                    $this->set('stop',$stop['Leave']['event_stop_time']);
                   
                    $start = $this->request->data['Leave']['event_date'];
                                   
                    $hours = ($stop - $start);
                    $this->request->data['Leave']['hours'] = $hours;
                    $this->set('updated_value', $hours);
               
             }

Any form of help is much appreciated as I'm a newbie to cakephp

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+unsubscribe@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: cakephp 3- how to style flash error messages?

thats is,

thanks Jose

El dilluns, 19 octubre de 2015 22:32:45 UTC+2, joserafael va escriure:
Go to src/Template/Element/Flash/error.ctp

And edit this file. Must be like this:

<div class="alert alert-danger" role="alert"><?= h($message) ?></div>


El domingo, 18 de octubre de 2015, 16:27:10 (UTC-4:30), Raul Magdalena Catala escribió:
hello,

i've tried with this but no exit

$this->Flash->error(__('The magazine could not be saved. Please, try again.',['class' => 'alert-danger']));

there is any way?

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+unsubscribe@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: Advice on menu setup

Is the menu supposed to be displayed on every page?

I gather that the menu is dynamically driven by data in the Db...
That tells me that you should have a model for it.
If it is to be included on every page, then I would load the menu model in the App Controller, probably in the beforeRender() method.
$this->loadModel('Menu');
Don't forget to include it at the top with a use statement.

Then you can set whatever variables you need to pass to your view.
In that your specifications are vague, I can't tell you exactly what to pass along...

Then with the view vars set using the set(), you can use them in the layout or in an element depending on your needs.


On Monday, October 19, 2015 at 2:41:44 PM UTC+7, Simon Bradley wrote:
Hi

I'm new to cakephp

I'm using version 3

I've been working through an existing site i have built and trying to replicate it with cakephp

I did a lot very quickly which is great but the menu is tricky

Since this is a navigation bar at the top of every page i thought i might use an element

The problem there seems to be getting the data into it from the database

I've read the manual quite a bit and based on that i thought maybe creating a model and controller for the menu would be the best way to go

Then i could call the menu controller from the article controller and get the menu data that way

It looks like i can pass the data into the menu element from there?

But then where do i put the code that actually takes the data and generates the menu?

I've looked at various tutorials but it's not made things clearer

I'd really appreciate some advice here folks.

Cheers.




--
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+unsubscribe@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.

Monday, October 19, 2015

Re: Advice on menu setup

Your existing menu likely is a series of <li> elements each containing <a> (link) elements, yes? Simply replace the <a>...</a> with <?php $this->Html->link(...) ?>. A good place to do this is app/View/Layouts/default.ctp.

--
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+unsubscribe@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: Advice on menu setup

Your existing menu is likely a series of <li> elements with <a href=""> in them, yes? Replace the <a> elements with <?php this->Html->link() ?> calls. A good place to set this up is in app/View/Layouts/default.ctp.
-Rob 

On Monday, October 19, 2015 at 3:41:44 AM UTC-4, Simon Bradley wrote:
Hi

I'm new to cakephp

I'm using version 3

I've been working through an existing site i have built and trying to replicate it with cakephp

I did a lot very quickly which is great but the menu is tricky

Since this is a navigation bar at the top of every page i thought i might use an element

The problem there seems to be getting the data into it from the database

I've read the manual quite a bit and based on that i thought maybe creating a model and controller for the menu would be the best way to go

Then i could call the menu controller from the article controller and get the menu data that way

It looks like i can pass the data into the menu element from there?

But then where do i put the code that actually takes the data and generates the menu?

I've looked at various tutorials but it's not made things clearer

I'd really appreciate some advice here folks.

Cheers.




--
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+unsubscribe@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: cakephp 3- how to style flash error messages?

Go to src/Template/Element/Flash/error.ctp

And edit this file. Must be like this:

<div class="alert alert-danger" role="alert"><?= h($message) ?></div>


El domingo, 18 de octubre de 2015, 16:27:10 (UTC-4:30), Raul Magdalena Catala escribió:
hello,

i've tried with this but no exit

$this->Flash->error(__('The magazine could not be saved. Please, try again.',['class' => 'alert-danger']));

there is any way?

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+unsubscribe@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.

Sunday, October 18, 2015

Re: cakephp 3- how to style flash error messages?

Try this:
$this->Flash->error(__('The magazine could not be saved. Please, try again.'), ['class' => 'alert-danger']);
You need to close before, the parenthesis of translation function __().

On Sunday, October 18, 2015 at 10:57:10 PM UTC+2, Raul Magdalena Catala wrote:
hello,

i've tried with this but no exit

$this->Flash->error(__('The magazine could not be saved. Please, try again.',['class' => 'alert-danger']));

there is any way?

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+unsubscribe@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.

cakephp 3- how to style flash error messages?

hello,

i've tried with this but no exit

$this->Flash->error(__('The magazine could not be saved. Please, try again.',['class' => 'alert-danger']));

there is any way?

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+unsubscribe@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.