Looking for an experienced CakePHP developer

2016-03-23 Thread majna
Hi, I'm looking for an experienced CakePHP 2.x developer, freelance, remote, long-term. Please LMK if you know somebody. Thanks! majna -- Sign up for our Newsletter for updates. http://cakephp.org/newsletter/signup We will soon be closing this Google Group. But don't worry, we have something

Re: 3.1-rc1 utf-8 special chars problem

2015-09-15 Thread majna
In HTML5 a browser will use HTTP header first, then BOM and finally HTML meta to set encoding. So check for missing in HTML head. Add HTTP header e.g. in httpd.conf or .htaccess: AddDefaultCharset utf-8 or save files in "utf-8 without BOM" encoding. On Monday, September 14, 2015 at 11:46:18 AM

Re: Warning (512): cake_model cache was unable to write

2014-09-30 Thread majna
unable write 'default_aptutori_a' to Apc cache I guess your app/Config/core.php needs to be updated for 2.5. APC as a default cache engine was removed two years ago, in 2.3 https://github.com/cakephp/cakephp/commit/2f7f5e13224537eaa4da6b825b1d106bebc35d05 On Tuesday, September 30, 2014

Re: CDN for CakePHP

2014-09-30 Thread majna
See https://github.com/cakephp/cakephp/issues/2149 On Monday, September 29, 2014 12:43:53 PM UTC+2, Kan Samy wrote: Thanks for your reply Cherankrish. I am using Cloudfront CDN and I have created the distribution and generated the cdn url. Now I dont know where(which file) to map the cdn url

Re: 3.x checking loggedin user in view/template

