Re: any way to omit app/webroot when request image file or directory inside it

2011-02-25 Thread mohammad Al-Ani
thanks for all but i stile looking for some settings or code to solve that

On 25 February 2011 16:40, mohammad Al-Ani  wrote:

> thanks Miles J
>
> But on top of that, anyone can see that you are sing Cake by checking
>> your form structure, or that you are using named params.
>
>
> I already get over that by using $this->params['form'] to get the data from
> users
>
> On 24 February 2011 21:30, Miles J  wrote:
>
>> You can try setting up some apache mod_rewrite rules.
>>
>> But on top of that, anyone can see that you are sing Cake by checking
>> your form structure, or that you are using named params.
>>
>> On Feb 24, 9:52 am, mohammad Al-Ani  wrote:
>> > hi all..
>> >
>> > hope you do well
>> >
>> > I use cakephp from along and I faced a problem that I think it's a
>> security
>> > issue
>> >
>> > when I request any file or directory that settle inside webroot
>> directory.
>> > The URL automatically show the app/wedroot slug
>> >
>> > ex:
>> >
>> > request
>> >
>> >* *www.mydomian.com/css/main.css
>> >
>> > change in browser to
>> >
>> >www.mydomian.com/*app/webroot*/css/main.css
>> >
>> > I thing this shows up that I used cakephp. and I find it unprofessional
>> way
>> > to leave such behavior
>> >
>> > any suggestions, idea...
>> >
>> > thanks for your time : )
>>
>> --
>> 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: any way to omit app/webroot when request image file or directory inside it

2011-02-25 Thread mohammad Al-Ani
thanks Miles J

But on top of that, anyone can see that you are sing Cake by checking
> your form structure, or that you are using named params.


I already get over that by using $this->params['form'] to get the data from
users

On 24 February 2011 21:30, Miles J  wrote:

> You can try setting up some apache mod_rewrite rules.
>
> But on top of that, anyone can see that you are sing Cake by checking
> your form structure, or that you are using named params.
>
> On Feb 24, 9:52 am, mohammad Al-Ani  wrote:
> > hi all..
> >
> > hope you do well
> >
> > I use cakephp from along and I faced a problem that I think it's a
> security
> > issue
> >
> > when I request any file or directory that settle inside webroot
> directory.
> > The URL automatically show the app/wedroot slug
> >
> > ex:
> >
> > request
> >
> >* *www.mydomian.com/css/main.css
> >
> > change in browser to
> >
> >www.mydomian.com/*app/webroot*/css/main.css
> >
> > I thing this shows up that I used cakephp. and I find it unprofessional
> way
> > to leave such behavior
> >
> > any suggestions, idea...
> >
> > thanks for your time : )
>
> --
> 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


any way to omit app/webroot when request image file or directory inside it

2011-02-24 Thread mohammad Al-Ani
hi all..

hope you do well

I use cakephp from along and I faced a problem that I think it's a security
issue

when I request any file or directory that settle inside webroot directory.
The URL automatically show the app/wedroot slug

ex:

request

   * *www.mydomian.com/css/main.css

change in browser to

www.mydomian.com/*app/webroot*/css/main.css

I thing this shows up that I used cakephp. and I find it unprofessional way
to leave such behavior

any suggestions, idea...


thanks for your time : )

-- 
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: Dreamweaver - Getting Code Coloring and Design View to work on CTP files

2009-02-07 Thread mohammad al-ani
hi i found it in notepad++ just open langs.xml in installation directory and
search for the php word and you will get the language node like this



add the extension ctp in the extension attribute like this



and have cool programming : )

On Sat, Feb 7, 2009 at 11:45 PM, mohammad al-ani
wrote:

> thank you for this powerful tip. and I hope to get a same as it to coloring
> ctp file with notepad++
>
>
> On Sat, Feb 7, 2009 at 9:19 PM, Leonard Teo  wrote:
>
>>
>> Just adding here so that others can find the information later
>>
>> If you use Dreamweaver, by default, you'll find that you can't fire up
>> your views in the code or design views. Using Dreamweaver preferences,
>> you can set it up so that Dreamweaver will load the file but you will
>> not get code coloring, and you will not be able to preview it in
>> design view.
>>
>> This tip will give you the best of both:
>> - View CTP and THTML files in code view with PHP syntax coloring
>> - View CTP and THTML files in Design view
>>
>>
>> Adobe Knowledge Base
>> http://www.adobe.com/go/tn_16410
>>
>>
>> You edit two files:
>> 1. Extensions.txt - On Vista, this is in your USER directory, NOT the
>> one in the main Dreamweaver directory.
>>
>> E.g.:
>> C:\Users\[Your Username]\AppData\Roaming\Adobe\Dreamweaver CS4\en_US
>> \Configuration
>>
>> Edit the first line that defines all the documents.
>> Add, ",CTP,THTML" before  ":All Documents"  (note the capital letters)
>>
>> Find the PHP line and add ",CTP,THTML" before ":PHP Files"
>>
>> Save
>>
>> 2. MMDocumentTypes.xml
>> is here: C:\Program Files\Adobe\Adobe Dreamweaver CS4\configuration
>> \DocumentTypes
>>
>> If you try to edit this on Vista, it will say that you don't have
>> permission - right click on the file, set the security permissions to
>> allow you to edit it.
>>
>> Search for ">
>> On this line, there are two parameters:
>> winfileextension="php,php3,php4,php5"
>> - Add ",ctp,thtml" to this parameter
>>
>> macfileextension="php,php3,php4,php5"
>> - Add ",ctp,thtml" to this parameter
>>
>> Save
>>
>> Restart Dreamweaver
>>
>> You'll now notice that your *.ctp files have an icon and isn't a blank
>> white file. You can double click on them and they will open up, and
>> you can view it in Design view.
>>
>>
>>
>> Enjoy,
>>
>> Leo
>>
>>
>>
>>
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: Dreamweaver - Getting Code Coloring and Design View to work on CTP files

