Re: multi-language site

2011-07-28 Thread leafchild book
So all pages are in Japanese.

I put this code "Configure::write('Config.language', 'ja');" to
- core.php
- in app_controller.php in function beforeFilter() {}
- in my_controller.phpfunction beforeFilter() {}

still page is translated to EN and if I access site my domain.com/en/my then
still page is in EN
I can see JP page only if I access page with this URL my domain.com/jp/my

Why it translated to EN automatically??



On Thu, Jul 28, 2011 at 2:45 AM, gloop  wrote:

> Hi,
>
> ok i didn't know whats the problem is.
>
> When you want that i take a look come to http://www.stinto.net/jk9hn
> its a private chat. Then i help you there :)
>
> On 28 Jul., 02:32, leafchild book  wrote:
> > "Configure::write('Config.language', 'ja');"  is NOT working.
> >
> > Yes I have "default.po"  at app/local/jpn/LC_MESSAGES/default.po
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Jul 27, 2011 at 5:28 PM, gloop  wrote:
> > > Correct is:
> >
> > > Configure::write('Config.language', 'ja');
> >
> > > You can take a look on cake/libs/l10n.php
> >
> > > Did you create app/local/jpn/LC_MESSAGES/default.po ?
> >
> > > On 28 Jul., 02:14, leafchild book  wrote:
> > > > .
> >
> > > > I set .po file for "en" and "jpn"
> >
> > > > I set default language to Japanese:
> > > > app/config/core.php:
> > > > Configure::write('Config.language', 'jpn');
> >
> > > > but when I access site
> >
> > > > Either
> > > > mydomain.com/en/something/ormydomain.com/something/
> >
> > > > show EN translation.
> >
> > > > then I put this line (Configure::write('Config.language', 'jpn');)
> > > directly
> > > > to controller file (I thought it will show Japanese ) then still
> local is
> > > in
> > > > EN
> >
> > > > I can't set default language which I want to! What is missing???
> >
> > > > On Wed, Jul 27, 2011 at 4:14 PM, gloop  wrote:
> > > > > When you have diffrent count pages you must set diffrent routes
> (for
> > > > > en / jp).
> >
> > > > > And set diffrent views for these pages.
> >
> > > > > On 27 Jul., 23:27, leafchild book 
> wrote:
> > > > > > Also I wander,,, how other people doing for this kind of site,,,
> >
> > > > > > #1)
> > > > > > So like I said 2nd language page has much less pages than dealt
> page.
> > > > > > ex)  site map page is not work for just translation. I have to
> show
> > > only
> > > > > > available page link to the page.
> >
> > > > > > #2)
> > > > > > Some image is different  at EN and JP page.
> > > > > > ex) submit button
> >
> > > > > > On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
> > > > > > > I use .po files
> >
> > > > > > > kind regards
> >
> > > > > > > On 27 Jul., 23:10, leafchild  wrote:
> > > > > > > > Thanks gloop for the response.
> >
> > > > > > > > Did you use .pot file or DB??
> >
> > > > > > > > lc
> >
> > > > > > > > On Jul 27, 1:32 pm, gloop  wrote:
> >
> > > > > > > > > Hello leafchild,
> >
> > > > > > > > > same problem for 1 day :-D
> >
> > > > > > > > > routes.php
> >
> > > > > > > > > Router::connect(
> > > > > > > > > '/:lang/:controller/:action/*',
> > > > > > > > > array(),
> > > > > > > > > array('lang' => '[a-z]{2}')
> > > > > > > > > );
> > > > > > > > > Router::connect(
> > > > > > > > > '/:lang/:controller',
> > > > > > > > > array('action' => 'index'),
> > > > > > > > > array('lang' => '[a-z]{2}')
> > > > > > > > > );
> >
> > > > > > > > > app/config/core.php
> >
> > > > > > > > > // Set def

Re: cakephp 1.3 loading page is slow

2011-07-28 Thread leafchild book
actually, I installed 2 cakephp at same server.

One I installed to sub-domain side is ok but
the other installed to webroot dir is slow.



On Thu, Jul 28, 2011 at 4:44 AM, AD7six  wrote:

>
>
> On Jul 28, 7:26 am, euromark  wrote:
> > yeah, probably a cheap webhosting package on a shared environment
> > sounds like it, anyway.
>
> based on what?
>
> AD
>
> > correct me if i'm wrong
> >
> > mark
> >
> > On 28 Jul., 08:45, WyriHaximus  wrote:
> >
> >
> >
> > > Tbh it's worth the time to find out why a simple static page is
> > > extremely slow rather then just wack the html_cache plugin in the
> > > mix ;). A slow static page probably means the entire cake app is slow.
> >
> > > On Jul 28, 3:25 am, Eugenio  wrote:
> >
> > > > Try with the html cache plugin;
> http://bakery.cakephp.org/articles/mattc/2009/03/20/html-cache-helper
> >
> > > > It will really speed it up, just be careful and remember to clean
> cache
> > > > after updates.
> >
> > > > 2011/7/27 leafchild 
> >
> > > > > I notice loading page is extremely slow.
> >
> > > > > Those pages are not connected to DB. Just simple static page.
> > > > > How can I make it faster to load these pages?
> >
> > > > > --
> > > > > Our newest site for the community: CakePHP Video Tutorials
> > > > >http://tv.cakephp.org
> > > > > Check out the new CakePHP Questions
> sitehttp://ask.cakephp.organdhelp
> > > > > others with their CakePHP related questions.
> >
> > > > > To unsubscribe from this group, send email to
> > > > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> > > > > athttp://groups.google.com/group/cake-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 related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-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 related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: multi-language site

2011-07-27 Thread leafchild book
"Configure::write('Config.language', 'ja');"  is NOT working.

Yes I have "default.po"  at app/local/jpn/LC_MESSAGES/default.po



On Wed, Jul 27, 2011 at 5:28 PM, gloop  wrote:

