Re: Is there any proper guide to move cakephp from server to another.

2014-12-23 Thread John Andersen
What version of CakePHP do you have on the server?
What kind of database, if any, are your site using?
Enjoy, John

On Tuesday, 23 December 2014 16:56:55 UTC+2, Bhargav Mehta wrote:
>
> Hi,
> I am new to cakephp and want to move my site from one server to another.
> How can this be done?
> I have browse through many links but not getting what they have said.
> So is there any documentation or any proper guide to move my cake php site 
> from one server to another?
> 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/d/optout.


Is there any proper guide to move cakephp from server to another.

2014-12-23 Thread Bhargav Mehta
Hi,
I am new to cakephp and want to move my site from one server to another.
How can this be done?
I have browse through many links but not getting what they have said.
So is there any documentation or any proper guide to move my cake php site 
from one server to another?
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/d/optout.


CakePHP 2.6.0 released

2014-12-23 Thread mark_story
The CakePHP core team is proud to announce the immediate availability of 
CakePHP 2.6.0. There have been a few changes to 2.6.0 since the RC1 release:

* AuthComponent now fires the `Auth.afterIdentify` event after users are 
logged in.
* HtmlHelper::script() and HtmlHelper::css() no longer share a single asset 
list for the once option.
* Postgres driver supports sslmode.
* The test suite can now use PHPUnit's phar file.
* The RLIKE operator is now supported by the MySQL driver.
* API documentation improvements
* PaginatorHelper now merges options used for active links with options 
used for disabled links.

## New Feature Highlight

* `stackTrace()` has been added as a convenience wrapper function for 
`Debugger::trace()`.
  It directly echos just as `debug()` does. But only if debug level is on.
* `ConsoleOptionParser::removeSubcommand()` was added.
* `Shell::overwrite()` has been added to allow generating progress bars or 
to avoid outputting
  too many lines by replacing text that has been already outputted to the 
screen.
* When using AclBehavior, The model's `parentNode()` method now gets the 
type
  (Aro, Aco) passed as first argument: `$model->parentNode($type)`.
* Schema migrations with MySQL now support an `after` key when adding
  a column. This key allows you to specify which column the new one should 
be
  added after.
* `Model::save()` had the `atomic` option back-ported from 3.0.
* `CakeRequest::param()` can now read values using :ref:`hash-path-syntax`
  like `data()`.
* `CakeRequest:setInput()` was added.
* `HttpSocket::head()` was added.
* You can now use the `protocol` option to override the specific protocol to
  use when making a request.
* `CakeTime::timeAgoInWords()` now supports `strftime()` compatible absolute
  date formats. This helps make localizing formatted times easier.
* `CakeTime::timeAgoInWords()` now supports a  `relativeStringFuture` 
option.
  This option is a printf compatible string for outputting future relative 
time
  date formats. This helps make localizing formatted times easier.
* `Hash::get()` now raises an exception when the path argument is invalid.
* `Hash::nest()` now raises an exception when the nesting operation results 
in
  no data.
* `HtmlHelper::css()` had the `once` option added. It works the same
  as the `once` option for `HtmlHelper::script()`. The default value is
  `false` to maintain backwards compatibility.
* The `maxlength` attribute will now also be applied to textareas, when the 
corresponding
  DB field is of type varchar, as per HTML specs.
* New i18n functions have been added. The new functions allow you to include
  message context which allows you disambiguate possibly confusing message
  strings. For example 'read' can mean multiple things in English depending 
on
  the context. The new `__x`, `__xn`, `__dx`, `__dxn`, `__dxc`, `__dxcn`, 
and
  `__xc` functions provide access to the new features.
* AuthComponent now triggers the `Auth.afterIdentify` event after 
successfully
  identifying a user.
* `Model::afterFind()` now always uses a consistent format for afterFind().
  When `$primary` is false, the results will always be located under
  `$data[0]['ModelName']`. You can set the `$this->useConsistentAfterFind = 
false` to
  restore the original behaviour if your application relies on the old 
behavior.
* Configure value `I18n.preferApp` can now be used to control the order of 
translations. If set to true it will prefer the app translations over any 
plugins' ones.

## Deprecations

In addition to new features, a few features have been deprecated, and will 
be removed in CakePHP 3.0.0

* `Validation::between` has been deprecated, you should use
  `Validation::lengthBetween` instead.
* `Validation::ssn` has been deprecated and may be provided as 
standalone/plugin solution.
* The `$confirmMessage` argument of `HtmlHelper::link()` has been
  deprecated. You should instead use key `confirm` in `$options` to specify
  the message.