2014-09-17 Thread majna
Hash::get($user, $field); } Cheers, majna On Tuesday, 16 September 2014 10:12:17 UTC+1, majna wrote: You can set a view variable in AppControler: public function beforeRender() { $this-set('auth', $this-Auth-user()); } and use it in the view: if ($auth) { echo $auth['username

Re: 3.x checking loggedin user in view/template

2014-09-16 Thread majna
You can set a view variable in AppControler: public function beforeRender() { $this-set('auth', $this-Auth-user()); } and use it in the view: if ($auth) { echo $auth['username']; } On Monday, September 15, 2014 6:53:32 PM UTC+2, Dave Edwards wrote: In CakePHP 3.x what is the correct

Re: Use CakeResponse in Helper.

2014-06-11 Thread majna
Response object *is* available in Helper, just use $this-response-type('csv'); $this-response-download($this-filename); $this-response-send(); Am Mittwoch, 11. Juni 2014 00:49:58 UTC+2 schrieb gloop: Hello i try to write an helper to create and download a CSV. Now i have the problem to set

Re: Cake PHP displaying values from paginate() in view - basic question

2013-11-23 Thread majna
In CakePHP blog tutorial Post is referring to a model (database table posts) holding all blog posts (articles). So instad $u['Post']['username'] use $u['User']['username'] in your view file. Regarding paginate vs find('all'), see

Re: Cakephp CLI error

2013-11-21 Thread majna
c:\wamp\www\myappname\app\Consolephp cake.php bake all should work on windows On Wednesday, November 20, 2013 7:13:16 AM UTC+1, Victor Musvibe wrote: I am using cakephp 2.x and im trying Code Generation with Bake. When i try to cake bake all. Below are the errors i am getting in command line.

Re: New to Cake PHP.

2013-10-12 Thread majna
Enable pdo-mysql extension in php.ini and restart web server. http://www.php.net/manual/en/pdo.installation.php majna On Friday, October 11, 2013 10:26:37 AM UTC+2, Shikhar kumar wrote: Hello, I have installed cake php version 2.4.1 but I am stuck to install it.My PHP version is 5.3.18

Re: POST from external site

2013-05-06 Thread majna
Perhaps you are receiving GET request for IPN, not POST? On Sunday, May 5, 2013 2:20:14 PM UTC+2, leydis contreras wrote: I stil have the same issue :( El martes, 14 de junio de 2011 15:53:34 UTC+2, Ivan Rocha escribió: Hi, I'm trying to integrate a CakePHP website to PagSeguro

Re: POST from external site

2013-05-06 Thread majna
server access logs... 2013/5/6 leydis contreras inglcontreras0...@gmail.com No, already try with GET. What else could be??? 2013/5/6 majna majna...@gmail.com Perhaps you are receiving GET request for IPN, not POST? On Sunday, May 5, 2013 2:20:14 PM UTC+2, leydis contreras wrote: I stil

Re: Console command over HTTP? Cron call. Any clue?

2013-04-05 Thread majna
try with exec() http://www.php.net/manual/en/function.exec.php exec(php /full_path_to/domain.com/app/Console/cake.php NewsletterDaily, $output); print_r($output); On Thursday, April 4, 2013 4:42:17 PM UTC+2, Tomas Dobrotka wrote: Is is possible to call console command via HTTP? My

Re: Bug in CakeSession class

2013-03-14 Thread majna
The value of self::started() can be true later on, when session is actually started, right? https://github.com/cakephp/cakephp/blob/master/lib/Cake/Model/Datasource/CakeSession.php#L187 I don't think it's a bug. On Wednesday, March 13, 2013 1:26:19 AM UTC+1, Eduardo Barbosa Moreira wrote:

Re: How can I use CakePHP on Heroku without getting logged out everytime I do an update?

2013-03-04 Thread majna
Instead of Memcache you should use Memcached that supports Heroku SASL auth. i.e https://github.com/kamisama/CakePHP-Memcached-Engine - extend this engine, add auth option http://www.php.net/manual/en/memcached.setsaslauthdata.php here

Re: Send email when you edit a field in Cakephp

2013-03-03 Thread majna
Hi, Change this part: $_sendNewEmployeeEditMail = true; $current_status = $this-Employee-field('standing_id'); if($current_status==1) { $_sendNewEmployeeEditMail = false; } to something like this: if ($this-Employee-field('standing_id')) { try {

Re: Cake 2.1 admin layout is not working

2013-03-03 Thread majna
Hi, here's my suggestions, - change admin route to Router::connect(‘/admin’, array(‘controller’ = ‘users’, ‘action’ = ‘index’, ‘admin’ = true)); - replace your beforeRender() callback with: public function beforeRender() { if (isset($this-request-params['prefix'])

Re: Code coverage from command line?

2013-03-02 Thread majna
You can easily extend test shell like this https://gist.github.com/majna/5073435 cake apptest core Utility/Hash --coverage-text --colors On Saturday, March 2, 2013 4:47:34 PM UTC+1, Thiago Belem wrote: Hiho guys! I'm trying to get the code coverage statistics from the command line

Re: CakePHP 2.3.0: Bug in CacheEngine?

2013-03-01 Thread majna
You are using APC *and* File cache? https://github.com/cakephp/cakephp/blob/2.3.0/app/Config/bootstrap.php#L99 also note that APC memory is not shared between PHP CLI and Apache mod_php (it is shared when php-fpm is used). i.e. you cannot clear APC cache created by Apache from Cake console or

Re: a few questions about Cake Bake and latest version 2.30

2013-02-02 Thread majna
It's --admin, not -admin (see cake bake controller --help) 1. uncomment Configure::write('Routing.prefixes', array('admin')); in Config/core.php 2. cake bake controller Posts --public --admin 3. cake bake view Posts On Tuesday, January 29, 2013 5:05:17 PM UTC+1, OSGMAL wrote: Hi newbie here

Re: Parse XML string as PHP Array

2013-02-02 Thread majna
Try http://book.cakephp.org/2.0/en/development/rest.html#accepting-input-in-other-formats So, by following http://book.cakephp.org/2.0/en/development/rest.html#the-simple-setup //In app/Config/routes.php...Router::mapResources('seasons'); Router::parseExtensions(array('xml')); and

Re: Render Element with AJAX Request / Response

2012-10-19 Thread majna
Hi, Controller::render() returns CakeResponse object, so try 'html' = $this-render()-body() On Friday, October 19, 2012 2:56:44 AM UTC+2, advantage+ wrote: My original function to return a JSON array no longer works with v2.1.3 This worked in 1.3: loaded a form into a modal window

Re: Can I have a plugin inside another plugin?

2012-09-07 Thread majna
Hi, You can append another path for plugins, something like this: app/Config/bootstrap.php: CakePlugin::load(array('Logger' = array('bootstrap' = true))); app/Plugin/Logger/bootstrap.php: App::build('Plugin' = array(CakePlugin::path('Logger') . 'Plugin')); After that you can load Recaptcha

Re: cakephp error handaling problem

2012-09-05 Thread majna
Hi, Are you reading 1.3 manual and code on 2.x ? On Wednesday, September 5, 2012 5:21:12 PM UTC+2, nikunj kansara wrote: I am using cakephp, I working on Error Handling I have follow http://book.cakephp.org/1.3/en/view/1188/Error-Handling I have create AppError My code is

Re: In CakePHP 2.x Extending Views not working.. I think the documentation for 2.0 is wrong. How to work Extending Views concept ?

2012-08-28 Thread majna
Should be plural Users: $this-extend('/Users/add'); Cheers! On Monday, August 27, 2012 4:29:37 PM UTC+2, Steve Babs wrote: I have created . Views/Users/add.ctp --- h1?php echo $this-fetch('title'); ?/h1 ?php echo $this-fetch('content'); ? div

Re: How can I put my $id in $this-redirect

2012-08-24 Thread majna
You must unset 'admin' prefix to redirect to non-admin URL: $this-redirect(array('admin' = false, 'controller'='customers','action' = 'view',$id)); On Friday, August 24, 2012 9:18:47 PM UTC+2, Lucas Simon Rodrigues Magalhaes wrote: Uhuhuuulll Thnx dude!!! Em sexta-feira, 24 de

Re: Errors from cakephp command line testing tool

2012-08-16 Thread majna
Can you paste that test? On Wednesday, August 15, 2012 11:10:39 PM UTC+2, Aaron Smyth wrote: I have a couple of tests that are expecting a controller's accompanying view to be available (they're checking for specific strings/regex patterns in the view) and all my tests are passing in the

Re: Translation of month names in Form-Helper input fields

2012-08-15 Thread majna
Cake uses 'cake' i18n domain for translations in Form helper __d('cake', 'January') Use console to extract translations `cake i18n extract` or create cake.po and add needed translations manually On Tuesday, August 14, 2012 10:46:58 AM UTC+2, Alexander Schiebel wrote: I am currently

Re: cakePHP 2.0 read rss feed

2012-08-13 Thread majna
Try this, and read http://book.cakephp.org/2.0/en/core-utility-libraries/xml.html ?php App::uses('Xml', 'Utility'); class FeedsController extends AppController { var $feed_url = http://kurinchilamp.kurinchilion.com/feed;; var $rss_item = array(); function read() {

Re: send mails

2012-08-03 Thread majna
Email config for gmail public $default = array( 'from' = array('m...@gmail.com' = 'My name'), 'host' = 'ssl://smtp.gmail.com', 'port' = 465, 'username' = 'm...@gmail.com', 'password' = 'xx', 'transport' = 'Smtp', ); You have to enable

Re: Getting DB error on calling Model

2012-08-02 Thread majna
UTC+2, WhyNotSmile wrote: Hi manja, thanks for your help, but it's not inside a plugin, and changing the order didn't make any difference. On Wednesday, 1 August 2012 21:41:12 UTC+1, majna wrote: If it's not the plugin issue, then Conference model is associated with Confcommittee

Re: Database sessions garbage collection issue

2012-08-01 Thread majna
By default there is 1% chance for gc to be called by PHP. If you want to test if gc() is fired, increase *session.gc_probability *close to *divisor*: http://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability Then watch SQL log for that query. Anyway, expires should be

Re: Getting DB error on calling Model

2012-08-01 Thread majna
Model Confcommittee is not found, so Cake creates an instance of AppModel. You are using $uses property, so try to add in Model/Confcommittee.php: App::uses('Confcommittee ', 'Model'); class Confcommittee extends AppModel { ... Btw, you don't need to call exit() after redirect() in that

Re: Problem With console plugin

2012-08-01 Thread majna
Try cake bake model Miko.MyModelName You can always run cake bake model to see the list of available models (tables) On Wednesday, August 1, 2012 8:50:37 AM UTC+2, Hugues Mary wrote: Hi I'm get trouble to bake a plugin with cakephp 2.x , I'm searching days a solution and didn't

Re: Getting DB error on calling Model

2012-08-01 Thread majna
on copying it. On Wednesday, 1 August 2012 20:58:42 UTC+1, majna wrote: Model Confcommittee is not found, so Cake creates an instance of AppModel. You are using $uses property, so try to add in Model/Confcommittee.php: App::uses('Confcommittee ', 'Model'); class Confcommittee extends AppModel

Re: Getting DB error on calling Model

2012-08-01 Thread majna
If it's not the plugin issue, then Conference model is associated with Confcommittee with wrong 'class' name. You can test that if you change order in $uses: public $uses = array('Confcommittee', 'Conference'); On Wednesday, August 1, 2012 10:35:12 PM UTC+2, majna wrote: Is this code inside

Re: Database sessions garbage collection issue

2012-08-01 Thread majna
in between in the gc function. On Wednesday, August 1, 2012 9:32:38 PM UTC+2, majna wrote: By default there is 1% chance for gc to be called by PHP. If you want to test if gc() is fired, increase *session.gc_probability *close to *divisor*: http://www.php.net/manual/en

Re: Database sessions garbage collection issue

2012-08-01 Thread majna
If you need to run gc more often, you can create Session model and override deleteAll() to fix that $expires On Wednesday, August 1, 2012 11:21:23 PM UTC+2, majna wrote: Oh, It's in 1.3, but yeah, it's kind of a bug It should be time() + $expires as PHP passes gc_maxlifetime to callback so

Re: Why using HTML-link instead of manually writing an anchor text ?

2012-07-01 Thread majna
For URLs, you can use HtmlHelper::url() and for links a href=?=$this-Html-url('/'); ?Home/a HtmlHelper::link() benefit is decoding and converting special HTML entities - characters (when you link some code or URL) On Sunday, July 1, 2012 6:15:00 AM UTC+2, Chetan Patel wrote: Hello, 1) I

Re: need a sample database

2012-07-01 Thread majna
this one is simple and you have to generate it using cake console (http://book.cakephp.org/2.0/en/console-and-shells.html) https://github.com/majna/schema On Saturday, June 30, 2012 5:02:30 PM UTC+2, Mahmoud Adel Farid wrote: i want a sample database like sakila or northwind with cakephp

Re: Using 2.2.0-RC2 dynamic validation API from the Controller

2012-06-27 Thread majna
You can add validator form controller, added rules are not appended to Model::validate property. Try to debug : $this-Campaign-validator()-add('advertiser_id', 'notEmpty', array( 'rule' = 'notEmpty', 'required' = true, 'message' = 'Assigning an advertiser is required' ));

Re: How get Exception Handler to use plugin layout?

2012-06-22 Thread majna
You can use AppController or MyPluginAppController beforeRender() callback to check if controller name is 'CakeError' and set $this-layout = 'MyPlugin.error' or extend ExceptionRenderer

Re: Empty array on Model::save bypasses validation

2012-05-28 Thread majna
add 'required' =true http://book.cakephp.org/2.0/en/models/data-validation.html#required On Monday, May 28, 2012 7:23:35 PM UTC+2, John wrote: Same on 2.1.3 I can fix it by checking for an empty array on model or controller but I I guess this is not expected behavior, should I add a ticket

Re: Table 'cakehr.cake_errors' doesn't exists

2012-05-20 Thread majna
can you paste this code C:\wamp\www\test\app\View\Elements\menu.ctp(25) and cake version On Saturday, May 19, 2012 9:39:43 PM UTC+2, Florin Trifu wrote: Excuse me. I think I didn't understand what you wanted to say. You imply that the error is generated because the table test.cake_errors

Re: Table 'cakehr.cake_errors' doesn't exists

2012-05-20 Thread majna
Instead of: echo $this-Form-create(array('id'='search')); try: echo $this-Form-create(false, array('id'='search')); On Sunday, May 20, 2012 1:04:14 PM UTC+2, Florin Trifu wrote: Hi Majna The entire content of menu.ctp is this: div id=menu-wrapper div id=menu-section-left div

Re: Table 'cakehr.cake_errors' doesn't exists

2012-05-20 Thread majna
[mailto:cake-php@googlegroups.com] *On Behalf Of *majna *Sent:* Sunday, May 20, 2012 2:28 PM *To:* cake-php@googlegroups.com *Subject:* Re: Table 'cakehr.cake_errors' doesn't exists Instead of: echo $this-Form-create(array('id'='search')); try: echo $this-Form-create(false, array('id'='search

Re: retrieving-your-data.html: DboSource::fetchAll()

2012-05-04 Thread majna
That's prepared statements http://php.net/manual/en/pdo.prepare.php used for better performance (compiled query plan can be cached) On Thursday, May 3, 2012 5:37:22 PM UTC+2, johnericsutton wrote: At the end of http://book.cakephp.org/2.0/en/models/retrieving-your-data.html are some

Re: Hide previous next when no pagination

2012-04-27 Thread majna
even better: if ($this-Paginator-hasPage(2)) // show next prev On Thursday, April 26, 2012 8:32:27 PM UTC+2, Jeremy Burns wrote: You can also apply css styles to them, and use the right style to set display: none: echo $this-Paginator-first('', array('class' = 'arrow'), null,

Re: Send email on every exception or error?

2012-03-13 Thread majna
Error handler docs: * Using the built-in exception handling, you can log all the exceptions * that are dealt with by ErrorHandler by setting `Exception.log` to true in your core.php. * Enabling this will log every exception to CakeLog and the configured loggers. Try

Re: Help with testing different things

2012-03-11 Thread majna
To test flash message, check session: $this-assertEqual($this-TestController-Session-read('Message.flash.message'), __('Saved.')); On Sunday, March 11, 2012 10:13:10 PM UTC+1, andrewperk wrote: In case someone finds this post later, I found an easier way to test html tags rather than

Re: Links in the setFlash

2012-03-09 Thread majna
You can use Router like: $url = Router::url(array('controller'='users', 'action'='login')); $this-Session-setFlash(sprintf('Please a href=%slogin/a', $url)); On Friday, March 9, 2012 3:47:17 AM UTC+1, Thiago Silva wrote: Hello, I'm trying to insert links in the Session-setFlash method, but

Re: Override hashing passwords method when loggin in Cake 2.1

2012-03-08 Thread majna
see http://mark-story.com/posts/view/using-bcrypt-for-passwords-in-cakephp On Friday, March 9, 2012 3:29:23 AM UTC+1, Sergei wrote: Hello, just started to upgrade my app to Cake 2.1 and noticed that my hashPasswords() method from User model no longer overrides hashing during login

Re: CakePHP 2.x plugin configs

2012-03-05 Thread majna
You can use configuration files. Check this gist: https://gist.github.com/1978200 On Saturday, March 3, 2012 5:41:42 PM UTC+1, U-Zyn Chua wrote: Hello, I've been a long time user of CakePHP (since pre v1) but have only recently checked out CakePHP 2.x. I'm writing a plugin for CakePHP

Re: Socket Connection exception while attempting to use CakeEmail

2012-02-28 Thread majna
You have to install/configure mail server on windows. Or use SMTP like gmail: 'host' = 'ssl://smtp.gmail.com', 'port' = 465, 'username' = 'exam...@gmail.com', 'password' = 'xxx', 'transport' = 'Smtp', - make sure php_openssl is loaded in php.ini On Tuesday, February 28, 2012 3:25:35 AM

Re: Chat with CakePHP...

2012-02-23 Thread majna
http://sandbox2.pseudocoder.com/demo/chat -- 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

Re: error handling: how to handle missing secondary database gracefully

2012-02-08 Thread majna
Just an idea... Extend Mysql datasource: - override connect(): try { parent::connect(); } catch (Exception $e) { return false; } - override constructor - set 'autoConnect' flag to false Model::beforeFind(): $db =

Re: cakephp 2.1 beta : Class 'AppModel' not found

2012-02-06 Thread majna
http://book.cakephp.org/2.0/en/appendices/2-1-migration-guide.html -- 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

Re: CakePHP 2.0 - custom order plugin loading

2012-02-02 Thread majna
Plugins are loaded in order you call/define them. CakePlugin::loaded() just spit out *sorted *plugin list. -- 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

Re: SwiftMailer Component not working CakePHP 2.0.5

2012-01-16 Thread majna
require APP . ' Vendor' . DS . 'Swift' . DS . 'lib' . DS . 'swift_required.php'; What i wrong with that? -- 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

Re: Error Migrations

2012-01-12 Thread majna
add to app/Config/bootstrap.php phpinfo(1); then run in console: cake Look for 'Loaded Configuration File' and location of loaded php.ini (when running PHP as CLI). Check if PDO is loaded... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out

Re: Duplicate html output in views

2012-01-11 Thread majna
This line duplicates layout: echo $this-requestAction($url, array('bare'=false , 'layout'= '/templates/business/default.ctp', 'return')); Anyway, you should wrap views with layouts, this view/layout/requestAction logic looks messy. Can you write what are you trying to accomplish and paste

Re: Config\email.php isnt loaded

2012-01-10 Thread majna
line where email.php is included https://github.com/cakephp/cakephp/blob/master/lib/Cake/Network/Email/CakeEmail.php#L1021 -- 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

Re: Config\email.php isnt loaded

2012-01-09 Thread majna
could you paste more code? -- 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

Re: CakeEmail: getting error using example from Cake Book

2012-01-09 Thread majna
please paste Request controller. Try to call (form Request controller): debug($this-Request); and paste output (http://bin.cakephp.org) -- 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

Re: CakePHP 2.1-alpha just baked

2012-01-09 Thread majna
There's one more nice feature added -multi-model fieldList support(whitelist) https://github.com/cakephp/cakephp/commit/ba27c8c2016f47ab6d64c6dec6fb1d1491dd674f -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Re: Remove Pagination Controls if 1 page only

2012-01-09 Thread majna
if ($this-Paginator-hasPage(2)) { // display prev, next, numers... } -- 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

Re: Error using CakeEmail

2012-01-08 Thread majna
What is smtpOptions() method? You shoul read Cake docs on how to configure email server outside controller, in Config/email.php Anyway, add 'transport' = 'Smtp' By default, Cake uses PHP mail() to send emails. I think xampp on windows needs smtp server installed and configured to be able to do

Re: Error Handler (Email not exist)

2012-01-07 Thread majna
I'm not sure wat are you doing, maybe try { ..send email } catch (SocketException $e) { ...redirect or inspect error: debug($e-getMessage()); } -- Our newest site for the community: CakePHP Video

Re: Cakephp 2.0.4 is losing Session data

2012-01-06 Thread majna
Security.level is not used in 2.0 anymore... -- 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

Re: Cakephp 2.0.4 is losing Session data

2012-01-06 Thread majna
I don't think Cake sets 'session.referer_check'. It's empty by default, so check your phpinfo(); -- 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

Re: Loading of plugins in AppController::beforeFilter

2012-01-05 Thread majna
You can load plugins form db in bootstrap.php too: $pluginHooks = ClasRegistry::init('PluginHook')-find('all'); foreach ( $pluginHooks as $pluginHook ) ... and then Configure::write('plugins', $plugins) for your hooks to be available in views as Configure::read('plugins'); -- Our newest site

Re: CakePHP 2.0 Percent Complete

2012-01-05 Thread majna
you can use PHP output buffering and flush progress (if you can't use cosnole/queues): ob_implicit_flush(true); foreach(...) { echo 'script type=text/javascriptupdateMyProgress(' . $current . ',' . $total . ');/script'; // or jquery progress bar stuff flush(); } But it's a bit

Re: session.gc_maxlifetime

2012-01-04 Thread majna
No, Cake does not set gc_maxlifetime. btw, I've looked in few php frameworks and none of them change this setting, but none of them either sets other timeouts (Cake changes cookie_lifetime and has custom session timeout implementation) Welcome to PHP session nightmare :) -- Our newest site

Re: CakePHP 2: Importing Plugin/Config/custom_config.php

2012-01-03 Thread majna
app/Config/bootstrap.php: CakePlugin::load('MyPlugin', array('bootstrap'=true)); MyPlugin/Config/bootstrap.php: $custom = array( 'datasource' = 'Database/Mysql', 'encoding' = 'utf8', 'persistent' = false, 'host' = 'localhost', 'login' = 'root',

Re: session.gc_maxlifetime

2012-01-03 Thread majna
IMO Cake should set gc_maxlifetime to 'timeout' config (4 hours by default) for 'cake' and 'php' handlers. or use Configure::write('Session', array( 'defaults' = 'php', 'ini'=array('session..gc_maxlifetime'=240*60) )); But, some nix distros like debian, ubuntu etc. are

Re: session.gc_maxlifetime

2012-01-03 Thread majna
fixed typo: Configure::write('Session', array( 'defaults' = 'php', 'ini'=array('session.gc_maxlifetime'=240*60) )); -- 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

Re: DebugKit Toolbar - core processing (derived)

2011-12-31 Thread majna
Turn debug off, check if Cake caches files in app/tmp -- 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,

Re: NotificationBehavior

2011-12-05 Thread majna
Nice examples. You can use AuthComponent::user('id') instead of CakeSession::read( 'Auth.User.id') -- 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

Re: js/css compression helpers for cakephp 2.0

2011-12-01 Thread majna
There's a shell task for that I think. On Wednesday, November 30, 2011 10:30:28 PM UTC+1, euromark wrote: I only thing I am wondering about that plugin is, whether it supports assert compression by using the default $this-Html-css/script syntax Or if one would have to completely rewrite all

Re: Help - Multiple Apps, Shared Core, Dispatch Errors - CakePHP 2.0.3

2011-11-21 Thread majna
Or use 'prefix' = Inflector::slug(APP_DIR) -- 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

Re: Making a real mess of Auth Component

2011-11-13 Thread majna
When I initiate the login() it succeeds every time even though it should most definitely be failing. When you pass $user param, it's up to you to authenticate. https://github.com/cakephp/cakephp/blob/2.0/lib/Cake/Controller/Component/AuthComponent.php#L511 I'll suggest you to create

Re: Making a real mess of Auth Component

2011-11-13 Thread majna
This chapter is about creating custom Auth: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html?highlight=auth#creating-custom-authentication-objects -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: Making a real mess of Auth Component

2011-11-13 Thread majna
https://gist.github.com/1361982 -- 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

Re: CakePHP 2.0.2: HABTM relations: Edit form seems to add relations instead of replacing them

2011-11-06 Thread majna
http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasandbelongstomany-habtm *unique*: If true (default value) cake will first delete existing relationship records in the foreign keys table before inserting new ones, when updating a record. So existing associations

Re: CakePHP 2.0.2: HABTM relations: Edit form seems to add relations instead of replacing them

2011-11-06 Thread majna
I don't see Post or Tag model in this app. Check this line https://github.com/ilmattodel93/IMattiDel93-s-Site/blob/master/app/Model/EpisodeRelease.php#L39 or other habtm associations. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP

Re: How about using real HTML templates for Form input fields?

2011-11-04 Thread majna
@sams and @AD7six Yes, one element for each input. Performance is not issue here. Finally, you can cache those elements as any other View::element() calls. This is not only about applying Twitter Bootstrap. FormHelper is not flexible enough and extending large methods is not best solution.

Re: Problem with separate Model folder in 2.0.x

2011-11-03 Thread majna
lookz like - missing trailing slash ROOT.DS.'CommonModels' . DS - model is not found zo Cake creates instance of AppModel. There's no special function in this class therefore sql error. You can debug out model and check if object is instance of app model, like: debug($this-Post); from

Re: Problem with echo in the controllers with CakePHP 2.0.1 and 2.0.2 on NGINX

2011-11-03 Thread majna
maybe you missed to install php5-json PHP extension: check your phpinfo() apt install php5-json /etc/init.d/php5-fpm restart -- 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

Re: how can i protect my code from the duplicaters

2011-11-03 Thread majna
Protect as to encode your source code? Using http://www.ioncube.com/ or http://www.zend.com/en/products/guard/ -- 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

How about using real HTML templates for Form input fields?

2011-11-03 Thread majna
Instead of using array based options for FormHelper inputs like: label, before, after, div, format etc. maybe HTML templates would be more friendly and easier to customize. For each input type there will be one Cake element as template. Here is an example, a proof of concept on how it may look

Re: Best Practice (import, used, class registry)

2011-10-27 Thread majna
Shortest one :) $Model = ClassRegistry::init([Plugin].[Model]); or $posts = ClassRegistry::init('Blog.Post')-find('all'); -- 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

Re: using components inside custom authorize object (CakePHP 2)

2011-10-26 Thread majna
or $this-controller()-Components-Session-read() -- 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

Re: Can't get Plugin model to work / be noticed at all

2011-10-24 Thread majna
Maybe if you paste your AppController, models and controllers code related to Event model and associated models? You can remove irrelevant methods etc. http://bin.cakephp.org -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP

2.0 Redirect route not working

2011-10-22 Thread majna
Can someone please confirm that redirect route is working as described in 2.0 http://book.cakephp.org/2.0/en/development/routing.html?highlight=router#redirect-routing Some examples that should be working: Router::redirect('/new/*', 'http://google.com', array('status' = 302));

Re: 2.0 view folders naming convention

2011-10-22 Thread majna
I'm building on 2.0 for 10 months now and I like new folder convention. I don't wanna ever go back :) Only upgrade issue I had was SVN on Windows (case insensitive) but git-svn and upgrade shell is a way to go. -- Our newest site for the community: CakePHP Video Tutorials

Re: Cake Bake cannot connect to my database

2011-10-21 Thread majna
It's PDO error. Try to use 127.0.0.1 instead of localhost in database.php When you run PHP from CLI - command line, usually there's another php.ini file, so look for it. Or google eg. http://stackoverflow.com/questions/1435445/error-on-creating-connection-to-pdo-in-php -- Our newest site for

Re: 2.0 view folders naming convention

2011-10-21 Thread majna
If you look at PSR-0 and how classes are named (singular) FormHelper, MediaView, BakeTask then it make sense to pluralize Layouts, Elements, Scaffolds etc. View\Layouts\rss View\Layouts\Emails View\Layouts\Emails\html View\Emails\html could be CamelCased imo. -- Our newest site for the

Re: CakePHP 2.0 Component Calling Helper

2011-10-21 Thread majna
there is 2.0 branch https://github.com/CakeDC/comments/blob/2.0/Controller/Component/CommentsComponent.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

Re: Fatal error: Cannot redeclare class User in C:\xampp\htdocs\didded\app\Model\Use r.php on line 264

2011-10-21 Thread majna
Can you paste User model http://bin.cakephp.org/ -- 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

Re: 2.0 upgrade shell

2011-10-20 Thread majna
the last couple of hours trying to port a medium to large sized apphttp://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2117-improvements-for-20-upgrade-shell On 19 Okt., 13:32, majna majna...@gmail.com majna...@gmail.com wrote: When upgrading plugins for each plugin add plugin

  1   2   3   4   5   6   >