> Correct is:
>
> Configure::write('Config.language', 'ja');
>
> You can take a look on cake/libs/l10n.php
>
> Did you create app/local/jpn/LC_MESSAGES/default.po ?
>
> On 28 Jul., 02:14, leafchild book  wrote:
> > .
> >
> > I set .po file for "en" and "jpn"
> >
> > I set default language to Japanese:
> > app/config/core.php:
> > Configure::write('Config.language', 'jpn');
> >
> > but when I access site
> >
> > Either
> > mydomain.com/en/something/ormydomain.com/something/
> >
> > show EN translation.
> >
> > then I put this line (Configure::write('Config.language', 'jpn');)
> directly
> > to controller file (I thought it will show Japanese ) then still local is
> in
> > EN
> >
> > I can't set default language which I want to! What is missing???
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Jul 27, 2011 at 4:14 PM, gloop  wrote:
> > > When you have diffrent count pages you must set diffrent routes (for
> > > en / jp).
> >
> > > And set diffrent views for these pages.
> >
> > > On 27 Jul., 23:27, leafchild book  wrote:
> > > > Also I wander,,, how other people doing for this kind of site,,,
> >
> > > > #1)
> > > > So like I said 2nd language page has much less pages than dealt page.
> > > > ex)  site map page is not work for just translation. I have to show
> only
> > > > available page link to the page.
> >
> > > > #2)
> > > > Some image is different  at EN and JP page.
> > > > ex) submit button
> >
> > > > On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
> > > > > I use .po files
> >
> > > > > kind regards
> >
> > > > > On 27 Jul., 23:10, leafchild  wrote:
> > > > > > Thanks gloop for the response.
> >
> > > > > > Did you use .pot file or DB??
> >
> > > > > > lc
> >
> > > > > > On Jul 27, 1:32 pm, gloop  wrote:
> >
> > > > > > > Hello leafchild,
> >
> > > > > > > same problem for 1 day :-D
> >
> > > > > > > routes.php
> >
> > > > > > > Router::connect(
> > > > > > > '/:lang/:controller/:action/*',
> > > > > > > array(),
> > > > > > > array('lang' => '[a-z]{2}')
> > > > > > > );
> > > > > > > Router::connect(
> > > > > > > '/:lang/:controller',
> > > > > > > array('action' => 'index'),
> > > > > > > array('lang' => '[a-z]{2}')
> > > > > > > );
> >
> > > > > > > app/config/core.php
> >
> > > > > > > // Set default language
> > > > > > > Configure::write('Config.language', 'de');
> >
> > > > > > > cake/libs/controller
> >
> > > > > > >   var $components = array('Session', 'Cookie');
> >
> > > > > > >   function beforeFilter() {
> > > > > > >   $this->_setLanguage();
> > > > > > >   }
> >
> > > > > > >   function _setLanguage() {
> > > > > > >   if ($this->Cookie->read('lang') &&
> > > > > !$this->Session->check('Config.language')) {
> >
> > > > > > >   $this->Session->write('Config.language',
> > > > > $this->Cookie->read('lang'));
> >
> > > > > > >   }
> > > > > > >   else if (isset($this->params['lang']) &&
> > > ($this->params['lang']
> > > > > > >!=  $this->Session->read('Config.language'))) {
> >
> > > > > > >   $this->Session->write('Config.language',
> > > > > $this->params[&#x

Re: multi-language site

2011-07-27 Thread leafchild book
Just find out:

mydomain.com/jp/something/ <http://mydomain.com/en/something/>  make locale
JP

even I set
app/config/core.php:
Configure::write('Config.language', 'jpn');
for default language, default language becomes EN

How come I can't set default language??



On Wed, Jul 27, 2011 at 5:14 PM, leafchild book wrote:

> .
>
> I set .po file for "en" and "jpn"
>
> I set default language to Japanese:
> app/config/core.php:
> Configure::write('Config.language', 'jpn');
>
> but when I access site
>
> Either
> mydomain.com/en/something/ormydomain.com/something/
>
> show EN translation.
>
> then I put this line (Configure::write('Config.language', 'jpn');) directly
> to controller file (I thought it will show Japanese ) then still local is in
> EN
>
> I can't set default language which I want to! What is missing???
>
>
>
>
>
>
>
>
>
> On Wed, Jul 27, 2011 at 4:14 PM, gloop  wrote:
>
>> When you have diffrent count pages you must set diffrent routes (for
>> en / jp).
>>
>> And set diffrent views for these pages.
>>
>> On 27 Jul., 23:27, leafchild book  wrote:
>> > Also I wander,,, how other people doing for this kind of site,,,
>> >
>> > #1)
>> > So like I said 2nd language page has much less pages than dealt page.
>> > ex)  site map page is not work for just translation. I have to show only
>> > available page link to the page.
>> >
>> > #2)
>> > Some image is different  at EN and JP page.
>> > ex) submit button
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
>> > > I use .po files
>> >
>> > > kind regards
>> >
>> > > On 27 Jul., 23:10, leafchild  wrote:
>> > > > Thanks gloop for the response.
>> >
>> > > > Did you use .pot file or DB??
>> >
>> > > > lc
>> >
>> > > > On Jul 27, 1:32 pm, gloop  wrote:
>> >
>> > > > > Hello leafchild,
>> >
>> > > > > same problem for 1 day :-D
>> >
>> > > > > routes.php
>> >
>> > > > > Router::connect(
>> > > > > '/:lang/:controller/:action/*',
>> > > > > array(),
>> > > > > array('lang' => '[a-z]{2}')
>> > > > > );
>> > > > > Router::connect(
>> > > > > '/:lang/:controller',
>> > > > > array('action' => 'index'),
>> > > > > array('lang' => '[a-z]{2}')
>> > > > > );
>> >
>> > > > > app/config/core.php
>> >
>> > > > > // Set default language
>> > > > > Configure::write('Config.language', 'de');
>> >
>> > > > > cake/libs/controller
>> >
>> > > > >   var $components = array('Session', 'Cookie');
>> >
>> > > > >   function beforeFilter() {
>> > > > >   $this->_setLanguage();
>> > > > >   }
>> >
>> > > > >   function _setLanguage() {
>> > > > >   if ($this->Cookie->read('lang') &&
>> > > !$this->Session->check('Config.language')) {
>> >
>> > > > >   $this->Session->write('Config.language',
>> > > $this->Cookie->read('lang'));
>> >
>> > > > >   }
>> > > > >   else if (isset($this->params['lang']) &&
>> ($this->params['lang']
>> > > > >!=  $this->Session->read('Config.language'))) {
>> >
>> > > > >   $this->Session->write('Config.language',
>> > > $this->params['lang']);
>> >
>> > > > >   $this->Cookie->write('lang', $this->params['lang'],
>> false,
>> > > > > '20 days');
>> > > > >   }
>> > > > >   }
>> >
>> > > > > Link musst looks like
>> > > > > domain/en/controller
>> >

Re: multi-language site

2011-07-27 Thread leafchild book
.

I set .po file for "en" and "jpn"

I set default language to Japanese:
app/config/core.php:
Configure::write('Config.language', 'jpn');

but when I access site

Either
mydomain.com/en/something/ormydomain.com/something/

show EN translation.

then I put this line (Configure::write('Config.language', 'jpn');) directly
to controller file (I thought it will show Japanese ) then still local is in
EN

I can't set default language which I want to! What is missing???









On Wed, Jul 27, 2011 at 4:14 PM, gloop  wrote:

> When you have diffrent count pages you must set diffrent routes (for
> en / jp).
>
> And set diffrent views for these pages.
>
> On 27 Jul., 23:27, leafchild book  wrote:
> > Also I wander,,, how other people doing for this kind of site,,,
> >
> > #1)
> > So like I said 2nd language page has much less pages than dealt page.
> > ex)  site map page is not work for just translation. I have to show only
> > available page link to the page.
> >
> > #2)
> > Some image is different  at EN and JP page.
> > ex) submit button
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:
> > > I use .po files
> >
> > > kind regards
> >
> > > On 27 Jul., 23:10, leafchild  wrote:
> > > > Thanks gloop for the response.
> >
> > > > Did you use .pot file or DB??
> >
> > > > lc
> >
> > > > On Jul 27, 1:32 pm, gloop  wrote:
> >
> > > > > Hello leafchild,
> >
> > > > > same problem for 1 day :-D
> >
> > > > > routes.php
> >
> > > > > Router::connect(
> > > > > '/:lang/:controller/:action/*',
> > > > > array(),
> > > > > array('lang' => '[a-z]{2}')
> > > > > );
> > > > > Router::connect(
> > > > > '/:lang/:controller',
> > > > > array('action' => 'index'),
> > > > > array('lang' => '[a-z]{2}')
> > > > > );
> >
> > > > > app/config/core.php
> >
> > > > > // Set default language
> > > > > Configure::write('Config.language', 'de');
> >
> > > > > cake/libs/controller
> >
> > > > >   var $components = array('Session', 'Cookie');
> >
> > > > >   function beforeFilter() {
> > > > >   $this->_setLanguage();
> > > > >   }
> >
> > > > >   function _setLanguage() {
> > > > >   if ($this->Cookie->read('lang') &&
> > > !$this->Session->check('Config.language')) {
> >
> > > > >   $this->Session->write('Config.language',
> > > $this->Cookie->read('lang'));
> >
> > > > >   }
> > > > >   else if (isset($this->params['lang']) &&
> ($this->params['lang']
> > > > >!=  $this->Session->read('Config.language'))) {
> >
> > > > >   $this->Session->write('Config.language',
> > > $this->params['lang']);
> >
> > > > >   $this->Cookie->write('lang', $this->params['lang'],
> false,
> > > > > '20 days');
> > > > >   }
> > > > >   }
> >
> > > > > Link musst looks like
> > > > > domain/en/controller
> > > > > domain/jp/controller
> >
> > > > > Have fun :)
> >
> > > > > On 27 Jul., 21:19, leafchild  wrote:
> >
> > > > > > I want to have 2 languages site (en/jp) and JP is default
> language.
> > > > > > I look at multi-language pages but still confusing,,,
> >
> > > > > > ex)
> > >http://book.cakephp.org/view/1228/Internationalization-Localizationht.
> ..
> >
> > > > > > and url will be:
> > > > > > JP : mydomain.com/whatever
> > > > > > EN: mydomain.com/en/whatever
> >
> > > > > > also EN pages has less page than JP pages which mean EN doesn't
> have
> > > > > > all pages for JP pages.
> > > > > > W