* The `$confirmMessage` argument of `FormHelper::postLink()` has been
  deprecated. You should instead use key `confirm` in `$options` to specify
  the message.

## The Future of 2.x

With 2.6.0 released, the development branch for 2.7.0 has been created. 
This branch will be released in 5-6 months and will be another 2.x API 
compatible release. While the core team doesn't have any large improvements 
planned for 2.7, there will be some efforts to backport useful features 
from 3.0 to help you migrate more easily.

A huge thanks to all involved in terms of both contributions through 
commits, tickets, documentation edits, and those whom have otherwise 
contributed to the framework. Without you CakePHP wouldn't be possible.

-- 
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-

CakePHP 2.5.8 Released

2014-12-23 Thread mark_story
The CakePHP core team is proud to announce the immediate availability of 
CakePHP 2.5.8. 2.5.8 is a bugfix release for the 2.5 release branch. A 
short list of the changes you can expect is:

* Improved error messages when fixtures are missing fields.
* Human is now properly pluralized by Inflector
* TreeBehavior regression introduced in 2.5.7 was fixed.
* RequestHandler::startup() failures no longer prevent error pages from 
rendering. This could happen when custom input parsers were used.
* Fixture baking will now ignore unconventional tables instead of stopping.
* Importing schema from MySQL tables using timestamp columns now works 
better.

With the release of 2.6.0 complete, this will be the last release of 2.5.x 
barring any security related issues.

