Re: Help: how to use cakephp for subdomains
http://procsharp.blogspot.com/2010/12/configure-apache-to-host-domain-and.html On Sun, Nov 6, 2011 at 10:54 AM, Hamid Mamdoohi wrote: > I create subdomain for my site. > I use cakephp for that but when call $html->css('style') method to add tag > and run it. cake can't load css file and send error of missing controller. > please help me. > > -- > 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: Plupload and Media Plugin
"it is not ideal to handle big uploads" Why is that? What is your problem? I am using the plugin and have no problems with large files. Did you set php properly? http://www.radinks.com/upload/config.php On Sun, Nov 6, 2011 at 7:43 PM, Mo wrote: > Hey > > I need the ability to upload large (up to 100MB) files. Up to now I > have the David Persson's Media Plugin integrated however it is not > ideal to handle big uploads. Is there a way to integrate Pulpload (or > something similar) to work with the Media plugin and Cakephp? Has > anyone of you done this already? > > Regards > > -- > 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 > -- Regards, Zaky Katalan-Ezra QA Administrator www.IGeneriX.com Sites.IGeneriX.com 054-7762312 -- 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
HasMany Through Association
Is there a good naming convention for the tablenames for these associations? I have a few tables that I want to convert from HABTM to hasmany through, and haven't used hasmany through yet. Also does bake auto generate hasmany through assocations? -- 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: Really Annoying Error
Well it appears to have held. Not sure why or how it worked but apparently "Memcache" instead of "File" -- 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: CakePHP 2.0.2: HABTM relations: Edit form seems to add relations instead of replacing them
I don't see Post or Tag model in this app. Check this line https://github.com/ilmattodel93/IMattiDel93-s-Site/blob/master/app/Model/EpisodeRelease.php#L39 or other habtm associations. -- 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: CakePHP 2.0.2: HABTM relations: Edit form seems to add relations instead of replacing them
http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasandbelongstomany-habtm *"unique*: If true (default value) cake will first delete existing relationship records in the foreign keys table before inserting new ones, when updating a record. So existing associations need to be passed again when updating." Maybe this could be your problem... -- 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: CakePHP v2.0.2 on IIS 5.1 (Win2k) ISAPI_rewrite not functioning
my guess is that you didnt update the htaccess I added it to my upgraded version of the UpgradeShell (haha) anyway, here is the fragment $patterns = array( array( 'index.php?url=$1 => index.php?/$1', '/index.php\?url=\$1/', 'index.php?/\\$1' ), ); make sure your htaccess contains the last string On 6 Nov., 17:40, Matt wrote: > I'm trying to get CakePHP 2 to work on an older laptop with Win2k/IIS > 5.1. Previous versions of CakePHP worked fine, 1.2, 1.3 but 2.0 isn't > working. I think I've tried just about every combination (except the > correct one, of course!) Here is the htaccess from my webroot folder, > should be equal to the unmodified distribution file > > > RewriteEngine On > RewriteCond %{REQUEST_FILENAME} !-d > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ index.php?/$1 [QSA,L] > > > I would think this is the config I should have in ISAPI_rewrite > > RewriteEngine on > RewriteBase /cake2 > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule ^(.*)$ index.php?/$1 [QSA,L] > > And the base url is commented out in core.cfg > > //Configure::write('App.baseUrl', env('SCRIPT_NAME')); > > This doesn't work, I just get some churning and then the Pages view > comes up no matter what url I type in (ex: cake2/widgets/index). I > did some poking around in the core code and it appears it never reads > the url so it defaults to / every time. > > The interesting thing is that I can't turn mod rewrite *off* either. > If I un-comment the baseUrl, and delete the 3 htaccess files, I get > the same page but with no css and this message: > > URL rewriting is not properly configured on your server. 1) Help me > configure it 2) I don't / can't use URL rewriting > > Inspecting the source shows that the link to the css is: > > href="/cake2/matt/webroot/css/cake.generic.css" > > when it should be: > > href="/cake2/css/cake.generic.css" > > So, all in all, I'm stuck. Luckily my Win7 computer at work is OK, but > my laptop is still running on Win2k. It appears the new version of > cake wants the url to be 'localhost/cake2/index.php?/widgets/index' > while the previous versions wanted 'localhost/cake2/index.php?url=/ > widgets/index' so something doesn't like the new format. > > Any help would be appreciated. Thanks -- 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: Cached Forms Don't Submit
Dividing the form into two actions, one to display and one to save, did the trick. Thanks for the help, 0x20h. I appreciate it. On Oct 30, 12:11 pm, 0x20h wrote: > When beforeFilter() gets called cake is already rendering the "cached > version". > (see dispatcher::cached() and ViewHelper#__writeFile()). > Regarding to the docs its not recommended to use the callbacks > (http://book.cakephp.org/view/1380/Caching-in-the-Controller) . > I would probably try to separate the "display" and "save" part into 2 > actions or put theforminto an > element andcachethat element manually, not via cacheAction. > e.g. in your view script > > if($this->data || !($content =Cache::read('big_form', 'persistent'))) { > $content = $this->element('big_form'); > if (!$this->data) { > Cache::write('big_form', $content, 'persistent'); > }} > > echo $content; > > Am 30.10.2011 19:26, schrieb BlenderStyle: > > > > > > > > > I have setup the index and edit actions to be cached in my > > PostsController as follows: > > > var $cacheAction = array( > > 'index' => array('callbacks' => true, 'duration' => '7 days'), > > 'edit' => array('callbacks' => true, 'duration' => '7 days'), > > ); > > > Everything is cached as expected, but the editformdoesn'tsubmit. > > This is expected as well, if you think about it, but is there anyway > > to bypass caching when a user submits aform? > > > I set callbacks to true to allow AuthComponent to do its magic, so if > > I could put some code in beforeFilter(), it's executed dynamically > > (not cached). I have tried each of the following in beforeFilter(), > > one by one, but none of them did the trick: > > > if(!empty($this->data)) clearCache(); > > if(!empty($this->data)) Configure::write('Cache.check', false); > > if(!empty($this->data)) $this->cacheAction = false; > > > To avoid the "why would you even want to do that" argument I see in > > other forums, I'll explain a little further. My edit action is fairly > > intensive since it's such a longformwith a lot of "stuff" in it and > > caching definitely improves the performance. To avoid writing extra > > code, the edit action displays theformas well as saves it. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Plupload and Media Plugin
Hey I need the ability to upload large (up to 100MB) files. Up to now I have the David Persson's Media Plugin integrated however it is not ideal to handle big uploads. Is there a way to integrate Pulpload (or something similar) to work with the Media plugin and Cakephp? Has anyone of you done this already? Regards -- 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
CakePHP v2.0.2 on IIS 5.1 (Win2k) ISAPI_rewrite not functioning
I'm trying to get CakePHP 2 to work on an older laptop with Win2k/IIS 5.1. Previous versions of CakePHP worked fine, 1.2, 1.3 but 2.0 isn't working. I think I've tried just about every combination (except the correct one, of course!) Here is the htaccess from my webroot folder, should be equal to the unmodified distribution file RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,L] I would think this is the config I should have in ISAPI_rewrite RewriteEngine on RewriteBase /cake2 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [QSA,L] And the base url is commented out in core.cfg //Configure::write('App.baseUrl', env('SCRIPT_NAME')); This doesn't work, I just get some churning and then the Pages view comes up no matter what url I type in (ex: cake2/widgets/index). I did some poking around in the core code and it appears it never reads the url so it defaults to / every time. The interesting thing is that I can't turn mod rewrite *off* either. If I un-comment the baseUrl, and delete the 3 htaccess files, I get the same page but with no css and this message: URL rewriting is not properly configured on your server. 1) Help me configure it 2) I don't / can't use URL rewriting Inspecting the source shows that the link to the css is: href="/cake2/matt/webroot/css/cake.generic.css" when it should be: href="/cake2/css/cake.generic.css" So, all in all, I'm stuck. Luckily my Win7 computer at work is OK, but my laptop is still running on Win2k. It appears the new version of cake wants the url to be 'localhost/cake2/index.php?/widgets/index' while the previous versions wanted 'localhost/cake2/index.php?url=/ widgets/index' so something doesn't like the new format. Any help would be appreciated. Thanks -- 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: how can i protect my code from the duplicaters
I know ioncube is used by JReviews (www.reviewsforjoomla.com), which is a pretty impressive/good Joomla Component. On Nov 5, 5:55 pm, Sandy Wilkins wrote: > An in-the-middle way would be to obfuscate your code... remove > comments, unneeded spaces, change variable names, etc. One could still > see the code but it would take alot of time. > > https://www.google.com/search?q=obfuscate+php > > On Nov 5, 5:18 pm, WebbedIT wrote: > > > I think the only options are the previously suggested IonCube and > > ZendGuard, but whilst they've been around a while, I've only ever > > encountered IonCube once when downloading a developer version of > > LemonStand. > > > I suppose what I was trying to say is that whilst in theory this > > sounds a great idea, the fact that very few of us come into contact > > with encrypted code possibly goes to show that very few companies go > > to the bother (or that we don't deem our code to be that precious). > > To be honest, from my experience of setting up a developers copy of > > LemonStand for a customer, I think that using IonCube will actually > > lose them a significant number of potential clients who won't get past > > the barrier of having to have the neccessary server setup to decrypt > > the files. > > > But as I said in my earlier post, could you not place in the remotely > > hosted application a call to your servers to check for a valid > > license? I know a lot of games are now going this way where you have > > to be online to be able to play them as the game polls there servers > > to check your have a valid license. > > > Paul. > > > On Nov 5, 11:17 am, Jeremy Burns | Class Outfit > > > wrote: > > > Exactly! Just to be clear, we're not dealing with mission critical > > > stuff or bank accounts. The issue is that if you sell a web based > > > application to a company that then runs it on their own infrastructure, > > > it'd be cool to be able to protect your interests somehow and ensure you > > > can manage a recurring annual income from it. I guess one answer is > > > "don't build it in PHP", but that's a cop-out! > > > > Jeremy Burns > > > Class Outfit > > > >http://www.classoutfit.com > > > > On 5 Nov 2011, at 11:03, WebbedIT wrote: > > > > > Would never of thought of software at that sort of high end level > > > > being developed using uncompiled/unencrypted code of any flavour. > > > > Could just see me walking into a bank, having a look at there source > > > > code and tweaking a few PHP functions :) > > > > > On Nov 4, 6:47 pm, Jeremy Burns | Class Outfit > > > > wrote: > > > >> I'm thinking of apps running on internal banking servers (real case > > > >> scenario) where hosting it remotely is a no-no for security reasons. > > > >> Encrypting that would be pretty fantastic. > > > > >> Jeremy Burns > > > >> Class Outfit > > > > >>http://www.classoutfit.com > > > > >> On 4 Nov 2011, at 18:42, WebbedIT wrote: > > > > >>> @Jeremy: I would be wary of allowing any software licensed annually to > > > >>> be hosted on another server. Apps licensed in this way tend to be more > > > >>> like an SAAS app and as such would be centrally stored to allow for > > > >>> maintenance, upgrades etc. > > > > >>> If it is a plugin that we're talking about then the license tends to > > > >>> get you a period of support and access to upgrades, so to let your > > > >>> license expires means you can continue to use the plugin without > > > >>> upgrades/fixes. > > > > >>> Have you ever, or no of anyone else, who has bought code where you had > > > >>> to decrypt it (try finding a shared hosting service that has ioncube/ > > > >>> zend guard installed)? Maybe you could have a call from the remote > > > >>> server to a database on your server which checked if a license is > > > >>> valid? > > > > >>> HTH, Paul > > > > >>> On Nov 4, 9:38 am, AD7six wrote: > > > On Nov 4, 10:13 am, WebbedIT wrote: > > > > > @Ryan: If you could not raise a smile at Andy's response in this > > > > thread then you really could do with a weekend off. Your response > > > > is > > > > nicer than Andy's but they both mean the same thing ... "Why on > > > > earth > > > > do you need to protect your code?!?" > > > > Actually my "point" (there was no point in my answer) was more this: > > > > http://lmgtfy.com/?q=protect+php+files > > > > if you can type your question in google and the answer pops up - it's > > > not a question that belongs on any support forum. Less so here, for a > > > question that has nothing specific to do with CakePHP. > > > > AD > > > > >>> -- > > > >>> Our newest site for the community: CakePHP Video > > > >>> Tutorialshttp://tv.cakephp.org > > > >>> Check out the new CakePHP Questions > > > >>> sitehttp://ask.cakephp.organdhelpotherswith their CakePHP related > > > >>> questions. > > > > >>> To unsubscribe from this group, send email to > > > >>> cake-php+unsubscr...@googlegroups.com For more options, visit this
Re: Cannot log in using CakePHP 2.0
You basically say what you do wrong :-) You try to login with the same password as that of the database? Nope! You need to either: Hash the password and store it in the database then try to login -or- Copy the already hashed password from the sql debug and insert it as is in the database. You should remember that in 2.0 auth automatically hashes the pass on login but not on save. Check the docs. On Nov 6, 4:01 am, Sandy Wilkins wrote: > I'm trying to get a simple login form to work using CakePHP 2.0... > just Auth, no ACLs for now. > > I'm able to see the form and enter the email and password as they are > in the database, but I just get returned to the form and the flash > error message is displayed. Here is my code: -- 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
cant apply cakes contain function to this array structure
hi everyone, i want to apply the contain function but i cant get it to work. so this is my find in the users_ controller : $this->Link-> find('all', conditions etc.); now debugging this find method shows that cake returns the result as this: Array ( [0] => Array ( [Link] => Array ( [fk_user_id] => 76 [title] => Rot [description] => [created] => 2011-10-30 16:40:33 [hash] => a872ca5c991cfa388d0ac29c78c09 [date_locked] => [id] => 214 [locked] => [parent_id] => [number_ratings] => 0 [average_rating] => [average_rating_rounded] => [rating_lastvoted] => ) [User] => Array ( [username] => ma [firstname] => Ma [lastname] => W [hash] => a707e9e245888cd65ccc5a6984124200 [id] => 76 ) [Parent] => Array ( [fk_user_id] => [title] => [description] => [created] => [hash] => [date_locked] => [id] => [locked] => [parent_id] => [number_ratings] => 0 [average_rating] => [average_rating_rounded] => [rating_lastvoted] => ) [Settings] => Array ( [id] => [color_headline] => [color_headline_background] => [color_background] => [fk_link_id] => ) MORE code here.. all i need from this data is the [Link] array and the [Icon] array... this is so depressing cause i tried dozens of combinations so how do i do this? $this-> link-> contain. appreciate it :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cannot log in using CakePHP 2.0
The code looks good, You could comment out the $this->redirect($this->Auth->redirect()); from login method and check the sql dump to see if the mysql query is correct … Andras Kende On Nov 5, 2011, at 9:01 PM, Sandy Wilkins wrote: > I'm trying to get a simple login form to work using CakePHP 2.0... > just Auth, no ACLs for now. > > I'm able to see the form and enter the email and password as they are > in the database, but I just get returned to the form and the flash > error message is displayed. Here is my code: > > **AppController:** >class AppController extends Controller >{ >function beforeFilter() >{ >$this->Auth->userModel = 'Users'; >$this->Auth->fields = array('username' => 'email', > 'password' => 'password'); //have to put both, even if we're just > changing one >$this->Auth->loginAction = array('controller' => 'users', > 'action' => 'login'); >$this->Auth->loginRedirect = array('controller' => > 'hotels', 'action' => 'dashboard'); >$this->Auth->logoutRedirect = array('controller' => > 'users', 'action' => 'login'); >} >} > > **login.ctp:** >echo $this->Form->create(); //'User', array('action' => > 'login')); >echo $this->Form->input('email'); >echo $this->Form->input('password'); >echo $this->Form->end('Login'); >?> > > **UsersController:** > >class UsersController extends AppController >{ >var $name = 'Users'; >var $helpers = array('Html','Form'); >var $components = array('Auth','Session'); > >function beforeFilter() >{ >$this->Auth->allow("logout"); >parent::beforeFilter(); >} > >function index() { } //Redirects to login() > >function login() >{ >if ($this->Auth->login()) >{ >$this->redirect($this->Auth->redirect()); >} else >{ >$this->Session->setFlash(__('Invalid username or > password, try again')); >} >} > >function logout() >{ >$this->redirect($this->Auth->logout()); >} >} >?> > > I appreciate any help with this. Thanks! > > -- > 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: Help: how to use cakephp for subdomains
Check to see if your server config is set correctly for the subdomain "Make sure that Overide is allowed and that AllowOverride is set to All *for the correct DocumentRoot*" from book.cakephp.org - S On 6 November 2011 08:54, Hamid Mamdoohi wrote: > I create subdomain for my site. > I use cakephp for that but when call $html->css('style') method to add tag > and run it. cake can't load css file and send error of missing controller. > please help me. > > -- > 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: CakePHP2.0.1 - Problem with saving HABTM
> Ok, I've upgraded to 2.0.2, changed the code of > EpisodeReleaseController.php, and i have fixed the add problem. Now I > am building the edit function. I have used the console cake bake > controller to create it, but it seems that each time I press save it > adds a new association. > Example; > "Post" as been added with "TagA" and "TagC". I edit it and in the > multiple select I deselect the "TagC" and select the "TagB". I'd > expect now to have only "TagA" and "TagB", but if I press save it > shows: "TagA,TagC,TagA,TagB". Hmm, could you post your edit view and your model please. Also, you should probably have a unique index against the two foreign keys in your join table to stop duplicate joins being created in the first place: CREATE UNIQUE INDEX idx_episode_releases_episode_release_id_tag_id ON episode_releases(episode_release_id,tag_id); hth J -- 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
Cannot log in using CakePHP 2.0
I'm trying to get a simple login form to work using CakePHP 2.0... just Auth, no ACLs for now. I'm able to see the form and enter the email and password as they are in the database, but I just get returned to the form and the flash error message is displayed. Here is my code: **AppController:** class AppController extends Controller { function beforeFilter() { $this->Auth->userModel = 'Users'; $this->Auth->fields = array('username' => 'email', 'password' => 'password'); //have to put both, even if we're just changing one $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); $this->Auth->loginRedirect = array('controller' => 'hotels', 'action' => 'dashboard'); $this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login'); } } **login.ctp:** Form->create(); //'User', array('action' => 'login')); echo $this->Form->input('email'); echo $this->Form->input('password'); echo $this->Form->end('Login'); ?> **UsersController:** Auth->allow("logout"); parent::beforeFilter(); } function index() { } //Redirects to login() function login() { if ($this->Auth->login()) { $this->redirect($this->Auth->redirect()); } else { $this->Session->setFlash(__('Invalid username or password, try again')); } } function logout() { $this->redirect($this->Auth->logout()); } } ?> I appreciate any help with this. Thanks! -- 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
Help: how to use cakephp for subdomains
I create subdomain for my site. I use cakephp for that but when call $html->css('style') method to add tag and run it. cake can't load css file and send error of missing controller. please help me. -- 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: can't connect to db
Is the DocumentRoot of your http.conf pointing to the webroot folder? On Nov 5, 7:55 pm, bluethundr wrote: > ## cake cannot connect to the databse > > Your tmp directory is writable. > > The FileEngine is being used for caching. To change the config edit > APP/config/core.php > > Your database configuration file is present. > > Cake is NOT able to connect to the database. > > ## database config file > > class DATABASE_CONFIG { > > var $default = array( > 'driver' => 'mysql', > 'persistent' => false, > 'host' => 'localhost', > 'login' => 'admin', > 'password' => 'secret', > 'database' => 'cake', > 'prefix' => '', > 'port' => '/var/lib/mysql/mysql.sock', > //'encoding' => 'utf8', > ); > > var $test = array( > 'driver' => 'mysql', > 'persistent' => false, > 'host' => 'localhost', > 'login' => 'admin', > 'password' => 'secret', > 'database' => 'cakeblog', > 'prefix' => '', > 'port' => '/var/lib/mysql/mysql.sock', > //'encoding' => 'utf8', > ); > > } > > ## user can connect to (and use) database on the command line > > [root@cloud cake]# mysql -uadmin -psecret > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 2 > Server version: 5.5.17-log MySQL Community Server (GPL) by Remi > > Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights > reserved. > > Oracle is a registered trademark of Oracle Corporation and/or its > affiliates. Other names may be trademarks of their respective > owners. > > Type 'help;' or '\h' for help. Type '\c' to clear the current input > statement. > > mysql> use cake > Database changed > > thank you! -- 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: how can i protect my code from the duplicaters
An in-the-middle way would be to obfuscate your code... remove comments, unneeded spaces, change variable names, etc. One could still see the code but it would take alot of time. https://www.google.com/search?q=obfuscate+php On Nov 5, 5:18 pm, WebbedIT wrote: > I think the only options are the previously suggested IonCube and > ZendGuard, but whilst they've been around a while, I've only ever > encountered IonCube once when downloading a developer version of > LemonStand. > > I suppose what I was trying to say is that whilst in theory this > sounds a great idea, the fact that very few of us come into contact > with encrypted code possibly goes to show that very few companies go > to the bother (or that we don't deem our code to be that precious). > To be honest, from my experience of setting up a developers copy of > LemonStand for a customer, I think that using IonCube will actually > lose them a significant number of potential clients who won't get past > the barrier of having to have the neccessary server setup to decrypt > the files. > > But as I said in my earlier post, could you not place in the remotely > hosted application a call to your servers to check for a valid > license? I know a lot of games are now going this way where you have > to be online to be able to play them as the game polls there servers > to check your have a valid license. > > Paul. > > On Nov 5, 11:17 am, Jeremy Burns | Class Outfit > > > > > > > > wrote: > > Exactly! Just to be clear, we're not dealing with mission critical > > stuff or bank accounts. The issue is that if you sell a web based > > application to a company that then runs it on their own infrastructure, > > it'd be cool to be able to protect your interests somehow and ensure you > > can manage a recurring annual income from it. I guess one answer is "don't > > build it in PHP", but that's a cop-out! > > > Jeremy Burns > > Class Outfit > > >http://www.classoutfit.com > > > On 5 Nov 2011, at 11:03, WebbedIT wrote: > > > > Would never of thought of software at that sort of high end level > > > being developed using uncompiled/unencrypted code of any flavour. > > > Could just see me walking into a bank, having a look at there source > > > code and tweaking a few PHP functions :) > > > > On Nov 4, 6:47 pm, Jeremy Burns | Class Outfit > > > wrote: > > >> I'm thinking of apps running on internal banking servers (real case > > >> scenario) where hosting it remotely is a no-no for security reasons. > > >> Encrypting that would be pretty fantastic. > > > >> Jeremy Burns > > >> Class Outfit > > > >>http://www.classoutfit.com > > > >> On 4 Nov 2011, at 18:42, WebbedIT wrote: > > > >>> @Jeremy: I would be wary of allowing any software licensed annually to > > >>> be hosted on another server. Apps licensed in this way tend to be more > > >>> like an SAAS app and as such would be centrally stored to allow for > > >>> maintenance, upgrades etc. > > > >>> If it is a plugin that we're talking about then the license tends to > > >>> get you a period of support and access to upgrades, so to let your > > >>> license expires means you can continue to use the plugin without > > >>> upgrades/fixes. > > > >>> Have you ever, or no of anyone else, who has bought code where you had > > >>> to decrypt it (try finding a shared hosting service that has ioncube/ > > >>> zend guard installed)? Maybe you could have a call from the remote > > >>> server to a database on your server which checked if a license is > > >>> valid? > > > >>> HTH, Paul > > > >>> On Nov 4, 9:38 am, AD7six wrote: > > On Nov 4, 10:13 am, WebbedIT wrote: > > > > @Ryan: If you could not raise a smile at Andy's response in this > > > thread then you really could do with a weekend off. Your response is > > > nicer than Andy's but they both mean the same thing ... "Why on earth > > > do you need to protect your code?!?" > > > Actually my "point" (there was no point in my answer) was more this: > > > http://lmgtfy.com/?q=protect+php+files > > > if you can type your question in google and the answer pops up - it's > > not a question that belongs on any support forum. Less so here, for a > > question that has nothing specific to do with CakePHP. > > > AD > > > >>> -- > > >>> Our newest site for the community: CakePHP Video > > >>> Tutorialshttp://tv.cakephp.org > > >>> Check out the new CakePHP Questions > > >>> sitehttp://ask.cakephp.organdhelpothers 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 > > > Tutorialshttp://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 emai
Re: cake-sql-log in my layout
echo out the sql_dump element On Nov 5, 2011 9:44 PM, "Stefano" wrote: > how i can show in my layout the executed queries? > > for example : > > /view/layout/my_layout.ctp > > > > > > > > > > > > > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their 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: Strange View behavior
Quick update. The issue is resolved. I restructured the method in the controller and walked through it again. Again, it executes to completion. The elseif() in the method is keeping the view from rendering even though the statement itself is not failing. Perhaps a coding issue I'm just not seeing? // updated method http://bin.cakephp.org/view/1175849445 -- 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: how can i protect my code from the duplicaters
My vote is for a virtual machine, hosting the whole environment, that only you have access to login to. On Sat, Nov 5, 2011 at 10:34 PM, John wrote: > On Nov 6, 1:18 am, WebbedIT wrote: > > But as I said in my earlier post, could you not place in the remotely > > hosted application a call to your servers to check for a valid > > license? I know a lot of games are now going this way where you have > > to be online to be able to play them as the game polls there servers > > to check your have a valid license. > > Well if you give access to source anyone can bypass the check quite > easily. In fact no license checking has stopped unwanted use of > software (games included). > > The only way to not worry is if you have a self controlled API based > service that your client code will be depending upon. Then you can > check for the license validity in your trusted server and if it's > expired or illegal you just block access so the client side is > useless. > > I have used a couple of zen encrypted applications, it's not always > that easy to set up in the server environment for all the PHP/zen > versions available. The question is whether your application is > "costing" more than the cost of encrypting/setting up. > > -- > 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: Problem Auth Component | CakePHP 2.0.2
hi, wft! why is this so difficult? I'm not stupid!! Von: Serkan Sipahi An: "cake-php@googlegroups.com" Gesendet: 18:09 Samstag, 5.November 2011 Betreff: Re: Problem Auth Component | CakePHP 2.0.2 hi, thank you for your note. But it still doesnt work. 'fields' => array('username' => 'usr', 'password' => 'pwd') ...doesnt work as well !!! 'fields' => array('username' => 'User.usr', 'password' => 'User.pwd') ...doesnt work as well !!! Controller: class PricerobotStoreEnginesController extends AppController { public $components = array( 'Auth'=> array( 'authenticate' => array( 'Form' => array( 'fields' => array('username' => 'usr', 'password' => 'pwd') //'fields' => array('username' => 'User.usr', 'password' => 'User.pwd') ...doesnt work as well !!! ) ) ) ); } class UsersController extends AppController { public $components = array('Auth','Security'); public function login() { if ($this->request->is('post')) { if ($this->Auth->Login()) { $this->redirect(array('controller' => 'PricerobotStoreEngines', 'action' => 'index')); } else { $this->Session->setFlash(__('Username or password is incorrect')); $this->redirect(array('controller' => 'users', 'action' => 'login')); } } } public function logout() { $this->redirect($this->Auth->logout()); } } View: echo $this->Form->create(); echo $this->Form->input('usr'); //text echo $this->Form->password('pwd'); //password echo $this->Form->end('Login'); Database: Table: users fields: usr, pwd Von: Ryan Schmidt An: cake-php@googlegroups.com Gesendet: 12:40 Samstag, 5.November 2011 Betreff: Re: Problem Auth Component | CakePHP 2.0.2 On Nov 5, 2011, at 03:46, Serkan Sipahi wrote: > I really need help. What is my cake mistake? I assume you need to do what it says in the documentation, and inform CakePHP that your username is stored in the field "usr" and the password is in the field "pwd"; see the part under "To configure different fields for user in $components array": http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers -- 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 -- 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
Strange View behavior
Just a little bit ago I ran into a situation where my View is displaying nothing, as in a blank page. The result is the same with 2.0 RC3 & 2.1 which would lead me to believe it's a coding issue, but there are no errors to be found as far as I can see. I tested the method in the controller and it executes to completion. It's seems as though the View has rendered, it's just blank (regardless of what I put in the view). View Source on page reveals a blank slate as well. Firebug shows empty html, head & body, No CSS, no JS, no content. Clearing the cache and tmp dir has no effect. I'm only having this issue with a single method within the controller. http://bin.cakephp.org/view/1996798666 -- 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
CakePHP 2.0.2: HABTM relations: Edit form seems to add relations instead of replacing them
Hi all, I am building a download manager for my site. Now I am building the edit function for the downloads. I have used the console cake bake controller to create it, but it seems that each time I press save it adds a new association. Example: "Post" as been added with "TagA" and "TagC". I edit it and in the multiple select I deselect the "TagC" and select the "TagB". I'd expect now to have only "TagA" and "TagB", but if I press save it shows: "TagA,TagC,TagA,TagB". Code: https://github.com/ilmattodel93/IMattiDel93-s-Site/blob/master/app/Controller/EpisodeReleasesController.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