Re: multi-language site

2011-07-27 Thread leafchild book
Also I wander,,, how other people doing for this kind of site,,,

#1)
So like I said 2nd language page has much less pages than dealt page.
ex)  site map page is not work for just translation. I have to show only
available page link to the page.

#2)
Some image is different  at EN and JP page.
ex) submit button




On Wed, Jul 27, 2011 at 2:23 PM, gloop  wrote:

> I use .po files
>
> kind regards
>
> On 27 Jul., 23:10, leafchild  wrote:
> > Thanks gloop for the response.
> >
> > Did you use .pot file or DB??
> >
> > lc
> >
> > On Jul 27, 1:32 pm, gloop  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hello leafchild,
> >
> > > same problem for 1 day :-D
> >
> > > routes.php
> >
> > > Router::connect(
> > > '/:lang/:controller/:action/*',
> > > array(),
> > > array('lang' => '[a-z]{2}')
> > > );
> > > Router::connect(
> > > '/:lang/:controller',
> > > array('action' => 'index'),
> > > array('lang' => '[a-z]{2}')
> > > );
> >
> > > app/config/core.php
> >
> > > // Set default language
> > > Configure::write('Config.language', 'de');
> >
> > > cake/libs/controller
> >
> > >   var $components = array('Session', 'Cookie');
> >
> > >   function beforeFilter() {
> > >   $this->_setLanguage();
> > >   }
> >
> > >   function _setLanguage() {
> > >   if ($this->Cookie->read('lang') &&
> !$this->Session->check('Config.language')) {
> >
> > >   $this->Session->write('Config.language',
> $this->Cookie->read('lang'));
> >
> > >   }
> > >   else if (isset($this->params['lang']) && ($this->params['lang']
> > >!=  $this->Session->read('Config.language'))) {
> >
> > >   $this->Session->write('Config.language',
> $this->params['lang']);
> >
> > >   $this->Cookie->write('lang', $this->params['lang'], false,
> > > '20 days');
> > >   }
> > >   }
> >
> > > Link musst looks like
> > > domain/en/controller
> > > domain/jp/controller
> >
> > > Have fun :)
> >
> > > On 27 Jul., 21:19, leafchild  wrote:
> >
> > > > I want to have 2 languages site (en/jp) and JP is default language.
> > > > I look at multi-language pages but still confusing,,,
> >
> > > > ex)
> http://book.cakephp.org/view/1228/Internationalization-Localizationht...
> >
> > > > and url will be:
> > > > JP : mydomain.com/whatever
> > > > EN: mydomain.com/en/whatever
> >
> > > > also EN pages has less page than JP pages which mean EN doesn't have
> > > > all pages for JP pages.
> > > > What should I do when there is no EN page?
> >
> > > > I don't thinkhttp://
> book.cakephp.org/view/1228/Internationalization-Localization
> > > > works for my site.
> > > > There are a lot of long sentence that need to be covered, plus this
> > > > one not changing URL but changing contents.
> >
> > > > Should I just use Configure::write('Routing.prefixes',
> array('en'));??
> > > > because structure of 2 sites are not exactly same but share some
> > > > section.
>
> --
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-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 related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: multi-language site

