I'm building a site with CakePHP which I would like to have 3 sections:
public area
user area
admin area
I've setup prefix routing in routes.php which looks like
Router::connect('/user/:controller/:action/*', array('prefix' => 'user', 'user' => true));
Router::connect('/admin/:controller/:action/*', array('prefix' => 'admin', 'admin...
Hey all,
So i'm working with CakePHP v1.2.5. On my current project, I decided to start writing tests as I code the functionality (yay TDD). I'm having trouble with fixture loading though.
To aid in the process, I'll describe my code (Really quite simple right now). My model is defined like so
// app/models/newsitem.php
<?php
class New...
Hello,
I have LAN n/w with net connection. I wish to send mail from php code to gmail or others.
While i was using phpmailer it shows following error based on changing port no 465 to 25 /to 587 vice versa.
could not connnect ****
and also shows error for changing host from ssl://smtp.gmail.com to smtp.gmail.com
couldnot authentica...
How can I get a different css class for each table header?
...
I am upgrading a cakephp app at my new job from l.1 to 1.2. I am replacing the homegrown 1.1 authorization code with the great Auth component. The problem is that the passwords are not hashed in the legacy DB. How can I turn off the password hashing temporarily so I can start using the Auth component.
Don't worry, I will hash the passwo...
Hey I have coded CakePHP for a number of things but never ran into this problem before surprisingly. Also I have thoroughly searched the net and CakePHP docs and have not found an answer to my question. My question is, I have a table for my model that should be named Class, obviously I cannot use that name though since it's a reserved PH...
I want to execute a mysql query right after connecting to the database to enable utf-8
SET NAMES 'utf-8' COLLATE 'utf8_unicode_ci'
and i want an answer either for a specific model all for the whole application
...
I'm using a self referencing HABTM model with Participants. You sign up for an event and when you log in to your reservation/profile you see a list of other participants and you can choose to add yourself and others into various groups; share hotel room, share transportation from airport etc.
What I've managed so far:
1) In my profile...
Hello,
I was trying several authentication samples for cakephp 1.2 but didn't find any flawless piece of code. Can you suggest me some code?
Thank you
...
So I'm having trouble with unit testing CakePHP models. Simple stuff like writing tests that my validation rules are catching errors etc.
To begin with, I have a model called NewsItem. Its defined in my MySQL database using the following schema
CREATE TABLE news_items (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR...
Hi,
im Using CakePHPs standard Auth mechanism, but I have some problems with that.
Everytime a user logges in the password got hashed twice.
I have the Auth Component in the var $componets Array in the app_controller.php
and one in the var $components Array from my users_controller where the login action is
defined. I have defined a ...
Greetings!
I recently started working for a company that carries a line of 20,000 Surgical Instruments. Our data on all items is currently spotty and chaotic at best. I intend to fix this.
I have been tasked with redesigning the web site. As part of the project, I'm building an app to classify and describe all products. We don't do any...
I have problem in creating web-service using cakephp .
this what i do to create this web-service .
I use NuSOAP - Web Services Toolkit for PHP for this.
I create a controller called WsController and import the library on it.
class WsController extends AppController{
var $uses = array();
function info() {
$this->layout= null;
...
I have a blog, and I would like to find out the best way to find the most commented posts. I have a straight setup with posts have many comments, and comments belong to posts.
I am trying to find a 1 line "right way" to do this, but can't find it. I would like to get like a top 10 commented posts.
Thanks
...
Hi all... I have 2 tables in my db...
Entita
id int(11)
descrizione varchar(50)
.....
Publicobjects
....
model varchar(50) the model I need (in this case 'Entita')
model_id int(11)
I would like to make a query like this:
select entita.*
from entita
where NOT EXISTS (select * from publicobjects where publicobjects.model = 'Entita' and ...
I had kept one application developed in CakePHP in my machine. I am able to view the application by http://localhost/webq but the CSS is not added. What could be the reason?
...
Desc Model belongsTo Prod Model. I want that all Prod.Name will appear as checkboxes when adding a new desc, so that user will just click a Prod.Name when adding a new description for it. Like:
<?php
echo $form->create('Desc');
echo $form->checkBox(Prod.Name); // assuming this is the correct code.
echo $form->textArea('Desc.content');
e...
Hi,
in cakephp is it possible to continue to execute a function after the render call? Im using ajax and it would be nice to be able to do some cleaning up server side after render the response to the page. Of course I could make another ajax call but I would prefer not to..
Tnx for any ideas.
Bjorsa
...
I am new to CakePHP and want an admin panel on my custom CMS for a client. Is there any way other than just linking to an admin page to each controller that I can pull views from other controllers such as users and posts?
...
Hi
I'm using CakePHP's Auth component and it's in my app_controller.php. The problem is I want to allow specific views in the built-in pages controller. How do I do that? Thanks in advance!
...