You can view the full [changelog on 
cakephp.org](http://cakephp.org/changelogs/2.5.8). I'd like to thank the 
people who have contributed to this release. Your bug tickets, 
documentation edits, and patches/pull requests are a big part of what keeps 
CakePHP alive and ticking. Download a [packaged release on 
github](https://github.com/cakephp/cakephp/releases/2.5.8).

-- 
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: cant send email from localhost

2014-12-23 Thread McScreech
I have found that firewall and/or virus scanner settings will prevent 
mailing from localhost.
Since I am working in a corporate intranet environment, I have no access to 
any of the configuration settings needed to compensate - so, I simply 
CANNOT use such functionality.
In my case, I have smtp ports blocked AND McAfee prevents 'mass mailing 
worms from sending mail', and possibly others I have not encountered yet.
If you can access your intranet admins, see if they can identify the choke 
point and can/will provide you an exception to the related setting(s).

On Thursday, 18 December 2014 08:48:09 UTC-5, ajt wrote:
>
> Hi,
>
> I cant send a email from my localhost xampp/win7 
> I dont get an error , I just get nothing
>
> I set up the email and also config. I read the docs and couldnt see 
> anything on this.
>
> http://book.cakephp.org/2.0/en/core-utility-libraries/email.html
>
>   $Email = new CakeEmail();
> $Email->config('smtp')
>  ->from('em...@gmail.com ')
>->to('jagg...@gmail.com ')
>  ->subject('Test')
>  ->send($message);
>
>
> public $smtp = array(
> 'transport' => 'Smtp',
> 'from' => array('site@localhost' => 'My Site'),
> 'host' => 'localhost',
> 'port' => 25,
> 'timeout' => 30,
> 'username' => 'user',
> 'password' => 'secret',
> 'client' => null,
> 'log' => false,
> //'charset' => 'utf-8',
> //'headerCharset' => 'utf-8',
> );
>

-- 
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: CakePHP 2.0 authentication(login) without ctp files but other types

2014-12-23 Thread Joe T.
Is that the actual data in `users`, or just simplified for example? Just 
want to clarify. Manually adding records won't work in this case. Auth 
automatically encrypts the submitted password & compares it to the database 
value. If you enter '123' as the password, it's not going to match '123' in 
the database after Auth encrypts it.

Look here for how to set up adding/editing users: 
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html
Obviously, adapt the CTP form to your TAL needs.

Hope that helps...
-joe t.


On Monday, 22 December 2014 20:42:33 UTC-5, tech_me wrote:
>
> By the way, I have a table `users` in my db, which have 2 records.
> id,   email,  password
> 1001, abc@com, 123
> 1002, abc@org, 456
>
> When I input email and password on the login form, it fails at `if 
> ($this->Auth->login())`
>
>
> On Tuesday, December 23, 2014 10:39:39 AM UTC+9, tech_me wrote:
>>
>> In my view file(html)
>> 
>> > placeholder="your 
>> email" />
>> > placeholder="password" />
>> 
>> 
>>
>> In my AppController.php
>> public $components = array('RequestHandler',
>> 'Auth' => array(
>> 'authenticate' => array(
>> 'Form' => array('userModel' => 'User',
>> 'fields' => array('username' => 
>> 'email',
>> 'password' => 'password'))),
>> 'loginAction' => array('controller' => 'users', 
>> 'action' => 'login'));
>>
>> public function beforeFilter() {
>> $this->Auth->allow('login', 'logout');
>> }
>>
>> In my UsersController.php
>> public function login() {
>> if ($this->request->is('post')) {
>>if ($this->Auth->login()) {
>> return $this->redirect($this->Auth->redirect());
>> } else {
>> echo ('failed'); // Always come here...
>> }
>> }
>> }
>>
>> public function logout() {
>> $this->Auth->logout();
>> $this->Session->destroy();
>> $this->redirect(array('action' => 'login'));
>> }
>>
>> Could you give some hints, please?
>> Thank you.
>>
>>
>> On Sunday, December 21, 2014 4:48:14 PM UTC+9, tech_me wrote:
>>>
>>> 1. Yes
>>> 2. Yes
>>> 3. No any error but just failed(false) at that `if` statement.
>>> 4. Maybe there is no the same name field in my user table, which is 
>>> 'email' in html while 'nickname' in table schema
>>>
>>> I will have a try soon.
>>> Thank you.
>>>
>>>
>>> On Friday, December 19, 2014 4:55:03 AM UTC+9, John Andersen wrote:

 Please provide more information on the steps leading up to the error 
 that you get.
 1. Is the login form showing?
 2. Can you submit the form?
 3. Do you get the error back from your login method - wrong e-mail or 
 password?
 4. Something else?

 Suggest that you at least create the users table and add one user, so 
 that CakePHP has something to work with.

 Enjoy, John

 On Wednesday, 17 December 2014 14:14:43 UTC+2, tech_me wrote:
>
> I posted to SO several days ago, but no expected replies.
> http://stackoverflow.com/q/27403391
>
> I am now using PHPTAL  which use html instead of 
> ctp files.
> Is there anyone who use the html files to cooperate with Cake's 
> authentication?
>
> 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/d/optout.


Re: Use function in controller AND view

2014-12-23 Thread euromark
Yeah it says *outside*.
Inside the view layer you don't use CakeNumber, you use the helper Number:
$this->Number->...()

which, of course, internally wraps the CakeNumber functionality.


Am Dienstag, 23. Dezember 2014 13:05:12 UTC+1 schrieb LDSign:
>
> Just one question in addition. The cookbook says
>
> If you need NumberHelper 
> 
>  functionalities 
> outside of a View, use the CakeNumber class:
>
> Whats the point using "CakeNumber::" inside of views instead of 
> $this->Number? Is this just a style quqstion or has it any drawbacks?
>
> Thanks,
> Frank
>
> Am Montag, 22. Dezember 2014 16:06:23 UTC+1 schrieb LDSign:
>>
>> Hi
>>
>> Ive a function which converts a number to currency value (e.g. 10 -> 
>> 10,00 EUR).
>>
>> So far I have a custom "TextHelper" with that method within (becuase its 
>> view related).
>>
>> The problem is, now I need this (exactly same) method in a controller 
>> (for generating a flash message). Of course I could place this as a simple 
>> function in bootstrap.php (and use it in both, controller and view), but as 
>> far as I remember this is bad practice. Bad practice too is to clone this 
>> functionality in a component for DRY reasons.
>>
>> So whats the best practice for such a case?
>>
>> 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/d/optout.


Re: Use function in controller AND view

2014-12-23 Thread LDSign
Just one question in addition. The cookbook says

If you need NumberHelper 

 functionalities 
outside of a View, use the CakeNumber class:

Whats the point using "CakeNumber::" inside of views instead of 
$this->Number? Is this just a style quqstion or has it any drawbacks?

Thanks,
Frank

Am Montag, 22. Dezember 2014 16:06:23 UTC+1 schrieb LDSign:
>
> Hi
>
> Ive a function which converts a number to currency value (e.g. 10 -> 10,00 
> EUR).
>
> So far I have a custom "TextHelper" with that method within (becuase its 
> view related).
>
> The problem is, now I need this (exactly same) method in a controller (for 
> generating a flash message). Of course I could place this as a simple 
> function in bootstrap.php (and use it in both, controller and view), but as 
> far as I remember this is bad practice. Bad practice too is to clone this 
> functionality in a component for DRY reasons.
>
> So whats the best practice for such a case?
>
> 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/d/optout.