Re: 404 requests filling view cache

2015-10-28 Thread lowpass
@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

404 requests filling view cache

2015-10-27 Thread lowpass
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 t

Re: cakePHP beginner: first app; some questions

2013-09-05 Thread lowpass
Also, you'll need to put the 'present' column in a separate table. Otherwise, you'll be continually overwriting the one field. Instead, consider a table wherein each row points back to a specific User. This table would, at a minimum, have the date (use 'created' and it will be filled in automatical

Re: Help with Model associations and find

2013-09-05 Thread lowpass
If I understand correctly, you want the latest DataImport record, and all of its associated ClientData records, each of which should include Hospital and Province. If that's correct, you should be calling find() on the DataImport model, which you can do because they're chained due to the associatio

Re: Mongodb and mysql

2013-09-05 Thread lowpass
Yes. Create a config for each in database.php and use Model::useDbConfig() to switch datasources. On Wed, Sep 4, 2013 at 7:20 AM, raj kumar Pustela wrote: > Hi to all, >can we connect mongodb and mysql database simultaniously in > cakephp > if anyone known pls help me. > Th

Re: Link with inline CSS styles

2013-08-28 Thread lowpass
echo $this->Html->link( 'whatever', array( // ... ), array( 'style' => 'color: red; text-decoration: none;' // etc. ) ); On Tue, Aug 27, 2013 at 3:13 PM, Advantage+ wrote: > Is there a way to add inline CSS styles to a link? > > I tried to combine / add in the $this->Html-

Re: User Defined Dashboard?

2013-08-28 Thread lowpass
Your question is a bit vague. By "items" do you mean the output from several models? For example, I can imagine a page which listed a selection of films, books, and ... well, some other things. We could have a view template which checked to see which of those were included in the data and output ac

Re: Models Associations

2013-08-28 Thread lowpass
A controller may "use" more than one model. (Or none at all.) public $uses = array('Model1', 'Model2'); However, as you're new to Cake I recommend you don't do that. Once you're comfortable with Cake's conventions you'll understand better when to do that. Your UsersController would contain metho

Re: CakePHP and Twitter Bootstrap. Current state?

2013-08-28 Thread lowpass
I haven't looked at any of those plugins so I don't know what I'm missing. I just drop BS into my css and js dirs, load the files in my templates, and carry on. On Tue, Aug 27, 2013 at 3:21 AM, Elias Stassinos wrote: > Hi All! > > I have searched through this group and google and right now i hav

Re: Make zero or many relation

2013-08-26 Thread lowpass
"I need to build a zero or many relation." On Fri, Aug 23, 2013 at 1:46 PM, Vanja Dizdarević wrote: > On Friday, August 23, 2013 12:31:38 AM UTC+2, cricket wrote: > >> You should use a HABTM association in this case. >> > > Nope, the OP states zero or *one* department. Although a HABTM > relati

Re: install cakephp with on a sub-domain

2013-08-22 Thread lowpass
The first thing you should do when you get a 404 with Cake is to make sure debug is > 0. Cake throws a 404 on errors. Many, *many* people get tripped up and waste hours by this. You should create a separate file in sites-available for each virtual host. Just remember to run a2ensite for each one,

Re: MVC question in basic design of export csv file

2013-08-22 Thread lowpass
This should be handled by the controller and a helper because it's request-oriented. You should keep the model and view separated. I've seen a CsvHelper online somewhere. Probably at the Bakery. On Sat, Aug 17, 2013 at 3:29 PM, glk wrote: > Hello, I'm having some trouble understanding and/or im

Re: Saving geolocation data to session with timeout or better approach?

2013-08-22 Thread lowpass
Set the Session configuration options in core.php. You can set the timeout there. On the client side, check the cookie to see if the coordinates are there. If not, regenerate them. In fact, you could compare the coords from the cookie to the current location on each request. On Sat, Aug 17, 2013

Re: How can I install xdebug?

2013-08-22 Thread lowpass
Have you restarted Apache? I can't offer any other advice for Windows. On Sat, Aug 17, 2013 at 6:49 AM, Sanjay Rathod wrote: > Hi guys... > I want to install xdebug for profiling and debugging php application. But > something i miss so that phpinfo file not shows xdebug.some basic info > about m

Re: Make zero or many relation

2013-08-22 Thread lowpass
You should use a HABTM association in this case. On Fri, Aug 16, 2013 at 9:35 PM, Nalaka Gamage wrote: > Dear all, > I need to build a zero or many relation. (department has zero or many > employees, and employee belongs to zero or one department) > I tried to use cake bake, but generated CRUD

Re: Cakephp user privileges ACL

2013-08-22 Thread lowpass
It means that there are no entries in the aros table for that Post. If you have things configured correctly, that should be created at the time the Past is created. If the Post already exists before adding ACL then you must sync the aros table to the posts table. On Wed, Aug 14, 2013 at 2:52 AM,

Re: Localhost vs Remote

2013-08-11 Thread lowpass
Are the salts exactly the same for both versions? Are the hashed passwords in the DB the same? Is the remote site using the correct DB? On Sun, Aug 11, 2013 at 6:07 PM, Advantage+ wrote: > Tried, error log is empty also. > > ** ** > > *Dave * > > ** ** > > *From:* cake-php@googlegroups.

Re: Multilingual sites and 2 characters language code in URL

2013-08-11 Thread lowpass
The 2-letter codes work just fine. I don't know why the Cake devs chose to make the 3-letter codes the default. I think it's wrong-headed. But, again, the 2-letter works without any configuration required, so no biggie. On Tue, Aug 6, 2013 at 3:27 AM, wrote: > Hello, > > I'm creating a multilig

Re: Themed Views & Unicode

2013-07-23 Thread lowpass
using hash encoding for > such chars. > > ex: > $this->Session->setflash('ನೀವು ದಾಖಲಿಸಿದ ಹೊಸ ಪುಸ್ತಕವನ್ನು ಕಾಯ್ದಿರಿಸಲಾಗಿದೆ. ಪುಸ್ತಕಗಳ ಪಟ್ಟಿಗಾಗಿ ಇಲ್ಲಿ ಕ್ಲಿಕ್ ಮಾಡಿ.'); > > Even these end up being "?" > Regards, > Harish > > > Regards, &

Re: Sorting related records

2013-07-22 Thread lowpass
See the 'order' param for $hasMany: http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html On Fri, Jul 19, 2013 at 8:18 PM, Advantage+ wrote: > By default I assume for example Gallery hasMany Image. > > When I view the specific gallery (as admin, straight tables as

Re: Themed Views & Unicode

2013-07-22 Thread lowpass
What is the output of the following? file --mime your-theme-file On Mon, Jul 22, 2013 at 1:42 PM, Harish wrote: > I have developed an application using themes. The app has unicode > characters. It works fine in Cakephp 1.x. I have been trying to migrate it > to cakephp 2.x and I am facing cert

Re: Retrieving data from belongs to related model

2013-07-22 Thread lowpass
> > From UsersController how can i retrieve *Class.class_number* and * > Course.name*? > > User->find() return ClassMembership data only not the belongsto related > $this->User->ClassMembership->recursive = 2; //dont work If you're calling find() from the User model you need to set recursive on

Auth login failing

2013-07-15 Thread lowpass
I need some help in determining why my login is failing suddenly. It was working fine, then I began adding ACL. It still worked then suddenly no joy. Back-tracking hasn't uncovered where things went wrong and now I'm thoroughly confused. public function login() { debug($this->request->data); } gi

Re: how to add custome dyanmic fileds in cakephp?

2013-07-10 Thread lowpass
CREATE TABLE product_attributes ( `product_id` BINARY(36) NOT NULL, `field` VARCHAR(255) NOT NULL, `value` VARCHAR(255) DEFAULT NULL, UNIQUE (`product_id`, `field`), CONSTRAINT `FK_product_attributes_items` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB

Re: Parent/Child Association: confusion in creating records at the same time?

2013-07-09 Thread lowpass
The Model::create() method does not actually create a record. It's more like init() really. It's especially important when saving multiple records in a loop. Anyway, what you need to do is save the Group record first: $this->Request->Group->create(); $this->Request->Group->set($this->data); $this

Re: find() problem

2013-06-14 Thread lowpass
I have an idea but would rather see the code first. On Fri, Jun 14, 2013 at 2:45 PM, first last wrote: > No experience with PHP so sorry for my ignorance. > > A find() in a CakePHP 1.3 program is making a query with a MySQL syntax > error 1064. > The part of the query causing the error looks li

Re: Sending email using HTTP fx sendgrid

2013-06-14 Thread lowpass
I haven't tried the HTTP interface but I presume that using the HttpSocket class would be the way to go. http://book.cakephp.org/2.0/en/core-utility-libraries/httpsocket.html You can render the view into a variable. On Fri, Jun 14, 2013 at 7:10 AM, Henrik Gemal wrote: > Hi > > We use latest Ca

Re: CakeEmail: newlines disappearing in text mode

2013-06-14 Thread lowpass
Thanks muchly. Worked a charm. (I would have sworn I had tried that, though.) On Fri, Jun 14, 2013 at 5:44 AM, euromark wrote: > Those such a single newline in > So you need to add an extra one > > > > > > > etc > > > Am Freitag, 14. Juni 2013 02:45:07 UTC+2 schrieb cricket: > >> $email->em

Re: Switch "validation set" within model?

2013-06-13 Thread lowpass
I didn't notice anything specific to version 2 in that code. Have you tried it? Or tried to upgrade it? On Thu, Jun 13, 2013 at 2:55 AM, LDSign wrote: > Hi > > I would liket to switch a complete "validation set" for a model (in the > controller). Deeper levels of the application requires more a

CakeEmail: newlines disappearing in text mode

2013-06-13 Thread lowpass
$email->emailFormat('text'); view: email: foo bar baz What's up with that? -- 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 unsubscri

Re: Cannot access empty property in View.php on line 854

2013-06-13 Thread lowpass
$this->Form (uppercase F) On Wed, Jun 12, 2013 at 11:19 PM, alfredo davila < davilaassadalfr...@gmail.com> wrote: > ok, this is my View call add.ctp > > Create an Account > echo $this->$form->create('User', array('action' => 'add')); > echo $this->$form->input('username'); > echo $this->$fo

Re: why (and where) is my data disappearing?

2013-06-11 Thread lowpass
e->save($this->data); } return true; } Also, I forgot that I'd just upgraded to 2.3.6 (And you all should too if you haven't!) On Tue, Jun 11, 2013 at 9:30 PM, lowpass wrote: > using 2.3.5 > > I have an 'uploads' table, with columns 'model' and '

Re: Cannot access empty property in View.php on line 854

2013-06-11 Thread lowpass
Not without: - your Cake version - some context - some code On Mon, Jun 10, 2013 at 7:20 PM, alfredo davila < davilaassadalfr...@gmail.com> wrote: > I can´t stop dealing with this problem in my cakephp :S I think it´s > problem of the Model or the View. > Can anyone help me? :S > > -- > Like U

Re: How to call a postgresql stored procedure with cakephp

2013-06-11 Thread lowpass
$data = $this->query($raw_sql_string); debug($data); // it won't have the usual Cake structure On Sat, Jun 8, 2013 at 2:37 AM, victor carcamo wrote: > Hi, i'm suing cakePhp i need to call l a postgresql stored procedure with > cakephp, somebody ? > > -- > Like Us on FaceBook https://www.faceboo

why (and where) is my data disappearing?

2013-06-11 Thread lowpass
using 2.3.5 I have an 'uploads' table, with columns 'model' and 'foreign_key'. The Upload model uses the behavior in Nick Baker's FileUpload plugin. This isn't the first time I've used it, and in fact I've used the model/foreign_key approach for quite a lot of other things with Cake. But for some

Re: Models indirect association, how to retrieve data?

2013-06-10 Thread lowpass
In your model (or AppModel to make it global): public $actsAs = array( 'Containable' ); public function getClass($id) { return $this->find( 'first', array( 'conditions' => array( $this->alias.'.'.$this->primaryKey => $id ), 'contain' => array( 'University' => array( // must have direct associat

Re: Cakephp 1.3 Edit Action Not Populating Fields

2013-06-10 Thread lowpass
Your form is submitting to the add action. On Fri, Jun 7, 2013 at 12:45 PM, Karl Smith wrote: > I'm having a problem with my edit action and Im not sure what my problem > is but my fields are not populating. In my model I have a function that > retrieves 3 records based on an id, and I call tha

Re: Routes and multilanguage site

2013-06-01 Thread lowpass
Another tip. bootstrap: Configure::write('Config.languages', array('eng','ned', 'deu')); routes: $lang_regexp = implode('|', Configure::read('Config.languages')); Now you can use the following without having to repeat your list of langs: 'language' => $lang_regexp, On Thu, May 30, 2013 at 4

Re: Contain with an associated plugin

2013-06-01 Thread lowpass
Do not prefix the model alias with plugin name in your find() call. All that is for is creating the alias in the query, and then setting up the data array. Including the plugin name in the association as you have it is correct. The bare 'User' alias can then be used in your finds. I presume the co

Re: File load from server javascript cakephp2

2013-06-01 Thread lowpass
WWW_ROOT is meaningless to javascript. Also, you did not provide your file_exists function. Or are you trying to call the php function of the same name? That won't work. Those paths are all over the place. Of the different paths you tried, the one beginning with '/files' looks the most promising. I

Re: connect to remote server (my sql apache)

2013-06-01 Thread lowpass
You provide the remote IP address and port # in the config. However, the remote db must be configured to allow for network connections. Check the remote DB config for the skip-networking and bind-address options. Then also the DB user for the remote application must have permission to connect. Che

Re: Is there a way to get a 'has many' relationship left joined without forcing the join such that I can get a count of the child table?

2013-06-01 Thread lowpass
ContainableBehavior doesn't work like that, unfortunately. It's a really good addition to the toolbox, though at the cost of the extra queries. (I use it a lot, but only where I can cache the results.) What you should be doing is either adding the 'joins' option, or using counterCache. If all you w

Re: CakePHP 2.x Moving Find into Model

2013-05-23 Thread lowpass
Apply the array to the $paginate class var, not the method. Basically, you can declare the $paginate array as a class var, then add to or override any part of it from within an action. On Thu, May 23, 2013 at 7:12 PM, Larry Lutz wrote: > I'm trying to achieve the fat model/skinny controller man

Re: Tree Based Permissions

2013-05-22 Thread lowpass
Record-level ACL. I did that for a Cake site and it worked quite well. In that case also I only needed to set permissions by Group, so it was a little bit simpler than if it was per user. The client who hired me to do it is long out of the picture, so it's languished in the 1.2.x codebase. (The si

Re: Bug in edit user

2013-05-20 Thread lowpass
> $this->request->data['User']['id'] = $this->Auth->user('id'); You are assigning the administrator's id to the record. Unless your administrator is trying to edit its own record, this is not what you want. On Fri, May 17, 2013 at 2:23 PM, Guilherme Magno wrote: > Hello people, > I'm having a b

Re: AppController Troubleshooting

2013-05-20 Thread lowpass
Do you call beforeFilter in this controller? If so, does it in turn call parent::beforefilter()? Does the controller have its own constructor? Can you post the code? On Thu, May 16, 2013 at 3:33 PM, Larry Lutz wrote: > I'm hoping that someone can give me some troubleshooting ideas. I have a >

Re: select all HABTM records not in join table

2013-05-02 Thread lowpass
tem_id = Item.id' ) ) ) )); return $this->find( 'all', array( 'conditions' => array( 'CategoriesItem.category_id IS NULL' ) ) ); } On Thu, May 2, 2013 at 6:44 PM, lowpass wrote: > Cake 2.x > Item <- habtm -> Category > > I'm trying t

select all HABTM records not in join table

2013-05-02 Thread lowpass
Cake 2.x Item <- habtm -> Category I'm trying to select all uncategorised Items. There are only 723 records in the items table, 188 of which are uncategorised. I know this last fact because I can run the following query in mysql client: SELECT * FROM items LEFT JOIN categories_items AS ci ON ci.i

Re: Confused about routing

2013-04-17 Thread lowpass
Router::connect( '/products/:category', array( 'controller' => 'categories', 'action' => 'index' ), array( 'category' => '[-a-z]+', 'pass' => array('category') ) ); Router::connect( '/products/:category/:product', array( 'controller' => 'products', 'action' => 'view' ), array( 'category' => '[-a-z

Re: Records search using CakeDC/search

2013-04-15 Thread lowpass
What does the resulting query look like? Does it include the condition with the submitted name? On Mon, Apr 15, 2013 at 1:44 AM, Muhammad Asyraf wrote: > Actually i already Google several search plugin for CakePHP but most of > CakePHP user recommended search plugin from CakeDC. So, i download t

Re: Records search using CakeDC/search

2013-04-15 Thread lowpass
You can get rid of that notice by declaring the $paginate array as a class var: public $paginate = array(); public $components = ... On Mon, Apr 15, 2013 at 8:22 AM, Muhammad Asyraf wrote: > I've made the amendment to the code but still the result are same. no > search result produced and i not

Re: CakePhp Issue with reading Cookie

2013-04-09 Thread lowpass
In some places you have 'lang' and in others it's 'langg'. On Tue, Apr 9, 2013 at 12:37 AM, Manjunath Reddy wrote: > > > Hi All, > I have trouble reading the cookie I have already registered. >

Re: CakePHP 2.3.2 released DEFINE CSS/JS/IMG Folders

2013-04-09 Thread lowpass
Did you update webroot/index.php? On Tue, Apr 9, 2013 at 12:56 AM, Advantage+ wrote: > "JS, CSS, IMAGES constants are now conditionally defined by CakePHP making > it possible to override them in your application." > > ** ** > > I have updated the Cake Lib to 2.3.2 and in my bootstrap added

Re: cake bake User - Error: Table facebooks for model Facebook was not found in datasource default.

2013-04-09 Thread lowpass
It looks like this is pretty specific to your application. Do you have a Facebook model? Is there a table for it in the db? On Mon, Apr 8, 2013 at 9:11 PM, Nathan Pierce wrote: > RootSHH [~/public_html]# cake bake User > > Welcome to CakePHP v2.3.2 Console > -

Re: CakePHP with jQuery UI Sortable

2013-04-09 Thread lowpass
jQuery 1.9 has been refactored a great deal. Perhaps the UI version you have has been tailored specifically to that version. http://jquery.com/upgrade-guide/1.9/ On Sat, Apr 6, 2013 at 7:14 AM, Lucky1968 wrote: > Hi, > > > I'm using jQuery UI Sortable in a CakePHP application to drag and drop

Re: ajax content within ajax page call

2013-04-04 Thread lowpass
This is a javascript question; nothing to do with cake. On Thu, Apr 4, 2013 at 12:56 AM, Chris wrote: > hi guys,... can anyone help please,... > > I have a photo page with lots of ajax function, features in it,... e.g. > Likes, Dislikes, Make Favorite,... and Post a Comment,... I'm calling this

Re: Session in Behavior

2013-04-04 Thread lowpass
Just include the id in the $data array. On Wed, Apr 3, 2013 at 7:55 PM, rockbust wrote: > Hi > I am using cake 1.3 and Bauth component to write logged in user id to > session. > > The problem: > I am trying to upload images to a path based on the user id. > I am using Jose Diaz-Gonzalez's uploa

Re: having problem using extension(jpg)

2013-04-04 Thread lowpass
Would this URL point to an image or a controller? If image, you have two choices -- put it at: app/webroot/787198410/still_talking_dark.jpg or, if you prefer to send the image out through a controller, create a route: Router::connect( '/product/:id/:img', array( 'controller' => 'products', 'acti

Re: Registration Question - Two Different Users (Not using User table)

2013-04-04 Thread lowpass
On Sat, Mar 30, 2013 at 6:14 PM, Nathan Pierce wrote: > If I post the form, I get sent to /users/login. > You need to tell Auth that this action doesn't require login. Create a beforeFilter in StudentsController: function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('register');

Re: Login function doesn't work on client server

2013-04-03 Thread lowpass
Server error? Check your logs. (both Cake's and the webserver's) On Mon, Apr 1, 2013 at 10:55 AM, Fernando Queiroz wrote: > Yesterday I finally finished my first project. > > But when I test the admin login page I noticed that was no working, I put > login and password correct and just back to t

Re: Problem with nested AND / OR Condition

2013-04-03 Thread lowpass
It's been awhile since I had to do any complicated AND/OR stuff but I think this would work: $options = array( 'conditions' => array( 'OR' => array( 'id' => 1, array( 'AND' => array( 'column1' => 'test1', 'id' => 2 ) ), array( 'AND' => array( 'column1' => 'test2', 'id' => 3 ) ) ) ) ); I think thi

Re: password protect entire site

2013-04-03 Thread lowpass
The problem is with your invalid Apache rules. This has nothing at all to do with Cake. What you are attempting to do is block access *before* Cake is passed the request from Apache. On Mon, Apr 1, 2013 at 4:38 PM, cyboman wrote: > Thanks for all the replies. I still don't see a working htacces

Re: New to CakePHP

2013-03-29 Thread lowpass
>From the name of the controller file it appears that you're dealing with a 1.x install. Keep that in mind going forward, as there have been some changes to the API. If in doubt about any advice you receive, make a point of asking whether it's meant for a 1.x or 2.x version. First thing to do is o

Re: include file in cakephp

2013-03-29 Thread lowpass
It's all just PHP, so include '...' will work. However, you'd likely be best off creating a helper. More that that I can't say as your question is pretty vague. On Tue, Mar 26, 2013 at 7:14 AM, Oleksandr Torma wrote: > I want to include file from users - index.ctp to my plugin ... How can I > do

Re: Tree Help

2013-03-27 Thread lowpass
If all you want are single-cell rows you could simply use generateTreeList() as described here: http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::generateTreeList Then just do: foreach($data as $d) { echo '', $['Category']['name'], ''; } On Wed, Mar 27, 2013 at

Re: Model Structure Question

2013-03-25 Thread lowpass
I recommend you look at inheritance. Have everyone log in through the User model -- the table can be as simple as username, password, email (for resetting passwords). Keep everything else in either Buyer or Seller. You could even have a generic Profile, and then BuyerProfile & SellerProfile models

Re: Building a tree menu with nested lists containing links

2013-03-25 Thread lowpass
Have a look here: https://groups.google.com/forum/?fromgroups=#!topic/cake-php/ilQmFGLUZjc It's older, so may need some polish for 2.x. On Mon, Mar 25, 2013 at 9:13 AM, Carsten Kozianka wrote: > I am using the tree behavior to create a side-wide category structure that > should be displayed as

Re: Using the latest version of CakePHP console

2013-03-25 Thread lowpass
On Mon, Mar 25, 2013 at 12:56 PM, Daniela Zurita wrote: > Hi all, > I'm a newbie to cakephp. I've installed my LAMP server on Ubuntu 12.04. > Also, created my application in this directory /var/www/myapp. I'm using > Netbeans IDE 7.3 and cakePHP 2.3.1. This is what i do when attempting to > bake m

Re: HABTM Inner Join with 3 models

2013-03-18 Thread lowpass
On Mon, Mar 18, 2013 at 12:40 PM, Jerome Walitzek wrote: > Hi there, > > i have a problem with INNER JOIN. > > Models > Job > User > UsersEvent What are the associations between models? Do you also have an Event model? I ask because that last one looks like a join model between User & Event. (Alt

Re: CakePHP tutorials error, is this right?

2013-03-18 Thread lowpass
There's no need to allow people to hit your logout action if they're not authenticated as the sole purpose of it is to remove their authenticated status. That is, only authenticated users should ever be visiting that URL. On Mon, Mar 18, 2013 at 8:36 AM, Nicholas Mitchell wrote: > Hey people, > >

Re: Why isn't $this->Auth->user() passing all of the variables?

2013-03-18 Thread lowpass
Had you changed the table schema at some point? Try deleting the files in app/tmp/cache/models if this is still happening. On Thu, Mar 14, 2013 at 7:10 PM, Charley Bodkin wrote: > Some additional info: If a user logins in then logs out, the information is > indeed pulled from the database. Just n

Re: password protect entire site

2013-03-18 Thread lowpass
On Sun, Mar 17, 2013 at 6:29 PM, Eduardo Moreira wrote: > Why dont you use the cake Auth component? Using Apache's authentication while it's being worked on means that nobody sees _any_ part of the site. And Cake's authentication may not be configured properly. -- Like Us on FaceBook https://ww

Re: Model should be fat or thin?

2013-03-18 Thread lowpass
On Sun, Mar 17, 2013 at 1:29 PM, AD7six wrote: > > This does not apply to the blog tutorial in that there _is_ no model code in > use except basic CRUD functionality. That's a good point, although when the models become more complex I prefer to call a method in the model rather than specify a lot

Re: Best Practise: Use Utilmethods in Controllers, Views, Components...

2013-03-17 Thread lowpass
I used to put this sort of thing in bootstrap.php but lately I've been putting a file in the app/Lib directory and including it at the end of bootstrap. On Fri, Mar 15, 2013 at 11:44 AM, kaiszy wrote: > Hi! > > I have several Utility Routines that i wan't to use in all Objects (Models, > Controll

Re: Cake 2.1 admin layout is not working

2013-03-17 Thread lowpass
On Fri, Mar 1, 2013 at 2:52 PM, di wrote: > > public function beforeFilter() { > $this->Auth->allow(‘*’); In 2.x it should be $this->Auth->allow(); It's not clear to me whether you're using 1.3.x or 2.x. Try: if (!isset($this->request->params['requested']) && isset($this->request->params['admi

Re: More than one virtualField

2013-03-17 Thread lowpass
On Fri, Mar 15, 2013 at 6:27 AM, Jerome Walitzek wrote: > Hi there, > > i have more than 12 Models. But for me are only 2 Models important. "User" > and "Event" > in the User Model i have set 2 virtualFields > > public $virtualFields = array( >'full_name' => 'CONCAT(User.vorname, " ", User.nac

Re: password protect entire site

2013-03-17 Thread lowpass
For 2.x it should be: RewriteRule ^(.*)$ index.php [QSA,L] On Fri, Mar 15, 2013 at 2:55 AM, Salim Kabeer wrote: > here is right code for .htaccess > > > RewriteEngine On > > RewriteCond %{REQUEST_FILENAME} !-d > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-l > > Rewrit

Re: Model should be fat or thin?

2013-03-17 Thread lowpass
On Thu, Mar 14, 2013 at 5:23 PM, Thrallthink wrote: > Hi, > > I am new to cakephp, and have lot of doubts :) > > In CAKEPHP tutorial , It is clearly stated that controller should be THIN > (as less code as possible). > > But the blog example given in tutorial, piles up more code in CONTROLLER. Y?

Re: How to campare two arrays whether they have the same elements-cakephp 1.3

2013-03-14 Thread lowpass
You could extract the IDs of the already-chosen courses and use those to exclude from the other results. // get registered courses $registered_data = $this->YourModel->find(...); $keys = Set::extract( '{n}.Listing.id', $registered_data ); // get available courses $available_data

Re: reset form after submission

2013-03-14 Thread lowpass
I'm not quite sure what you're doing but it looks like you should be doing this: 'complete' => 'javascript:resetReportPhotoCommentForm(' . $photo_comment['PhotoComment']['id'] . ');' function resetReportPhotoCommentForm($id) { document.getElementById("ReportComments_" + $i

Re: password protect entire site

2013-03-14 Thread lowpass
On Wed, Mar 13, 2013 at 6:14 PM, cyboman wrote: > Hello all, > > I've been trying to find a way to easily password protect the entire site. > This will allow me to troubleshoot the site while unauthenticated users > cannot have access. > > I've tried editing the htaccess file in the webroot, but w

Re: Security Question

2013-03-14 Thread lowpass
On Wed, Mar 13, 2013 at 10:19 PM, Advantage+ wrote: > When I logout of my site it redirects me to /login. > > If I then hit login (nothing entered in user / pass) I get black-holed. > > The requested address '/login' was not found on this server. > > > > Why is that? It should just show the errors

Re: Routing blues: routing / subcategory challenge

2013-03-14 Thread lowpass
On Wed, Mar 13, 2013 at 2:41 PM, cyboman wrote: > Hello fellow bakers, > > I've been trying to figure out a route challenge. > > I have the following routes which work fine: > > Router::connect('/category/*', array('controller' => 'categories', 'action' > => 'index', 'category')); > Router::connec

Re: Update from Cakephp 2.3.0 to 2.3.1

2013-03-14 Thread lowpass
On Wed, Mar 13, 2013 at 11:51 AM, kaiszy wrote: > Hi again ;) > > Sorry for my fuzzy mail ;) > > For example i modify > >cakeroot/app/Controller/AppController.php >cakeroot/app/View/Layouts/defaults.ctp >a.s.o. > > These files are (ofcourse ;) also in then distribution archiv. Do you

Re: Bug in CakeSession class

2013-03-14 Thread lowpass
On Thu, Mar 14, 2013 at 6:07 AM, majna wrote: > 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. Oh, gosh ... [face palm] -

Re: Problem with SQL Server

2013-03-14 Thread lowpass
What does the code look like where you call save? Also, what do you get with $this->log($your_array) in the error log? Is Cake running on the same machine as the DB? On Thu, Mar 14, 2013 at 7:41 AM, rogerbenevento wrote: > Good morning, > > I am passing an array to save(), the N´s are of Cake.

Re: override __()

2013-03-13 Thread lowpass
Neato. I hadn't seen those spanking new function_exists wrappers. On Wed, Mar 13, 2013 at 7:17 PM, AD7six wrote: > > > On Thursday, 14 March 2013 00:03:13 UTC+1, cricket wrote: >> >> No, because it's not a class method. You could create your own >> function in bootstrap.php which then calls __().

Re: Bug in CakeSession class

2013-03-13 Thread lowpass
On Tue, Mar 12, 2013 at 8:26 PM, Eduardo Barbosa Moreira wrote: > There is an inconsistent logic in method start() in CakeSession class > (lib/Model/DataSource/CakeSession.php): > > at line 192 > > if (!$id && self::started()) > > the value of self::started() is never "true" because it was tested

Re: SecurityComponent + very large form = BlackHole

2013-03-13 Thread lowpass
I'm really curious to know what you're doing. Are these being set by the user? Javascript? On Wed, Mar 13, 2013 at 6:50 AM, Ernesto wrote: > i solved by increasing the > > max_inputs_vars > > value in php.ini > > Il giorno mercoledì 13 marzo 2013 09:53:29 UTC+1, Ernesto ha scritto: >> >> hi romel

Re: hasMany with group by

2013-03-13 Thread lowpass
On Tue, Mar 12, 2013 at 3:33 PM, André Luis wrote: > Hi people, I have model User and model Image, and the model User hasMany > Image, so when i use $this->User->find('all'), it comes with the respective > related images, but in the table of model Image, I also have the field > "category", wich is

Re: override __()

2013-03-13 Thread lowpass
No, because it's not a class method. You could create your own function in bootstrap.php which then calls __(). What are you trying to do? On Wed, Mar 13, 2013 at 4:15 AM, onur wrote: > is there any way to override __() in basics php ? > > > -- > Like Us on FaceBook https://www.facebook.com/CakeP

Re: Cakephp white scren when index action called

2013-03-13 Thread lowpass
Do you mean that you have no access to the httpd log, or that nothing appears there? Have you tried debug level 2? Perhaps 3 is using too much memory. I presume, though, that the white screen was happening before you tried to debug, so it's probably not an issue. Do you know what the server's PHP

Re: Problem with SQL Server

2013-03-13 Thread lowpass
> VALUES (N'Marcelo', You have a stray single quote( ' ). Actually, you have several: All your strings have N before them. Where do the Ns come from? Are you passing an array to save() or are you using $this->query to save the data? On Tue, Mar 12, 2013 at 10:57 AM, rogerbenevento wrote: > Good

Re: Paginate with drag / drop

2013-03-11 Thread lowpass
On Mon, Mar 11, 2013 at 6:54 PM, Advantage+ wrote: > I have a site where the paginated results need to have the ability to sort / > re-order as the admin likes. Problem is how do you get something from page 2 > back to page 1 since you can't drag / drop it in a list that you cannot see. > > > > I

Re: Need a help for cakephp controller,

2013-03-11 Thread lowpass
That's quite a vague request. Have you read the documentation? On Mon, Mar 11, 2013 at 12:55 PM, Ganapathi Raman wrote: > hi all > >i am a new to the cake php...can anyone help me for how to learn > controller method's.please please, > > -- > Like Us on FaceBook ht

Re: Auth Component; Strange behavior

2013-03-11 Thread lowpass
Define "Auth Component does not work". If Auth is allowing access then what else do you need? Could this be a routing issue? Are you using admin prefixes? (It's been a long day so I may well be missing something obvious here.) On Mon, Mar 11, 2013 at 5:15 AM, Ed Propsner wrote: > Using Cake 2.2.

Re: component and helper to access model, good practice?

2013-03-11 Thread lowpass
The built-in ACL functionality would be the best approach. See here: http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1 That tutorial is for an older version of Cake but the differences are moderate. And see this one for some ideas for being able to check access from withi

Re: ajax call content in dialog box without remoteFunction

2013-03-09 Thread lowpass
You're getting a new window because your link's click event has window.open() attached to it. What does this have to do with CakePHP, anyway? On Sat, Mar 9, 2013 at 4:33 PM, Chris wrote: > hi there,… can you help me please,… > I’m trying to load dialog page, but instead I’m getting new window po

Re: how to get the array value in view

2013-03-09 Thread lowpass
On Sat, Mar 9, 2013 at 2:40 AM, Joseph zhu wrote: > > In the view,I use > > > > but I can't get the value for field Curriculum.title > how to get the value for filed Curriculum.title. Sorry, I thought you meant that you wanted to extract just those values. To print them from a loop, you need

Re: missing controller exception

2013-03-09 Thread lowpass
On Fri, Mar 8, 2013 at 11:06 PM, Devario Johnson wrote: > Thanks for the suggestion. I've never done anything in the Controller > (since it's higher than the app controller), but I'll see if there is > something rogue afoot. keep in mind everything works fine with no errors > or warnings being r

  1   2   3   4   5   6   7   >