2011-07-27 Thread leafchild book
Also I wander,,, how other people doing for this kind of site,,,

#1)
So like I said 2nd language page has much less pages than dealt page.
ex)  site map page is not work for just translation. I have to show only
available page link to the page.

#2)
Some image is different  at EN and JP page.
ex) submit button




On Wed, Jul 27, 2011 at 2:10 PM, leafchild  wrote:

> Thanks gloop for the response.
>
> Did you use .pot file or DB??
>
> lc
>
> On Jul 27, 1:32 pm, gloop  wrote:
> > Hello leafchild,
> >
> > same problem for 1 day :-D
> >
> > routes.php
> >
> > Router::connect(
> > '/:lang/:controller/:action/*',
> > array(),
> > array('lang' => '[a-z]{2}')
> > );
> > Router::connect(
> > '/:lang/:controller',
> > array('action' => 'index'),
> > array('lang' => '[a-z]{2}')
> > );
> >
> > app/config/core.php
> >
> > // Set default language
> > Configure::write('Config.language', 'de');
> >
> > cake/libs/controller
> >
> >   var $components = array('Session', 'Cookie');
> >
> >   function beforeFilter() {
> >   $this->_setLanguage();
> >   }
> >
> >   function _setLanguage() {
> >   if ($this->Cookie->read('lang') &&
> !$this->Session->check('Config.language')) {
> >
> >   $this->Session->write('Config.language',
> $this->Cookie->read('lang'));
> >
> >   }
> >   else if (isset($this->params['lang']) && ($this->params['lang']
> >!=  $this->Session->read('Config.language'))) {
> >
> >   $this->Session->write('Config.language',
> $this->params['lang']);
> >
> >   $this->Cookie->write('lang', $this->params['lang'], false,
> > '20 days');
> >   }
> >   }
> >
> > Link musst looks like
> > domain/en/controller
> > domain/jp/controller
> >
> > Have fun :)
> >
> > On 27 Jul., 21:19, leafchild  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I want to have 2 languages site (en/jp) and JP is default language.
> > > I look at multi-language pages but still confusing,,,
> >
> > > ex)
> http://book.cakephp.org/view/1228/Internationalization-Localizationht...
> >
> > > and url will be:
> > > JP : mydomain.com/whatever
> > > EN: mydomain.com/en/whatever
> >
> > > also EN pages has less page than JP pages which mean EN doesn't have
> > > all pages for JP pages.
> > > What should I do when there is no EN page?
> >
> > > I don't thinkhttp://
> book.cakephp.org/view/1228/Internationalization-Localization
> > > works for my site.
> > > There are a lot of long sentence that need to be covered, plus this
> > > one not changing URL but changing contents.
> >
> > > Should I just use Configure::write('Routing.prefixes', array('en'));??
> > > because structure of 2 sites are not exactly same but share some
> > > section.
>
> --
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-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 related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: htaccess and domain

2010-09-28 Thread leafchild book
thanks euromark.

Now I know which .htaccess I should edit

*It seems like my case is something to do server setting since *
*www.mydomain shows a default page server company prepared but linked pages
are not working.*
*
*
*
*
*
*
*
*
*
*
*
*
On Tue, Sep 28, 2010 at 8:06 PM, euromark wrote:

> a) you should redirect the other way around: domain => www.domain
> http://www.dereuromark.de/2010/07/13/redirect-root-domain-to-www-subdomain/
>
> b) only webroot is relevant. you should therefore connect the apache
> to /app/webroot/ (not /app or even worse /)
> then you can even delete the other 2 .htaccess
>
>
> On 28 Sep., 03:55, leafchild  wrote:
> > I set webroot to app/webroot
> > Also I edited .htaccess file to redirect user to domain without www
> > url, if a user access the site withwww.mydomain, user is redirected
> > to
> > mydomain.com.
> >
> > Not sure which .htaccess file I edited but before I set webroot to app/
> > webroot, redirectingwww.mydomainto mydomain
> > was working fine but after I set webroot to app/webroot. It seems
> > like, .htaccess is not working properly anymore.
> >
> > I realized that there are couple of .htaccess in cakephp dir.
> > - cake dir/.htaccess
> > - webroot/.htaccess
> > - cake dir/app/.htaccess
> >
> > Which file I need to edit to set redirect? I edit all of three above
> > files but none of it working.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: checkbox copy field

2010-09-10 Thread leafchild book
thanks!

used jquery and working fine!



On Fri, Sep 10, 2010 at 12:27 PM, cricket  wrote:

