I have some redirects in place from our previous site that used CakePHP. The new site has plain PHP pages. When trying to redirect the following in an .htaccess file I am having problems:
Redirect 301 /old-page-here http://samesitename.com/somedirectory/newfilename.php
The /old-page-here had the extension .ctp. When I run this in my b...
For some reason the AppModel->updateAll() method does not escape data passed to it. Looking over the documentation though, I can't find anything on how you actually escape data with CakePHP.
Down in datasources/dbo/dbo_mysql.php I found the value() method that seems to just use mysql_real_escape_string() - but I have no idea how to acce...
Anyone knows a good way to make UNION query in CakePHP? I would like to avoid using $this->query();.
With two tables t1, t2:
SELECT * FROM t1
LEFT JOIN t2 ON t1.id = t2.id
UNION
SELECT * FROM t1
RIGHT JOIN t2 ON t1.id = t2.id
With three tables t1, t2, t3:
SELECT * FROM t1
LEFT JOIN t2 ON t1.id = t2.id
LEFT JOIN t3 ON t2.id = t3.id
U...
Hi folks,
new to cakePHP and trying my first join. I've got one table called users and one called projects. one user can have many projects, so projects has a user_id column.
Here is my action in projects_controller:
function index() {
$this->set('projects', $this->Project->find('all', array('joins' => array(
array(
...
Hi folks,
setting up my authentication, in my users_controller i have a register action listed below. I'm getting an error at line 20 which is
if (!empty($this->data)) {
The error is:
syntax error, unexpected T_STRING
Here is my entire users_controller:
<?php
class UsersController extends AppController {
var $name = 'Users';
va...
The CakePHP Blog Tutorial shows a pagination view of all Blog posts.
If in the view mode of a blog entry, how would I show a previous/next link to the posts before and after this one?
Rather than having an index page with all posts listed I would like to click in blog view from post to post
...
Hi folks I'm trying to set up tagging in my CakePHP application. I've been using an article I found here: http://bakery.cakephp.org/articles/view/simple-tagging-behavior
The problem I'm having is when I add the line
var $actsAs = array('Tag'=>array('table_label'=>'tags', 'tags_label'=>'tag', 'separator'=>','));
to my project model.
...
Hi,
I am using CakePHP v1.2 for my web application hosted here: http://lol-land.in
The application was working fine till Yesterday, but it suddenly started to get stuck in some redirection loops. What makes it weirder is the fact that the problem is with just one controller: posts. And even in that most of the functions are working. But...
I have been struggling to get my CakePHP site working on a Godaddy "grid hosting" account. My cake app is setup is hosted from a subdirectory on the account, and can be accessed via a subdomain. I had to adjust my .htaccess files to get this working, and now I need to get the CakePHP console working in this environment.
I have the same ...
I just started using CakePHP, and am learning how to use Bake. Why does the CRUD is generates have __ when using $this->Session->setFlash(__('The post could not be saved. Please, try again.', true)); and what is the true there for?
...
http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts
This matter is solved but i dont know how to do.
help me I use cakePHP , I read RequestHanlder Component in bookcake but i dont ever use MIME.
...
I have CakePHP connecting to a SQL Server database using standard SQL Server authentication. If I want to connect via Windows Authentication instead has anyone tried this?
Firstly I think it requires using the SQL Server drivers i.e. not the standard MSSQL PHP drivers so that PHP itself can use Windows Authentication. Then its the iss...
I'm getting Parse error: syntax error, unexpected T_STRING while i cake bake model
because the model generated has single quotes not closed
like
'
Photo' => array(
'className' => 'Photo',
'foreignKey' => 'album_id',
'dependent' => false,
'conditions' => ',
'fields' =...
Does CakePHP have a form helper for html drop downs?
...
Fatal error: Call to undefined method Debugger::checkSessionKey() in F:\xampp\htdocs\cakecms\views\pages\home.ctp on line 3
in cake php .
...
I have a added the cakePHP tags functionality to my applications. I have a table called projects that can have many tags associated. So I have a tags table with an id and a tag varchar field. A projects table with a tags varchar field, and a link table projects_tags that has an id, tag_id, and project_id field. When I add the tags input ...
i get a lot of warnings in my logs like:
2010-08-24 09:34:01 Warning: Warning (2): mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in [C:\xampp\htdocs\cake\libs\model\datasources\dbo\dbo_mssql.php, line 468]
2010-08-24 09:34:01 Warning: Warning (2): mssql_free_result(): supplied argument is not a valid MS SQL-re...
At my company we're using git for a couple of months now (and we're happy about it), but we still don't get git for the full 100%.
Our main product is a website which we offer in different languages (frontend + admin backend). Some of these websites offer features others shouldn't offer (e.g. the type of fields that need to be filled in...
I'm somewhat new to Ajax/Jquery, so I apologize if this is an easy question, but I just couldn't figure it out.
I am using CakePHP and JQuery.
I want to save a link, label, and description into a table by pulling out the "innerHTML" from an HTML page. I can't seem to put the data in the expected format - that is the format that the c...
with config div => false
$form->input('chexkbox');
print
<input type="checkbox" value="1" ....>
<label>checkbox</label>
but i want it reverse order
<label>checkbox</label>
<input type="checkbox" value="1" ....>
can it reverse ?
...