I met this problem, but i don't know why Cake use HTTP_X_FORWARDED_HOST for
referer ? Anyone know this ?
On Tuesday, January 17, 2012 10:17:51 PM UTC+7, euromark wrote:
I moved a project from a managed server to a server with some proxy
routing (apache mod_proxy).
But now
https://cakephp.lighthouseapp.com/projects/42648/tickets/2597-model-invalidfields-add-validation-messages-each-time-it-s-called
this answer from *Mark-story:*
Yes, this is how it works. Since you are using lower level methods the
validationErrors are not reset. You should use create() +
I have a page with url : *http://example.com/threads/**một wiki và diễn đàn
tự do về* (controller/slug)
cached in
tmp/cache/views/*
threads_view_m_e1_bb_99t_wiki_v_c3_a0_di_e1_bb_85n_c4_91_c3_a0n_t_e1_bb_b1_do_v_e1.php
*
how can i clear cache this page ?
--
Our newest site for the community:
Do it end up $fixtures = array('User, 'Image', all model);
Because all models relate to others model. When you have a new model then
all test will fail because new model relate with a exist model.
How to solve this problem, i want a way to load all fixtures ?
My solve , I created abstract
Is there a Php library or software read cakephp's logs.
I want to read cakephp app's logs on server but don't know any software or
library.
--
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
$this- Posts = $this-generate('Posts', array(
'models' = array(
'Post' = array('exists')
)
));
$this-Posts-Post
-expects($this-once())-method('exists')-will($this-returnValue(false));
$this-testAction('/user/posts/edit/' . $post['Post']['id'], array(.
*I expects a exception at
Is there any way to know request is test environment's request ?
More modules or elements , helpers that i don't want it run when test. It
is good if there is a way to distinguish request is test or not
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
I still think with debug is 0 , cakephp will be run faster when debug is 2.
But when i use ApacheBench : ab -n 100 http://example.com in localhost . It
showed results is same.
I ever read this article: 8 ways to speed up
Cakephphttp://www.pseudocoder.com/blog/8-ways-to-speed-up-cakephp-apps
I used ab apache's benchmark , command line: ab -k -n 100 http://b/ .
please read this :
https://gist.github.com/51757a95763fd8ac7b53
It seems debug 0 is litle faster compare with debug 2. But i remember in
previous version debug 0 is a lot faster .
--
Our newest site for the community:
I use this query , and it created a lot duplicate query . This problem
seems many people met.
$this-Action-find('all', array(
'limit' = 60,
'order' = array('Action.created DESC'),
'contain' = array(
'Thread' = array('Game' = array('Image' = array('limit' = 1))),
'Post' = array('Thread' =
I don't use cacheQueries but I tested with cacheQueries = true or false ,
no change happen.
--
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
I found out this problem cause by my SQL table design mistakes.
--
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
/app/Locale/fre/LC_MESSAGES/cake.po (French)
create cake.po use PoEdit to translate it . It take you several hours to
translate , not lost too much your time ..
When you done with translations then post a article to
http://bakery.cakephp.org
--
Our newest site for the community: CakePHP
Put this code ( modify it fit with your code ) in boostrap.php
if (preg_match('/details\.php?id=(.*)/', $_SERVER['REQUEST_URI'],
$match) !== false) {
if (isset($match[1])){
$location = '/details/index/' . $match[1]
https://github.com/cakedc
search *users* , this plugin is stable at 95% , 5% isn't stable . but it
is good, you can see and get code from it .
Now , it is best, if you develop users magnagement for yourself. Then you
can easier to fix any errors happen.
--
Our newest site for the community:
https://github.com/cakedc
search *users* , this plugin stable at 95% , 5% isn't table . but it is
good, you can see and get code from it .
Now , it is best, if you develop users magnagement for yourself. Then you
can easier to fix any errors happen.
--
Our newest site for the community:
I met this error , Email still send . How i can do protected function
__sendVerifyEmail in UsersController return true , but don't send email ?
(Funciton __sendVerifyEmail use CakeEmail , not EmailComponent.)
*
Expectation failed for method name is equal to string:__sendVerifyEmail when
I only need to do ..
$this-Users = $this-generate('Users', array(
'methods' = array(
'__sendVerifyEmail'
)
));
It is documented .Sorry, I confused here , after a long day do testing.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
I forgot to mention Sublime Text 2 , is a fast , cross-platform editor . It
is good for coding too .
Read this :
http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/
.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out
$Posts = $this-generate('Posts', array(
'models' = array('Post' = array('save'))
));
$Posts-Post-expects($this-any())-method('save');
$this-testAction('/user/posts/add', array(
'data' = array(
'Post' = array(
I tested in CLI :
cake testsuite core Controller/Component/AuthComponent
cake testsuite core Controller/Component/SessionComponent
It seems AuthComponent, SessionComponent, CookieComponent can't use in CLI
But it failed . Do any method contains AuthComponent, SessionComponent,
I created TestSuite/Reporter/CakeHtmlReporter.php ( copy in original Lib )
then change function _getStackTrace() like this:
https://gist.github.com/2504656
https://lh6.googleusercontent.com/-K0onhL4O8P0/T5ns8fJv5II/JH4/WUwxWvhD_2E/s1600/Capture.JPG
then I get stack trace like this New
I want test a method contain line
$this-Auth-user('id');
Do i must run that in browser: http://example.com/test.php
and it's only way ?
And a addition question.
Can i change phpunit's output error warning ? It is hard to see like
this: http://i.imgur.com/qNFfr.jpg
--
Our newest site
Should DebugKit Toolbar's panel be maximum window ?
http://i.imgur.com/fqOaa.jpg
I always must click button + per when watch . Or may use cookie to
remember choice .
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
I just think this matter can fix simple by change css for
#debug-kit-toolbar .panel-content {
height: 200px;
}
Default 200px is too small .
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
I think one of the best IDEs is NeptunIDE at http://neptunide.com/
address.
but it is not available for download.
I'm looking for an IDE with these facilities.
You can't download it , why you know it is good ?
I use Aptana , with me it is better Netbeans . I use netbeans more than 2
it is hard to know if you can code faster only with watch video . Unless
you spend time to use it, 1 or 2 week coding, then you will figure out
which you prefer.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
A article about autocomplete on Eclipse ( same as Aptana )
http://mark-story.com/posts/view/code-completion-for-cakephp-in-eclipse
--
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
Why does cakephp 2.0 still use VENDORS constant ? When its vendor is
'Vendor' folder ..
f (!defined('VENDORS')) {
define('VENDORS', ROOT . DS . 'vendors' . DS);
}
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
Use cronjob if your server is Linux.
--
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
My problem same with this topic
https://groups.google.com/forum/#!topic/cake-php/WWbLFXnXv3k
but i used his way (cake -webroot .. )but can't
my directory structure
/cakephp
/app
/webroot
but when debug(WWW_ROOT) in console it still d:\htdocs\cakephp\app\webroot\
How can i do it
If you ask this kind question. Even best developer php don't know where
error is.
And my friends take half hour to complete that example when begin to learn
cakephp.
I learned that example , too.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out
I think better you should use your script about uploading. Uploading is
hard to write plugin use for all case.
And It is easier to change , or add new features, even update to 3.0
version ( in future ) , because script is yours .
--
Our newest site for the community: CakePHP Video Tutorials
@AD7six: I want referer to CakeDC. Sorry, if i used mistake words .
--
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
Should we group *categories *plugin with *tags *plugin ?
Tags Plugins https://github.com/CakeDC/tags and Categories
Pluginshttps://github.com/CakeDC/categories
I know a little about drupal ( i don't use it in long time), they used *
term* for tags and even categories, menu.
And i see tags and
Oauth Lib 2.0 :
https://github.com/CakeDC/oauth_lib/tree/2.0
I only use 1.0 version. It is very good. I don't know but i think 2.0 have
bugs ^^.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
Upload: https://github.com/jrbasso/MeioUpload
Comments: https://github.com/CakeDC/comments
Ratings/Votes: https://github.com/CakeDC/ratings
Facebook: https://github.com/facebook/php-sdk
Mobile Theme: I don't know about this.
--
Our newest site for the community: CakePHP Video Tutorials
I post at here , because if i use RewriteCond %{REQUEST_URI} in htaccess.
It seems any urls in cakephp contain webroot.
And I followed your suggestion redirect urls in routes.php:
if (preg_match('/webroot/', Router::url(null, false))) {
header(Location: . str_replace('/webroot',
Thank you very much for help me this matter.
--
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
How can i redirect these urls ( use Htaccess):
http://example.com/webroot/posts/1/post_slug
to
http://example.com/posts/1/post_slug
i read and do a lot but can't . Please help me solve this matter.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check
I think configure::write('Cache.check', false) beforeSave and
beforeDelete in AppModel.php
---
ex: in case, Author hasMany Book and I have a lot cache of action
: BooksController-view , 1000 cache file
Then i create new a author, if Cache.check == true, it will
Recently , i saw in Google Webmaster a lot pages is NOT FOUND as:
http://example.com/webroot/index.php?url=authors/1781/http://gohentai.net/webroot/index.php?url=authors/1781/Yamasaki_Atsushi
test_test
http://example.com/webrootposts/5978/test_test
I don't know as google crawl in pages but it
Recently , i saw in Google Webmaster a lot pages is NOT FOUND as:
http://example.com/webroot/index.php?url=authors/1781/http://gohentai.net/webroot/index.php?url=authors/1781/Yamasaki_Atsushi
test_test
http://example.com/webroot/posts/5978/test_test
I don't know as google crawl in pages but it
CakePHP 2.0 changed in htaccess:
*cakephphttps://github.com/cakephp/cakephp/tree/2.0
* / app https://github.com/cakephp/cakephp/tree/2.0/app /
webroothttps://github.com/cakephp/cakephp/tree/2.0/app/webroot /
.htaccess
Line 5 from RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] to RewriteRule
Use required = true ,
'ben_password' = array(
'required' = array('rule' = 'notEmpty', 'message' =
'EmptyPassword','required'=true)
)
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
You set 'last'= true at mistake place .
--
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
Convert UTF-8 Problem with php , but i don't know how to do .
I want to ask cakephp about this because i use cakephp .
In cakePHP 1.3 i use 'encoding' = 'UTF-8', it is my mistake. Now i known
it must be 'encoding'='uft8' when update to update to cakephp 2.0
But i end up submit a lot Japanese
thanks for answer my question. I will tried it .
--
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
Thanks a lot, i used AD7six's shell . All work , now.
--
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,
Many element can't cache but repeat in many layouts.
Only me met trouble about this matter ?...
--
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
No, i mean:
You cannot use nocache tags in elements. Since there are no callbacks
around elements, they cannot be cached. (
http://book.cakephp.org/2.0/en/core-libraries/helpers/cache.html)
I can use cake:nocache in elements with cakephp 1.x but not can't use it
.
I see it is harder to cache
No, i mean:
You cannot use nocache tags in elements. Since there are no callbacks
around elements, they cannot be cached. (
http://book.cakephp.org/2.0/en/core-libraries/helpers/cache.html)
I can use cake:nocache in elements with cakephp 1.x but can't with cake
2.x
I see it is harder to cache
Edit: Do you mean : *Admin* to the *Student* login screen if I can't find a
*Admin *?
--
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
CakepHP 2.0 plugins no longer cache in elements.
Is it harder to code ? I use nocache a lots in cakephp 1.3.
--
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
Html::scriptStart can't use when requestAction in 2.0
--
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,
https://github.com/jrbasso/MeioUpload
--
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
https://github.com/jrbasso/MeioUpload
All plugin for 2.0 seems not stable .. You try to fix it.
--
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
When i use this line:
$this-User-saveField('last_activity', date('Y-m-d H:i:s', time()));
CakePHP delete all cache of model relation with User. ( Almost all model
relate with User) .
I must use Configure::write('Cache.check', false); prevent Cakephp clear all
.
Is this normal in cakePHP ?
--
Sorry because poor my Engish.
--
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
Sorry, because poor my English.
--
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
if i use and create much components and that components use other components
.It will make app is very slow?
--
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
I asked in cakephp IRC, A person answer is not:
[11:05] savant it will not be slow, I believe it passes those around via
reference
[11:05] savant so you have nothing to worry about
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new
Thanks a lot.
--
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
in app_controller.php load Session, Auth components.
And in posts_controller.php, i use CustomComponent with $components =
array('Session','Auth');
Then do CustomComponent must reload Session, Auth?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check
Understand ACL and use it , you may take several days to 1 week . Config
like this in model http://book.cakephp.org/view/93/ACL . Try to figure out ,
do your best
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
In routers.php , i wrote this line.
Router::connect('/pages/:id/:slug', array('controller' = 'pages',
'action' = 'view'), array('pass' = array('id', 'slug'), 'id' =
'[0-9A-Za-z]{6}'));
now i can access http://example.com/pages/7hf763/this_is_slug
but how i can access function public()
Don't use JavascriptHelper , use JsHelper instead.
--
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
How create beta (testing) website use same webroot and cake folder ?
That beta (testing) website probably is at http://beta.example.com or
http://example.com/beta
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
You try to check this: http://api.jquery.com/jQuery.get/
and learn how use http://book.cakephp.org/view/1592/Js
remember create views/layout/ajax.ctp ( ?php echo $content_for_layout; echo
$js-writeBuffer();? )
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
CakePHP auto set $this-autoRender = false when you request ajax .But you
must create views/layouts/ajax.ctp .
--
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
Sorry, cakephp don't set $this-autoRender = false. But it will check your
ajax.ctp. I only need create blank layout ajax.ctp
?php
echo $content_for_layout;
echo $js-writeBuffer(); // recommmend
?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the
1. $result = Set::combine($a, array('{0}: {1}', '{n}.User.Data.user',
'{n}.User.Data.name'), '{n}.User.id');
2.
3. /* $result now looks like:
4. Array
5. (
6. [mariano.iglesias: Mariano Iglesias] = 2
7. [phpnut: Larry E. Masters] = 14
8. [gwoo: The Gwoo] = 25
It may be 2 question : when use Set::combine and extract this data :
$this-User-find('all);
1.
Array
(
[0] = Array
(
[User] = Array
(
[id] = 4
[username] = myname
[password]
I can't use CakeLog::write('log','test'); in Shell
--
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
I change use Ubuntu OS, CakeLog write direct in Terminal. May it can't write
in Windows's cmd ?
--
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
I change use Ubuntu OS, CakeLog write direct in Terminal. May it can't write
in Windows's cmd ?
Edit: I use as this: CakeLog::write('log',print_r($log)); . It print direct
in Ubuntu's Terminal but sure it isn't in Windows's cmd.
--
Our newest site for the community: CakePHP Video Tutorials
I can't use CakeLog::write(); write log when run CakePHP's Shell Task
. Can't CakeLog use in CLI ?
--
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
https://github.com/CakeDC/oauth_lib
I use Cakedc's oauth_lib, but i stuck at this code:
$RequestToken = $this-Session-read('request_token');
$AccessToken = $RequestToken-getAccessToken(array('oauth_verifier' =
$options['oauth_verifier']));
$response = $AccessToken-request('GET',
78 matches
Mail list logo