> On Fri, Sep 10, 2010 at 3:04 PM, leafchild 
> wrote:
> > Trying to set up JavaScript for copying shipping information to
> > billing address but it's not going well with CakePHP
> >
> >
> ==
> > 
> > 
> > 
> >
> >
> > Form->create('personal', array('name'=>'sh'));?>
> >
> >Member.first_name:input('Member.first_name',
> > array('label' => false,
> >
>'class'=>'',
> >
> 'div'=>false
> >
> ))?>
> >
> >
> >
> > >  $same = array('1'=>'copy');
> > echo $form->input('copy',
> array('type'=>'checkbox',
> >
> 'options'=>$same,
> >
> 'legend'=>false,
> >
> 'label'=>false,
> >
> 'div'=>false,
> >
> 'separator' => ' ',
> >
>
> 'onClick'=>"ShipToBill(this)"
> >
> ));
> >?>
> >
> >   
> >Member.cc_name:input('Member.cc_name', array('label'
> > => false,
> >
>'class'=>'',
> >
> 'div'=>false,
> >
> ))?>
> >
> >
> >
> >
> =
> >
> > I think JavaScript doesn't like naming "data[Member][first_name]"
> > If I just use simple name such as "firstname" then this JavaScript
> > works fine.
> >
> > Can I still use this JavaScript code to complete this if so how ?? or
> > do I have to use other way??
> > How people usually take care of something like this with CakePHP??
>
> If you have some element wrapping each individual field you could try
> giving them a unique id and using that for jquery's selector.
>
> document.sh.Member.data[Member][cc_name].value  =
> $('#member_first_name_wrapper input').val();
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Auth logout behavior issue

2010-06-29 Thread leafchild book
I set destroy Cookie and Session inside of logout function
but still something remember which page user log off and brings user
back to the page when user log in.


function logout(){
$this->Cookie->destroy();
$this->Session->destroy();
$this->redirect($this->Auth->logout());
}





On Tue, Jun 29, 2010 at 3:37 PM, leafchild  wrote:

> I have Auth login system, and It is working fine - user don't have
> problem login/logout
>
>
>
> However, I want to change one thing. I don't want to session to
> remember where user log off.
> When user login as soon as logout then a user is brought back to where
> user logoff
>
>
> EX)
> When user log off let's say page X then because of
> Auth setting, user is brought back to login page. Then as soon as user
> logout and login again.
> A user will be taken to page X but every time user login I want user
> to see page A.
>
>
>
> I set to like this:
> $this->Auth->loginRedirect = array('controller' => 'users', 'action'
> => 'index');
>
> but this setting is only working when browser is fresh, not after user
> logoff and login again in same browser.
> How can I change the behavior?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Caching Elements

2010-03-21 Thread leafchild book
I have same issue.

I don't think   is working at all.



On Wed, Feb 10, 2010 at 6:56 PM, Jeremy  wrote:

> OK... I have a follow-up question.
>
> How do I prevent caching in certain cases?  In the element that I am
> working on, it is possible for the external service to fail.  If that
> happens, I trap the error and create some HTML to notify the user that
> the service is unavailable.  The problem is that I don't really want
> to cache the error message.  I'd rather that it retry and only cache
> if the result was successful.
>
> I tried ecapsulating the error HTML in , but that does
> not seem to work.  Reloading the page will not cause the page to re-
> attempt to render the external service results.
>
> I have pasted the full code to my element here:
> http://bin.cakephp.org/view/11698566
>
>
> On Feb 10, 8:35 am, Jeremy  wrote:
> > Yes, correct.  My bad.
> >
> > On Feb 10, 2:51 am, majna  wrote:
> >
> >
> >
> > > I think it's /tmp/cache/views, not  /tmp/cache/element
> >
> > > On Feb 10, 1:53 am, Jeremy  wrote:
> >
> > > > With some help... I figured out the problem.  I was using the file
> > > > cache option and although the /tmp/cache directory was writable I was
> > > > missing a necessary directory.  Since I was trying to cache an
> element
> > > > the /tmp/cache/element directory needs to exist and it must be
> > > > writeable.  My problem was that the element directory was missing.
> > > > Once I added it... everything started working as expected.
> >
> > > > On Feb 9, 10:13 am, Jeremy  wrote:
> >
> > > > > Hi all.  I have created an element that will interact with an
> external
> > > > > webservice.  The webservice presents weather forecast data in XML
> and
> > > > > I am using my element code to parse the XML and render it on my
> site.
> > > > > The weather forecast service never updates their data more
> frequently
> > > > > than 1 hour, so I would like to cache the rendered element HTML for
> 1
> > > > > hour globally for all users.  Right now, each refresh of the page
> than
> > > > > contains this weather element code will cause a hit to the weather
> > > > > forecast webservice and the XML will get reparsed even if it hasn't
> > > > > changed.
> >
> > > > > I have tried to follow the instructions on how to turn on caching,
> but
> > > > > it does not seem to be working.
> >
> > > > > Here's what I have done so far:
> > > > > 1) Turned this on in the config Configure::write('Cache.check',
> > > > > true);
> > > > > 2) I am calling the element with this code:  >
> > > > > >element('weather', array('cache'=>array('time'=>'+1 hour'))); ?>-
> Hide quoted text -
> >
> > > > > - Show quoted text -- Hide quoted text -
> >
> > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: cache is messing up cookies and session???

2010-03-20 Thread leafchild book
I have checked this page:
http://book.cakephp.org/view/213/Cache

<http://book.cakephp.org/view/213/Cache>try to control cache but it seems
not working?

even I set

something,,, something


browser is keep using cache view so it is not updating current file view.


How can I stop cake to use cache view and shows current one?

Please someone give me some idea

Thanks





On Sat, Mar 20, 2010 at 3:55 AM, leafchild book wrote:

> this is reproducible by everybody
>
> i have to refresh page to get right cookie information.
>
> how can I get right cookie information without refreshing?
>
>
>
>
> On Sat, Mar 20, 2010 at 12:57 AM, John Andersen 
> wrote:
>
>> I would think that this is an issue with the browser cache!
>> Enjoy,
>>   John
>>
>> On Mar 20, 1:05 am, leafchild book  wrote:
>> > I said cache is messing up but not 100% sure but it's obvious that
>> > cookie's info is not update unless page is refreshed
>> >
>> > How can I get right cookie info without refreshing page after user
>> update
>> > shopping cart or their billing info.
>> >
>> [snip]
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>> To unsubscribe from this group, send email to cake-php+
>> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
>> ME" as the subject.
>>
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: cache is messing up cookies and session???