2009-02-07 Thread mohammad al-ani
thank you for this powerful tip. and I hope to get a same as it to coloring
ctp file with notepad++

On Sat, Feb 7, 2009 at 9:19 PM, Leonard Teo  wrote:

>
> Just adding here so that others can find the information later
>
> If you use Dreamweaver, by default, you'll find that you can't fire up
> your views in the code or design views. Using Dreamweaver preferences,
> you can set it up so that Dreamweaver will load the file but you will
> not get code coloring, and you will not be able to preview it in
> design view.
>
> This tip will give you the best of both:
> - View CTP and THTML files in code view with PHP syntax coloring
> - View CTP and THTML files in Design view
>
>
> Adobe Knowledge Base
> http://www.adobe.com/go/tn_16410
>
>
> You edit two files:
> 1. Extensions.txt - On Vista, this is in your USER directory, NOT the
> one in the main Dreamweaver directory.
>
> E.g.:
> C:\Users\[Your Username]\AppData\Roaming\Adobe\Dreamweaver CS4\en_US
> \Configuration
>
> Edit the first line that defines all the documents.
> Add, ",CTP,THTML" before  ":All Documents"  (note the capital letters)
>
> Find the PHP line and add ",CTP,THTML" before ":PHP Files"
>
> Save
>
> 2. MMDocumentTypes.xml
> is here: C:\Program Files\Adobe\Adobe Dreamweaver CS4\configuration
> \DocumentTypes
>
> If you try to edit this on Vista, it will say that you don't have
> permission - right click on the file, set the security permissions to
> allow you to edit it.
>
> Search for "
> On this line, there are two parameters:
> winfileextension="php,php3,php4,php5"
> - Add ",ctp,thtml" to this parameter
>
> macfileextension="php,php3,php4,php5"
> - Add ",ctp,thtml" to this parameter
>
> Save
>
> Restart Dreamweaver
>
> You'll now notice that your *.ctp files have an icon and isn't a blank
> white file. You can double click on them and they will open up, and
> you can view it in Design view.
>
>
>
> Enjoy,
>
> Leo
>
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: utf-8 encoding problem

2009-02-03 Thread mohammad al-ani
Dr. Loboto all of my pages encoded with utf-8 and the problem is not in my
page the problem is with the firefox and everything go perfect with IE

see my last reply to Webweave

On Tue, Feb 3, 2009 at 6:50 AM, Dr. Loboto  wrote:

>
> Mohammad Al-Ani, you really found your real problem - your page is not
> UTF-8 page! %xx form is url-encoded non-ANSI string as only 7-bit
> symbols can be used in URLs. That's why browers encode non-ANSI
> symbols and then they are automatically decoded by Cake before go into
> params. Some of browsers show encoded string in address bar and you
> see %xx string, some - not encoded and you see "real word". Word %E3%DE
> %C7%E1 you saw in Firefox is wrong word, possibly encoded using
> windows-1256 as you indicated above. But Cake expects UTF-8, and "real
> word" in url-encoded form should looks like %D9%85%D9%82%D8%A7%D9%84
>
> Correct all your pages encodings to UTF-8 and problem will go away!
>
> On Feb 3, 1:21 am, mohammad al-ani  wrote:
> > thank you Dr. Loboto but i find the real problem.
> >
> > i develop the site under firefox so if i use the internet explorer i can
> get
> > the arabic word like it it but when i use the firefox and search for word
> > like مقال the address of firefox will be
> >
> > /search?keyword=مقال
> >
> > and when i just confirm this link by press enter on it the firefox
> converted
> > the link to
> >
> > http://www.localhost.com/alsameriae/search?keyword=%E3%DE%C7%E1
> >
> > which will cuase the problem so is there any way to check form the
> encoding
> > type
> >
> > On Mon, Feb 2, 2009 at 6:38 AM, Dr. Loboto  wrote:
> >
> > > Your problem is caused by wrong page encoding. Follow Marcelo Andrade
> > > checklist to eliminate wrong encoding on all steps. Everywhere should
> > > be UTF-8 and URL will be in UTF-8 too. Or you use some unknown really
> > > stupid browser that can't handle UTF-8 at all - but I can't imagine
> > > such a browser in present time.
> >
> > > On Feb 1, 3:02 pm, mohammad al-ani  wrote:
> > > > thank you all for your time and help
> >
> > > > but my problem actually is caused by the browser . he send the url
> query
> > > to
> > > > the cakephp in the form of ANSI and i configure the cake and the
> header
> > > of
> > > > generated page to use the utf-8 so the quastion is how to change the
> > > recived
> > > > ansi data to the utf-8 data> it's not about notpad++ it's about
> dynamic
> > > read
> > > > write data
> >
> > > > On Fri, Jan 30, 2009 at 6:54 PM, Marcelo Andrade <
> mfandr...@gmail.com
> > > >wrote:
> >
> > > > > On Thu, Jan 29, 2009 at 7:18 PM, medo 
> > > wrote:
> > > > > > (..)
> >
> > > > > This is a very common issue.  Just follow this checklist:
> >
> > > > > 1. Using a smart editor (for Windows: Notepad++, Textpad, ...; for
> > > > > Gnu/Linux: Gedit,
> > > > > Kedit, Geany, Kate, Vim...), be sure that all of your .php and .ctp
> > > > > files are saved
> > > > > with the UTF-8 (without BOM) encoding;
> >
> > > > > 2. Be sure that your webserver is configured to serve the pages in
> > > > > UTF-8 encoding
> > > > > (in Apache, the line 'AddDefaultCharset UTF-8' in your httpd.conf);
> >
> > > > > 3. Be sure that your database tables are configured with the UTF-8
> > > encoding
> > > > > (in
> > > > > MySql, create your tables with the proper collation option);
> >
> > > > > 4. In the very last case, if the problem still persists and your
> are a
> > > > > really paranoid,
> > > > > change the PHP interpreter encoding in your php.ini.
> >
> > > > > Best regards.
> >
> > > > > --
> > > > > MARCELO DE F. ANDRADE (aka "eleKtron")
> > > > > Belem, PA, Amazonia, Brazil
> > > > > Linux User #221105
> >
> > > > > [...@pará ~]# linkshttp://pa.slackwarebrasil.org/
> >
> > > > > For Libby's backstory be told on Lost
> > > > >http://www.petitiononline.com/libby423/petition.html
> >
>

--~--~-~--~~~---~--~~
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: utf-8 encoding problem

2009-02-03 Thread mohammad al-ani
Webweave i didn't know how to explain my problem well because of my poor
English but to know what i mean with my problem just open your tiny url

http://tinyurl.com/b8fl58

and with that the firefox request will be in the utf-8 encoding but if you
click on the firefox address bar and press enter to re-request the page the
firefox will encode the مقال word to the %E3%DE%C7%E1 which is encoded with
the windows-1256 encoding . so is there anyway to know the encoding of the
comming data from the firefox, any function any script for that.

and thank you again .

On Tue, Feb 3, 2009 at 12:02 AM, Webweave  wrote:

>
> Well, that to me would seem to mean that you are indeed trying to
> access the page from a page that is not defined as UTF-8.
>
> From Firefox, if I type مقال into the Google search box, I get a
> return search of
> http://www.google.com/search?q=مقال&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a<http://www.google.com/search?q=%D9%85%D9%82%D8%A7%D9%84&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a>
>
> So wherever you are inputting the string, it is getting translated
> incorrectly (which to me means it's not UTF-8).
>
> See: http://tinyurl.com/b8fl58
>
> If you load up Firebug, you should be able to look at the Response
> headers and see the Content-Type of text/html; charset=UTF-8
>
>
> On Feb 2, 11:21 am, mohammad al-ani  wrote:
> > thank you Dr. Loboto but i find the real problem.
> >
> > i develop the site under firefox so if i use the internet explorer i can
> get
> > the arabic word like it it but when i use the firefox and search for word
> > like مقال the address of firefox will be
> >
> > /search?keyword=مقال
> >
> > and when i just confirm this link by press enter on it the firefox
> converted
> > the link to
> >
> > http://www.localhost.com/alsameriae/search?keyword=%E3%DE%C7%E1
> >
> > which will cuase the problem so is there any way to check form the
> encoding
> > type
> >
> > On Mon, Feb 2, 2009 at 6:38 AM, Dr. Loboto  wrote:
> >
> > > Your problem is caused by wrong page encoding. Follow Marcelo Andrade
> > > checklist to eliminate wrong encoding on all steps. Everywhere should
> > > be UTF-8 and URL will be in UTF-8 too. Or you use some unknown really
> > > stupid browser that can't handle UTF-8 at all - but I can't imagine
> > > such a browser in present time.
> >
> > > On Feb 1, 3:02 pm, mohammad al-ani  wrote:
> > > > thank you all for your time and help
> >
> > > > but my problem actually is caused by the browser . he send the url
> query
> > > to
> > > > the cakephp in the form of ANSI and i configure the cake and the
> header
> > > of
> > > > generated page to use the utf-8 so the quastion is how to change the
> > > recived
> > > > ansi data to the utf-8 data> it's not about notpad++ it's about
> dynamic
> > > read
> > > > write data
> >
> > > > On Fri, Jan 30, 2009 at 6:54 PM, Marcelo Andrade <
> mfandr...@gmail.com
> > > >wrote:
> >
> > > > > On Thu, Jan 29, 2009 at 7:18 PM, medo 
> > > wrote:
> > > > > > (..)
> >
> > > > > This is a very common issue.  Just follow this checklist:
> >
> > > > > 1. Using a smart editor (for Windows: Notepad++, Textpad, ...; for
> > > > > Gnu/Linux: Gedit,
> > > > > Kedit, Geany, Kate, Vim...), be sure that all of your .php and .ctp
> > > > > files are saved
> > > > > with the UTF-8 (without BOM) encoding;
> >
> > > > > 2. Be sure that your webserver is configured to serve the pages in
> > > > > UTF-8 encoding
> > > > > (in Apache, the line 'AddDefaultCharset UTF-8' in your httpd.conf);
> >
> > > > > 3. Be sure that your database tables are configured with the UTF-8
> > > encoding
> > > > > (in
> > > > > MySql, create your tables with the proper collation option);
> >
> > > > > 4. In the very last case, if the problem still persists and your
> are a
> > > > > really paranoid,
> > > > > change the PHP interpreter encoding in your php.ini.
> >
> > > > > Best regards.
> >
> > > > > --
> > > > > MARCELO DE F. ANDRADE (aka "eleKtron")
> > > > > Belem, PA, Amazonia, Brazil
> > > > > Linux User #221105
> >
> > > > > [...@pará ~]# linkshttp://pa.slackwarebrasil.org/
> >
> > > > > For Libby's backstory be told on Lost
> > > > >http://www.petitiononline.com/libby423/petition.html
> >
> >
> >
>

--~--~-~--~~~---~--~~
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: utf-8 encoding problem

2009-02-02 Thread mohammad al-ani
thank you Dr. Loboto but i find the real problem.

i develop the site under firefox so if i use the internet explorer i can get
the arabic word like it it but when i use the firefox and search for word
like مقال the address of firefox will be

/search?keyword=مقال

and when i just confirm this link by press enter on it the firefox converted
the link to

http://www.localhost.com/alsameriae/search?keyword=%E3%DE%C7%E1

which will cuase the problem so is there any way to check form the encoding
type


On Mon, Feb 2, 2009 at 6:38 AM, Dr. Loboto  wrote:

>
> Your problem is caused by wrong page encoding. Follow Marcelo Andrade
> checklist to eliminate wrong encoding on all steps. Everywhere should
> be UTF-8 and URL will be in UTF-8 too. Or you use some unknown really
> stupid browser that can't handle UTF-8 at all - but I can't imagine
> such a browser in present time.
>
> On Feb 1, 3:02 pm, mohammad al-ani  wrote:
> > thank you all for your time and help
> >
> > but my problem actually is caused by the browser . he send the url query
> to
> > the cakephp in the form of ANSI and i configure the cake and the header
> of
> > generated page to use the utf-8 so the quastion is how to change the
> recived
> > ansi data to the utf-8 data> it's not about notpad++ it's about dynamic
> read
> > write data
> >
> > On Fri, Jan 30, 2009 at 6:54 PM, Marcelo Andrade  >wrote:
> >
> >
> >
> > > On Thu, Jan 29, 2009 at 7:18 PM, medo 
> wrote:
> > > > (..)
> >
> > > This is a very common issue.  Just follow this checklist:
> >
> > > 1. Using a smart editor (for Windows: Notepad++, Textpad, ...; for
> > > Gnu/Linux: Gedit,
> > > Kedit, Geany, Kate, Vim...), be sure that all of your .php and .ctp
> > > files are saved
> > > with the UTF-8 (without BOM) encoding;
> >
> > > 2. Be sure that your webserver is configured to serve the pages in
> > > UTF-8 encoding
> > > (in Apache, the line 'AddDefaultCharset UTF-8' in your httpd.conf);
> >
> > > 3. Be sure that your database tables are configured with the UTF-8
> encoding
> > > (in
> > > MySql, create your tables with the proper collation option);
> >
> > > 4. In the very last case, if the problem still persists and your are a
> > > really paranoid,
> > > change the PHP interpreter encoding in your php.ini.
> >
> > > Best regards.
> >
> > > --
> > > MARCELO DE F. ANDRADE (aka "eleKtron")
> > > Belem, PA, Amazonia, Brazil
> > > Linux User #221105
> >
> > > [...@pará ~]# linkshttp://pa.slackwarebrasil.org/
> >
> > > For Libby's backstory be told on Lost
> > >http://www.petitiononline.com/libby423/petition.html
> >
>

--~--~-~--~~~---~--~~
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: utf-8 encoding problem

2009-02-01 Thread mohammad al-ani
thank you all for your time and help

but my problem actually is caused by the browser . he send the url query to
the cakephp in the form of ANSI and i configure the cake and the header of
generated page to use the utf-8 so the quastion is how to change the recived
ansi data to the utf-8 data> it's not about notpad++ it's about dynamic read
write data

On Fri, Jan 30, 2009 at 6:54 PM, Marcelo Andrade wrote:

>
> On Thu, Jan 29, 2009 at 7:18 PM, medo  wrote:
> > (..)
>
> This is a very common issue.  Just follow this checklist:
>
> 1. Using a smart editor (for Windows: Notepad++, Textpad, ...; for
> Gnu/Linux: Gedit,
> Kedit, Geany, Kate, Vim...), be sure that all of your .php and .ctp
> files are saved
> with the UTF-8 (without BOM) encoding;
>
> 2. Be sure that your webserver is configured to serve the pages in
> UTF-8 encoding
> (in Apache, the line 'AddDefaultCharset UTF-8' in your httpd.conf);
>
> 3. Be sure that your database tables are configured with the UTF-8 encoding
> (in
> MySql, create your tables with the proper collation option);
>
> 4. In the very last case, if the problem still persists and your are a
> really paranoid,
> change the PHP interpreter encoding in your php.ini.
>
> Best regards.
>
> --
> MARCELO DE F. ANDRADE (aka "eleKtron")
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> [...@pará ~]# links http://pa.slackwarebrasil.org/
>
> For Libby's backstory be told on Lost
> http://www.petitiononline.com/libby423/petition.html
>
> >
>

--~--~-~--~~~---~--~~
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: utf-8 encoding problem

2009-01-30 Thread mohammad al-ani
please any suggestions

On Fri, Jan 30, 2009 at 10:48 AM, mohammad al-ani
wrote:

> and when i choose the windows-1256 i see the real world which is مقال
>
>
> On Fri, Jan 30, 2009 at 10:23 AM, mohammad al-ani <
> alani.moham...@gmail.com> wrote:
>
>> params show me the value of the key 'keyword' is  yes like this
>> symbols
>>
>>
>> On Fri, Jan 30, 2009 at 2:48 AM, brian  wrote:
>>
>>>
>>> What does $this->params show you?
>>>
>>> On Thu, Jan 29, 2009 at 5:18 PM, medo  wrote:
>>> >
>>> > hi group,
>>> >
>>> > i have problem with my search feature in my site the problem is when i
>>> > use the search page to search for an Arabic word with the form get
>>> > method. and i faced that problem in the prototype below
>>> >
>>> >>>>>>>>>> search_controller.php  <<<<<<<<<<
>>> >
>>> > >> >
>>> > class SearchController extends AppController {
>>> >  var $name='Search';
>>> >  var $uses=array('Article');
>>> >
>>> >  function index(){
>>> >$this->layout='page';
>>> >if (isset($_GET['keyword'])) {
>>> >  $this->set('articles',$this->Article->find('all',array
>>> > ('conditions'=>array('Article.body like'=>'%'.base64_decode($_GET
>>> > ['keyword']).'%';
>>> >  $this->set('keyword',$_GET['keyword']);
>>> >  $this->data['Search']['keyword']=urlencode(base64_decode($_GET
>>> > ['keyword']));
>>> >}
>>> >  }
>>> > }
>>> >
>>> > ?>
>>> >
>>> >>>>>>>>>> index.ctp  <<<<<<<<<<
>>> >
>>> > create(null,array('type'=>'get','url'=>'/search'))); ?>
>>> > input('Search.keyword',array('label'=>'الكلمة المراد
>>> > البحث عنها'))); ?>
>>> > end('ابحث'));?>
>>> > 
>>> > نتائج البحث عن 
>>> >
>>> > 
>>> >
>>> > and i use utf-8 for the layout.
>>> >
>>> > the problem is that the result of echoing $keyword is '' why that and
>>> > how to solve that
>>> > >
>>> >
>>>
>>> >>>
>>>
>>
>

--~--~-~--~~~---~--~~
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: utf-8 encoding problem

2009-01-29 Thread mohammad al-ani
and when i choose the windows-1256 i see the real world which is مقال

On Fri, Jan 30, 2009 at 10:23 AM, mohammad al-ani
wrote:

> params show me the value of the key 'keyword' is  yes like this symbols
>
>
> On Fri, Jan 30, 2009 at 2:48 AM, brian  wrote:
>
>>
>> What does $this->params show you?
>>
>> On Thu, Jan 29, 2009 at 5:18 PM, medo  wrote:
>> >
>> > hi group,
>> >
>> > i have problem with my search feature in my site the problem is when i
>> > use the search page to search for an Arabic word with the form get
>> > method. and i faced that problem in the prototype below
>> >
>> >>>>>>>>>> search_controller.php  <<<<<<<<<<
>> >
>> > > >
>> > class SearchController extends AppController {
>> >  var $name='Search';
>> >  var $uses=array('Article');
>> >
>> >  function index(){
>> >$this->layout='page';
>> >if (isset($_GET['keyword'])) {
>> >  $this->set('articles',$this->Article->find('all',array
>> > ('conditions'=>array('Article.body like'=>'%'.base64_decode($_GET
>> > ['keyword']).'%';
>> >  $this->set('keyword',$_GET['keyword']);
>> >  $this->data['Search']['keyword']=urlencode(base64_decode($_GET
>> > ['keyword']));
>> >}
>> >  }
>> > }
>> >
>> > ?>
>> >
>> >>>>>>>>>> index.ctp  <<<<<<<<<<
>> >
>> > create(null,array('type'=>'get','url'=>'/search'))); ?>
>> > input('Search.keyword',array('label'=>'الكلمة المراد
>> > البحث عنها'))); ?>
>> > end('ابحث'));?>
>> > 
>> > نتائج البحث عن 
>> >
>> > 
>> >
>> > and i use utf-8 for the layout.
>> >
>> > the problem is that the result of echoing $keyword is '' why that and
>> > how to solve that
>> > >
>> >
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: utf-8 encoding problem

2009-01-29 Thread mohammad al-ani
params show me the value of the key 'keyword' is  yes like this symbols

On Fri, Jan 30, 2009 at 2:48 AM, brian  wrote:

>
> What does $this->params show you?
>
> On Thu, Jan 29, 2009 at 5:18 PM, medo  wrote:
> >
> > hi group,
> >
> > i have problem with my search feature in my site the problem is when i
> > use the search page to search for an Arabic word with the form get
> > method. and i faced that problem in the prototype below
> >
> >> search_controller.php  <<
> >
> >  >
> > class SearchController extends AppController {
> >  var $name='Search';
> >  var $uses=array('Article');
> >
> >  function index(){
> >$this->layout='page';
> >if (isset($_GET['keyword'])) {
> >  $this->set('articles',$this->Article->find('all',array
> > ('conditions'=>array('Article.body like'=>'%'.base64_decode($_GET
> > ['keyword']).'%';
> >  $this->set('keyword',$_GET['keyword']);
> >  $this->data['Search']['keyword']=urlencode(base64_decode($_GET
> > ['keyword']));
> >}
> >  }
> > }
> >
> > ?>
> >
> >> index.ctp  <<
> >
> > create(null,array('type'=>'get','url'=>'/search'))); ?>
> > input('Search.keyword',array('label'=>'الكلمة المراد
> > البحث عنها'))); ?>
> > end('ابحث'));?>
> > 
> > نتائج البحث عن 
> >
> > 
> >
> > and i use utf-8 for the layout.
> >
> > the problem is that the result of echoing $keyword is '' why that and
> > how to solve that
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
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: complex problem

2009-01-23 Thread mohammad al-ani
please group any suggestions

On Thu, Jan 22, 2009 at 9:13 PM, mohammad al-ani
wrote:

> websta i try this before but get the same problem, and of course thank you
> for that tip
>
> and RoVo thank you t give me the appropriate knowledge about the use of
> prefix and now i face a new problem is how to make a custom routing to two
> dir one for admin and other for the super admin like i enplane above
>
>
> On Thu, Jan 22, 2009 at 11:43 AM, RoVo  wrote:
>
>>
>> Hi medo,
>>
>> Please read this article in the bakery:
>>
>> http://bakery.cakephp.org/articles/view/using-cake_admin-for-multiple-user-types
>> May be, that helps you...
>>
>> Like websta said, the right way is, to use of 'prefix':
>> 'prefix'=>'admin'
>>
>> But use it in both routings, like this:
>> Router::connect( '/admin/:controller/:action/*', array
>> ('prefix'=>'admin'));
>> Router::connect('/superadmin/:controller/:action/*', array
>> ('prefix'=>'admin'));
>>
>> The 'prefix'=>'admin' tells cake to use the defined admin-routing:
>> Configure::write('Routing.admin', 'yourprefix')
>>
>> I solved this long time ago. Please tell, if it works.
>> If not, I will look for more details in my projects to help you...
>>
>> RoVo
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: complex problem

2009-01-22 Thread mohammad al-ani
websta i try this before but get the same problem, and of course thank you
for that tip

and RoVo thank you t give me the appropriate knowledge about the use of
prefix and now i face a new problem is how to make a custom routing to two
dir one for admin and other for the super admin like i enplane above

On Thu, Jan 22, 2009 at 11:43 AM, RoVo  wrote:

>
> Hi medo,
>
> Please read this article in the bakery:
>
> http://bakery.cakephp.org/articles/view/using-cake_admin-for-multiple-user-types
> May be, that helps you...
>
> Like websta said, the right way is, to use of 'prefix':
> 'prefix'=>'admin'
>
> But use it in both routings, like this:
> Router::connect( '/admin/:controller/:action/*', array
> ('prefix'=>'admin'));
> Router::connect('/superadmin/:controller/:action/*', array
> ('prefix'=>'admin'));
>
> The 'prefix'=>'admin' tells cake to use the defined admin-routing:
> Configure::write('Routing.admin', 'yourprefix')
>
> I solved this long time ago. Please tell, if it works.
> If not, I will look for more details in my projects to help you...
>
> RoVo
>
>
> >
>

--~--~-~--~~~---~--~~
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 to make this pouting

2009-01-20 Thread mohammad al-ani
ok i find this solution

Router::connect('/admincp/:controller/:action/*', array('prefix' =>
'admin'));

i think it's the right one and i didn't face problems with it


On Tue, Jan 20, 2009 at 4:33 PM, mohammad al-ani
wrote:

> hi ad7six i don't want to implement the admin in this way. i want to
> implement admin for every controller with it's actions
>
>
> On Tue, Jan 20, 2009 at 4:29 PM, AD7six  wrote:
>
>>
>>
>>
>> On Jan 20, 2:17 pm, "mohammad al-ani" 
>> wrote:
>> > i try that amit but the problem not solved
>> >
>> > now the problem is when i try to enter the url
>> >
>> > /admincp/posts/add
>> >
>> > the phpcake try to run the action add instead of the action admin_add
>>
>> Router::connect(
>>  '/admincp/:controller/:action',
>>  array('controller' => 'defaultadmincontroller', 'action' => 'index',
>> 'admin' => true)
>> );
>> >>
>>
>

--~--~-~--~~~---~--~~
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 to make this pouting

2009-01-20 Thread mohammad al-ani
hi ad7six i don't want to implement the admin in this way. i want to
implement admin for every controller with it's actions

On Tue, Jan 20, 2009 at 4:29 PM, AD7six  wrote:

>
>
>
> On Jan 20, 2:17 pm, "mohammad al-ani" 
> wrote:
> > i try that amit but the problem not solved
> >
> > now the problem is when i try to enter the url
> >
> > /admincp/posts/add
> >
> > the phpcake try to run the action add instead of the action admin_add
>
> Router::connect(
>  '/admincp/:controller/:action',
>  array('controller' => 'defaultadmincontroller', 'action' => 'index',
> 'admin' => true)
> );
> >
>

--~--~-~--~~~---~--~~
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 to make this pouting

2009-01-20 Thread mohammad al-ani
i try that amit but the problem not solved

now the problem is when i try to enter the url

/admincp/posts/add

the phpcake try to run the action add instead of the action admin_add


On Tue, Jan 20, 2009 at 4:07 PM, Amit Badkas  wrote:

> Try to put Router::connect('/admincp/:controller/:action',
> array('controller' => $this->params['controller'], 'action' =>
> 'admin_index')); before Router::connect('/admincp/:controller',
> array('controller' => $this->params['controller'], 'action' =>
> 'admin_'.$this->params['action'])); instead of after
>
> 2009/1/20, mohammad al-ani :
>>
>> thank you Amit Badkas and RoVo but i try not to change the funtion in the
>> controller and not to use the Configure::write('Routing. admin',
>> 'admincp');
>>
>> i try to use the routing system to make every thing work without changing
>> the actions prefix so i just try something like this in the routes.php
>>
>> Router::connect('/admincp/:controller', array('controller' =>
>> $this->params['controller'], 'action' => 'admin_index'));
>> Router::connect('/admincp/:controller/:action', array('controller' =>
>> $this->params['controller'], 'action' => 'admin_'.$this->params['action']));
>>
>> but i have troubles with it, it work fine with
>> /admincp/posts/
>>
>> but i didn't't work with
>> /admincp/posts/add
>>
>> On Tue, Jan 20, 2009 at 3:27 PM, RoVo  wrote:
>>
>>>
>>> Hi medo,
>>>
>>> > my question is how to route the admincp
>>> I didn't test it, but I think that it works like this...
>>>
>>> use
>>> Configure::write('Routing.admin', 'admincp');
>>>
>>> in the controller change the function names like this:
>>>
>>> function admincp_add() {
>>>
>>> and rename your templates like this:
>>> admincp_add.ctp
>>>
>>> Hope that helps
>>> RoVo
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Amit
>
> http://amitrb.wordpress.com/
> http://coppermine-gallery.net/
> http://cheesecake-photoblog.org/
> http://www.sanisoft.com/blog/author/amitbadkas
> >
>

--~--~-~--~~~---~--~~
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 to make this pouting

2009-01-20 Thread mohammad al-ani
thank you Amit Badkas and RoVo but i try not to change the funtion in the
controller and not to use the Configure::write('Routing.admin', 'admincp');

i try to use the routing system to make every thing work without changing
the actions prefix so i just try something like this in the routes.php

Router::connect('/admincp/:controller', array('controller' =>
$this->params['controller'], 'action' => 'admin_index'));
Router::connect('/admincp/:controller/:action', array('controller' =>
$this->params['controller'], 'action' => 'admin_'.$this->params['action']));

but i have troubles with it, it work fine with
/admincp/posts/

but i didn't't work with
/admincp/posts/add

On Tue, Jan 20, 2009 at 3:27 PM, RoVo  wrote:

>
> Hi medo,
>
> > my question is how to route the admincp
> I didn't test it, but I think that it works like this...
>
> use
> Configure::write('Routing.admin', 'admincp');
>
> in the controller change the function names like this:
>
> function admincp_add() {
>
> and rename your templates like this:
> admincp_add.ctp
>
> Hope that helps
> RoVo
>
> >
>

--~--~-~--~~~---~--~~
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: is this bug

2009-01-08 Thread mohammad al-ani
ok I was on the high level security but I tried it with the medium and low
level and the problem still appear

but i found when i set the debug level to 1 the problem disappear and there
was no errors. i think it is some issue with session


On Thu, Jan 8, 2009 at 12:42 PM, Webweave  wrote:

>
> You didn't mention the browser bit before, so this only happens with
> IE?
>
> What level is your Security set to in app/config/core.php ?
>
> There was a thread a while back about problems with IE7 and Auth where
> reducing the security level to medium fixed things.
>
> On Jan 8, 11:21 am, "mohammad al-ani" 
> wrote:
> > yes believe me every thing is fine and all stuff  in its place and when I
> > use the firefox the problem is disappear
> >
> > On Thu, Jan 8, 2009 at 11:11 AM, Webweave  wrote:
> >
> > > Is you layout in the right location ?
> >
> > > As long as you have a page.ctp in yourapp/views, setting layout to
> > > 'page' should work.
> >
> > > On Jan 8, 10:15 am, medo  wrote:
> > > > hi all
> >
> > > > yesterday I asked you about the error I faced when try to log in to
> my
> > > > site with /users/login and the error was the auto redirect to 404
> > > > error page with the ie after a while when the page displayed .And
> > > > after my tries to found a solution I find that the problem come when
> I
> > > > use $this->layout='page' so is this a bug or there is another way to
> > > > set the layout .
> >
> >
> >
>

--~--~-~--~~~---~--~~
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: is this bug

2009-01-08 Thread mohammad al-ani
yes believe me every thing is fine and all stuff  in its place and when I
use the firefox the problem is disappear

On Thu, Jan 8, 2009 at 11:11 AM, Webweave  wrote:

>
> Is you layout in the right location ?
>
> As long as you have a page.ctp in yourapp/views, setting layout to
> 'page' should work.
>
> On Jan 8, 10:15 am, medo  wrote:
> > hi all
> >
> > yesterday I asked you about the error I faced when try to log in to my
> > site with /users/login and the error was the auto redirect to 404
> > error page with the ie after a while when the page displayed .And
> > after my tries to found a solution I find that the problem come when I
> > use $this->layout='page' so is this a bug or there is another way to
> > set the layout .
> >
>

--~--~-~--~~~---~--~~
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: Save() not updating rows

2009-01-08 Thread mohammad al-ani
first as I understand you, you want to update a row with the specific $id so
to do this you don't need [ $this->create(); ]


you just need to

  function block($id) {
   $data = array();
   $data['Friend']['id']=$id;
   $data['Friend']['status'] = 'blocked';
   $data['Friend']['blockedTime'] = time();

   return $this->save($data, false);
   }
On Thu, Jan 8, 2009 at 1:21 AM, Miles J  wrote:

>
> So I have this method that updates a row, but everytime it runs it
> keeps inserting records instead of updating. Ive tried using read() in
> place of $this->id, but that didnt work either.
>
> function block($id) {
>$this->create();
>$this->id = $id;
>
>$data = array();
>$data['Friend']['status'] = 'blocked';
>$data['Friend']['blockedTime'] = time();
>
>return $this->save($data, false);
>}
> >
>

--~--~-~--~~~---~--~~
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: urgent help

2009-01-08 Thread mohammad al-ani
OK today I find that the problem is just with the ie

in the firefox the page load fine and never redirected so what your
suggestions.

On Wed, Jan 7, 2009 at 6:35 PM, Webweave  wrote:

>
> if you change the debug level, you should be able to see the error
> that is causing the problem.
>
> My guess would be a problem with the rewrite stuff in your htaccess
> files.
>
> On Jan 7, 2:16 pm, "mohammad al-ani"  wrote:
> > I use auth
> >
> > On Wed, Jan 7, 2009 at 1:57 PM, gearvOsh 
> wrote:
> >
> > > Are you using Auth or ACL?
> >
> >
> >
>

--~--~-~--~~~---~--~~
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: urgent help

2009-01-07 Thread mohammad al-ani
I use auth

On Wed, Jan 7, 2009 at 1:57 PM, gearvOsh  wrote:

>
> Are you using Auth or ACL?
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---