2010-03-20 Thread leafchild book
this is reproducible by everybody

i have to refresh page to get right cookie information.

how can I get right cookie information without refreshing?



On Sat, Mar 20, 2010 at 12:57 AM, John Andersen wrote:

> I would think that this is an issue with the browser cache!
> Enjoy,
>   John
>
> On Mar 20, 1:05 am, leafchild book  wrote:
> > I said cache is messing up but not 100% sure but it's obvious that
> > cookie's info is not update unless page is refreshed
> >
> > How can I get right cookie info without refreshing page after user update
> > shopping cart or their billing info.
> >
> [snip]
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: cache is messing up cookies and session???

2010-03-19 Thread leafchild book
I said cache is messing up but not 100% sure but it's obvious that
cookie's info is not update unless page is refreshed

How can I get right cookie info without refreshing page after user update
shopping cart or their billing info.





On Fri, Mar 19, 2010 at 12:52 PM, leafchild wrote:

> I think CakePhp's cookies is messed up by automatic cakephp chache.
>
> my shopping cart, order are starts showing previous one and I have to
> refresh the page to see new order or shopping cart information.
>
> [issue a]
> in shopping cart page, changing # of item or removing item in shopping
> cart is like not working but if you refresh the page then you see it's
> working.
>
> [issue b]
> at Thank you page after completed processing order, I see that order #
> is previous one then no order data is inserted to DB(no confirmation
> email either)
> then when I refresh page then I see different order # displayed and
> new order inserted to DB and also confirmation email is send.
>
>
> Once all process is done, I deleted the cookie but why this is
> happening??
>
>
>
> Till yesterday the accessing every page was extremely slow(even the
> page is not accessing DB at all), then I found that sub directory of
> "app/tmp/cache/"
> dir's permission was 755 so I changed to 777 after that showing page
> much faster. This changing permission cosing this issue?
>
>
> Please someone advice!
>
> Thanks
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: routes.php - getting missing controller issue

2010-02-10 Thread leafchild book
Thanks Chad,

I tried but still couldn't do it.
It seems like I have to modify .htaccess file.



On Wed, Jan 27, 2010 at 5:11 AM, Chad Smith  wrote:

> Hey Leaf,
>
> We've done a lot of rewriting with our sites and mainly with
> http://theeasyapi.com, and http://www.countycriminal.com.  One thing
> that I have found is that you must always use the controller name in
> the URL even when you are rewriting which controller picks it up.
>
> In your example I would use instead of /hp/12345 I would use /users/
> 12345 ... try that and see if you get a valid result.  Like I said I
> know it's not the best approach as you obviously want to have /hp/ = /
> homepage/ but sometimes there are just a few things that just don't
> work in cake for some reason.
>
> The other thing you COULD do is a custom modification in
> your .htaccess.  Change your routes to look for /homepage/ but then in
> your .htaccess put a rewrite rule in there to convert /hp/ to /
> homepage/ so the URL at the top stays the same but it does pass in /
> homepage/ instead.  Keeps the same look and feel but does break the
> "cakeified" mentality.
>
> It's up to you and check out http://theeasyapi.com you can see a live
> site where we rewrite URL's and do a lot of really interesting things
> with our routes file.
>
> Have a wonderful day,
> Chad
>
> On Jan 26, 5:43 am, leafchild  wrote:
> > circket, thank you for the replay.
> >
> > actually i set to 'id'=>'[0-9a-zA-Z]+' in the beginning but make it
> > simple since nothing was working for me.
> >
> > code below gives me a "Missing controller error" it say I don't have a
> > Hp Controller
> > =
> > Router::connect('/hp/:id/', array(
> >  'controller' => 'users',
> >  'action' => 'homepage',
> >  ), array(
> > 'id'=>'[0-9a-zA-Z]', 'pass'=>'id'
> > ));
> > =
> >
> > then if i have this code then it bring  to home page
> > =
> > Router::connect('/hp/:id/', array(
> >  'controller' => 'users',
> >  'action' => 'homepage',
> >  ), array(
> > 'id'=>'[0-9a-zA-Z]+', 'pass'=>'id'
> > ));
> > =
> >
> > What am I missing?
> >
> > On Jan 25, 5:08 pm, cricket  wrote:
> >
> > > What does the error msg say? That UsersController is missing, or
> > > something else?
> >
> > > Are your usernames limited to lowercase letters only and no digits?
> >
> > > And you might want to pass the ID to your action:
> >
> > > Router::connect(
> > > '/hp/:id/',
> > > array('controller' => 'users', 'action' => 'homepage'),
> > > array('id'=>'[a-z]', 'pass' => 'id')
> > > );
> >
> > > On Jan 25, 5:19 pm, leafchild  wrote:
> >
> > > > I'm tring to fix URL
> >
> > > >www.mysite.com/users/homepage/{user's login name}
> > > > ->www.mysite.com/{user's login name}
> >
> > > > but I couldn't figure it out so I'm tesing with this
> firstwww.mysite.com/users/homepage/{user's login name}
> > > > ->www.mysite.com/hp/{user's login name}
> >
> > > > Router::connect('/hp/:id/', array( 'controller' => 'users',  'action'
> > > > => 'homepage', ),
> > > >   array('id'=>'[a-z]',  )
> > > >);
> >
> > > > then when I access, mysite.com/hp/{user's login name}, I'm getting a
> > > > missing controller error.
> >
> > > > What I'm I doing wrong? I was expected to see the page with this URL.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: secure link using hmtl->link helper..

2009-09-27 Thread leafchild book
I have also same issue.
I tried "base"

'base'=>'https', 'base'=>'https:' and 'base'=>'https://' and

echo $html->link('billing',
array('base'=>'https:','controller'=>'/customers/billing_and_shipping'));

then link is looks like this
billing


I also tried "bare" but I didn't see any different wiht/without it.

Also I tried "full_base" and not working.

How can I have link to https url??
Is there other way not using $html->link helper ?




On Fri, Sep 25, 2009 at 10:15 AM, iFeghali  wrote:

>
> Anyone found the solution ? I am on the same boat.
>
> Best,
> ~IF.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pagination URL - how can I keep "id" in URL

2009-08-25 Thread leafchild book
cool thanks Miles. Now my pagination is working !
On Tue, Aug 25, 2009 at 12:59 AM, Miles J  wrote:

>
> Pass the arguments to the paginator.
>
> http://book.cakephp.org/view/166/Pagination-in-Views
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Paginate limit setting

2009-08-23 Thread leafchild book
Thanks brian :)
l

On Fri, Aug 21, 2009 at 3:43 AM, brian  wrote:

>
> Set the limit at 8 as normal and override it in the admin action:
>
> $this->paginate['YOUR_MODEL']['limit'] = 50;
>
> On Fri, Aug 21, 2009 at 5:30 AM, leafchild
> wrote:
> >
> > I have admin page (admin_view.ctp) and public page(view.ctp) in one
> > controller.
> >
> > In admin page, I want to list 50 products in each page but in public
> > page, I want to show 8 products every page.
> > How can I set limit number for paginate to each function in same
> > controller??
> >
> > I can't use "var $paginate = array('limit' => 8);" because this code
> > effect to admin_view page.
> >
> >
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Uploading file issue - worning mkdir()

2009-08-11 Thread leafchild book
I'm trying to upload to /webroot/img/uploads/
both /img and /uploads directory has permission 777
and getting an error: Warning (2): mkdir()
[function.mkdir]: Permission denied [CORE/cake/libs/folder.php, line
466]
so I commented out line 466 ~ 476 in folder.php file:
/*
if (mkdir($pathname, $mode)) {
umask($old);
$this->__messages[] = sprintf(__('%s created', true), $pathname);
return true;
} else {
umask($old);
$this->__errors[] = sprintf(__('%s NOT created', true), $pathname);
return false;
}
*/
then everything working ok.

I wander doing this causing any other issue?






On Tue, Aug 11, 2009 at 10:54 AM, brian  wrote:

>
> Don't set the permissions wide open for webroot dir! That's not a good
> idea at all.
>
> What is the full path of the directory you want to upload to?
>
> I'm sorry, I'm not familiar with the plugin and don't understand your
> other question about the data.
>
> On Tue, Aug 11, 2009 at 4:06 AM, leafchild
> wrote:
> >
> > The uploaded img directory permission is set to 777 and just in case I
> > even changed webroot permission to 777
> > but I'm still seeing  same warning message. Where else I need to
> > check?
> >
> > Also how can I stop update with entire file data to database?
> >
> > after trying to upload file debug show:
> > ==
> > [id] =>1
> > [uploadfile] => Array
> >   (
> >   [name] => IMG_0801.JPG
> >   [type] => image/jpeg
> >   [tmp_name] => /tmp/phpbo9DjW
> >   [error] => 0
> >   [size] => 404887
> >   )
> > [desc] =>
> > ...
> > ===
> >
> > uploadfile field needs only file name but looking at sql trying to
> > update
> > filed with file array information.
> >
> >
> >
> >
> >
> >
> > On Aug 7, 6:24 pm, brian  wrote:
> >> Check the permissions for the directory. The webserver has to have
> >> write access to the dir.
> >>
> >>
> >>
> >> On Fri, Aug 7, 2009 at 4:02 PM,leafchild
> wrote:
> >>
> >> > I'm trying to make this plugin(http://www.milesj.me/resources/script/
> >> > uploader-plugin) works.
> >>
> >> > However, after I install I'm getting an error - Warning (2): mkdir()
> >> > [function.mkdir]: Permission denied [CORE/cake/libs/folder.php, line
> >> > 466]
> >> > Actually I tried another behavior to upload file and got same error.
> >> > Do  I need to do some kind of server setting? I'm using MT(dv)
> >>
> >> > Also after submit to upload file I'm getting an SQL error because data
> >> > need to be one but it try to update entire file data:
> >>
> >> > ==
> >> > [id] =>1
> >> > [uploadfile] => Array
> >> >   (
> >> >   [name] => IMG_0801.JPG
> >> >   [type] => image/jpeg
> >> >   [tmp_name] => /tmp/phpbo9DjW
> >> >   [error] => 0
> >> >   [size] => 404887
> >> >   )
> >> > [desc] =>
> >> > ...
> >> > ===
> >> > "uplodefile" 's data is not array just [NAME] of file.
> >>
> >> > How can I stop doing it? I can't use "$this->Landing->save($this-
> >> >>data)" if I have file uploading?
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How can I leave entered value even there is an errro and couldn't complete

2009-08-11 Thread leafchild book
Hi anurag,
You are saying I have to get POST data manually instead of using validation
($this->Customer->validates())?
If I set id, then all the new information is replace back with old
information when coming back page with errors.


Hi brian,
I didn't use Containable, only I do is when I get data I set recursive=6 so
I get all related information,
but this recursive stop working after  coming back to page with errors. How
can I still make recursive active
so I don't get an  "Undefined index" page.


Thanks,
leafchild



On Tue, Aug 11, 2009 at 8:56 AM, brian  wrote:

>
> I can't follow all of that but it seems like you'd be better off using
> Containable.
>
> On Tue, Aug 11, 2009 at 5:06 AM, leafchild
> wrote:
> >
> > Yes, I use $form->input()
> >
> > I found an issue because I was SQL again for the specific data before
> > going back to the page to show user an errors.
> > (I had an code like this that's why I couldn't keep the entered value
> > when there is an error.
> > ===
> > function admin_edit(id = null){
> > if (!empty($this->data)) {
> >...
> > $this->data = $this->Customer->read(null, $id);
> > }
> > if (empty($this->data)) {
> > ...
> >  $this->data = $this->Customer->read(null, $id);
> >  }
> >
> > }
> > ===
> > I took out the line "$this->data = $this->Customer->read(null, $id);"
> > in  "if (!empty($this->data))" statement now I can keep the entered
> > value when there is an error.
> > However, now I have an other issue.
> >
> > In this admin/customers/edit page, I need to set "$this->Customer-
> >>recursive = 6;" to get all kind of information relates to Customer
> > from other table.
> > Either coming back with an error or success updating information(I
> > want to page to back to edit page not index page after "save"),
> > I get "Undefined index" error everywhere in this page because after
> > coming back to page, $this->data has only the information model show
> > relationship(I think,,, I have 4 "has one" relationship in this model
> > (Customer) and only those information is available from $this->data
> > after submit)
> >
> > How can I get "$this->data" has "recursive = 6" data to avoid getting
> > "undefined index" error?
> >
> >
> > thanks,
> > leafchild
> >
> >
> >
> >
> >
> >
> > On Aug 7, 6:22 pm, brian  wrote:
> >> Are you using FormHelper to create your form elements? If you do, for
> example:
> >>
> >> echo $form->input('Post')
> >>
> >> ... the helper will add the value of the element based upon $this->data.
> >>
> >> If you are using the helper, maybe you should post your controller and
> >> view code.
> >>
> >>
> >>
> >> On Fri, Aug 7, 2009 at 6:56 PM,leafchild
> wrote:
> >>
> >> > I have a page with form.
> >>
> >> > If user entered name, address,,,and ,all kinds of information and
> >> > submit but there is mistakes such as not entered email
> >> > properly and came back to form page with error message. How can I keep
> >> > the entered value user entered properly.
> >>
> >> > Currently in my form page, if user has an error, all the entered value
> >> > are gone and user has to entered everything.
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Uploading file issue - worning mkdir()

2009-08-11 Thread leafchild book
Hi Anurag,
Thank you for the comment.

Where is your upload file directory?
Is still in webroot?

Thanks,
leafchild


On Tue, Aug 11, 2009 at 1:43 AM, anurag pal wrote:

> Hi,
>
> I have the same issue. I found that its using different path for
> uploading file.
>
> For stopping details to database just first upload the file and then
> insert or update record in database.
>
> If you can provide the source code it would be better to diagnose the
> problem.
>
> Regards,
> Anurag Pal
>
> On Aug 11, 1:06 pm, leafchild  wrote:
> > The uploaded img directory permission is set to 777 and just in case I
> > even changed webroot permission to 777
> > but I'm still seeing  same warning message. Where else I need to
> > check?
> >
> > Also how can I stop update with entire file data to database?
> >
> > after trying to upload file debug show:
> > ==
> > [id] =>1
> > [uploadfile] => Array
> >(
> >[name] => IMG_0801.JPG
> >[type] => image/jpeg
> >[tmp_name] => /tmp/phpbo9DjW
> >[error] => 0
> >[size] => 404887
> >)
> > [desc] =>
> > ...
> > ===
> >
> > uploadfile field needs only file name but looking at sql trying to
> > update
> > filed with file array information.
> >
> > On Aug 7, 6:24 pm, brian  wrote:
> >
> > > Check the permissions for the directory. The webserver has to have
> > > write access to the dir.
> >
> > > On Fri, Aug 7, 2009 at 4:02 PM,leafchild
> wrote:
> >
> > > > I'm trying to make this plugin(
> http://www.milesj.me/resources/script/
> > > > uploader-plugin) works.
> >
> > > > However, after I install I'm getting an error - Warning (2): mkdir()
> > > > [function.mkdir]: Permission denied [CORE/cake/libs/folder.php, line
> > > > 466]
> > > > Actually I tried another behavior to upload file and got same error.
> > > > Do  I need to do some kind of server setting? I'm using MT(dv)
> >
> > > > Also after submit to upload file I'm getting an SQL error because
> data
> > > > need to be one but it try to update entire file data:
> >
> > > > ==
> > > > [id] =>1
> > > > [uploadfile] => Array
> > > >   (
> > > >   [name] => IMG_0801.JPG
> > > >   [type] => image/jpeg
> > > >   [tmp_name] => /tmp/phpbo9DjW
> > > >   [error] => 0
> > > >   [size] => 404887
> > > >   )
> > > > [desc] =>
> > > > ...
> > > > ===
> > > > "uplodefile" 's data is not array just [NAME] of file.
> >
> > > > How can I stop doing it? I can't use "$this->Landing->save($this-
> > > >>data)" if I have file uploading?
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: URL some page .../id disappeared ?

2009-08-09 Thread leafchild book
thanks you, euromark (munich) and JamesF
My form was
create('Product', array('action'=>'admin_edit'));?>

That's why causing wired error. After I changed to
create('ProProduct', array('action'=>'edit'));?>

everything went to fine :)


*
*
*
*
*
*
*
*
On Sat, Aug 8, 2009 at 6:53 PM, euromark (munich) <
dereurom...@googlemail.com> wrote:

>
> as i said, i would go with JUST "url"=>"/".$this->params['url]['url']
> in this case there is no need to use "action" or the manually built
> url like james suggested
>
> be aware of the "/" in front of it though (otherwise the url is not
> built correctly)
>
>
> On 9 Aug., 02:06, JamesF  wrote:
> > make sure you $form->create is submitting to the id as a parameter as
> > well
> >
> > echo $form->create('FormName', array('url'=>array
> > ('controller'=>'myController', 'action'=>'myAction', $id,
> > 'admin'=>true)));
> >
> > On Aug 7, 7:13 pm, leafchild  wrote:
> >
> > > URL some page  .../id disappeared ?
> >
> > > I have site there are different form pages to organize products.
> >
> > > Some form page such as admin_edit page - URL:  ... admin/product/edit/
> > > 1
> > > After I submit URL still same either there is an error or not.
> >
> > > However, some form page lose id from URL after submit,
> > > and showing index error.
> >
> > > for example, URL: ...admin/category/customer/edit/1 -> ...admin/
> > > category/customer/edit
> > > ==
> > > if (!empty($this->data)) {
> > >// empty}
> >
> > > ==
> > > I deleted all the code inside of if statement for taking care of
> > > submitting data.
> > > The one keep same URL doesn't show error but other does.
> >
> > > Not sure difference between these two has.
> > > I don't know why? Does anyone know what's the issue?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---