Search Results

Search found 768 results on 31 pages for 'cakephp'.

Page 19/31 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • How do I make non-framework code to framework code? (PHP)

    - by ggfan
    I just started using CakePHP and it's very different from just normal procedural or basic OOP PHP. I am still learning PHP and still read "beginning PHP/mysql" books that teaches you basic PHP. Also lots of sites online provide code that isn't for a framework. Is the only way to make non-framework code to say a framework, say cakePHP, by learning cakePHP thoroughly than rewriting the code yourself to fit the MVC model?

    Read the article

  • How can I make a new CTP (CakePHP) file in NetBeans?

    - by John Isaacks
    I have found a lot of info about adding CTP file support for NetBeans, but this is usually talking about code highlighting and treating a ctp file like a php file. This can be done at: Tools - Options - Miscellaneous - Files I have done this. However, when I try to create a NEW ctp file. I do not have the option. I tried going to Tools -> Templates to add a ctp template. There is no "new" button just an "add" button that looks for a file. I created a file on my desktop called cake_template.ctp on my desktop. I added it to the PHP templates in the template manager. I called the template "PHP Cake Template". Still when I go to create a new file, the option is not there. I restarted NetBeans, still the same. I just want to create a new .ctp file, it shouldn't be this difficult. Does anyone know how? I am using version 6.9.1

    Read the article

  • [CakePHP] What is the best way to access another Model in a Controller?

    - by kwokwai
    Hi all, Say I got two Controllers like this Table1sController, and Table2sController. with corresponding Models: Table1sModel, Table2sModel In the Table1sController, I got this: $this-Table1sModel-action(); Say I want to access some data in Table2sModel How is it possible to do something like this in Table1sController I have tried this in Table1sController: $this-Table2sModel-action(); But I received an error message like this: Undefined property: Table1sController::$Table2sModel

    Read the article

  • CakePHP Smarty View with theming support (i.e. Themed Smarty View)

    - by Balchev
    Hi folks, I use Smarty View, but want to benefit from theme options. Since for theming cake use Theme View, I cant use both Smarty and Theme at the same time. Perhaps can combine the code but am not that familar with View eingine core. Already have a lot views done with smarty and do not want to recreate all of them with plain php. Is there a ready combined solution i.e. Themed Smarty View? Thanks

    Read the article

  • Which PHP framework is closest to Ruby on Rails? CakePHP? CodeIgniter?

    - by Mike Duncan
    I'm going to be switching back and forth between Ruby on Rails projects and some as-of-yet undecided PHP MVC framework projects. Which of the PHP MVC frameworks out there (CakePHP, CodeIgniter?, others?) is most similar to Ruby on Rails in that the most conventions, locations, workflows, etc are preserved? I'm looking for the similarity in the way things are done such as directory structures, conventions, etc, not a pros vs cons in speed, extra features, etc.

    Read the article

  • Naming convention for the primary key in a Table

    - by kwokwai
    Hi all, I am learning the Model relationship types in cakephp. I have built twotables and in one of the Table A, I got these fields in it: Table A {postID, topic, content} Table B {replyID, content, postID} And when I ran the web page, a bunch of error related to SQL popped up saying that cakephp couldn't find post_id. It is weird that I have already declared the $primaryKey to be using postID in the tableA.php under Models folder, but cakephp seemed want me to change the ID field to post_id instead of postID, because the error disappeared after I have changed the primaryKey to post_id. ANy ideas?

    Read the article

  • Cake PHP Error: Make sure you have created index.ctp (???)

    - by Louis Stephens
    I was just starting to learn cakephp today by going through a "blog tutorial". I created my blog_controller.php and then created a folder named 'blog' with the apps/views/ structure. The next step in the tutorial was to create the index.ctp file within the blog folder under views. In the tutorial it declares that all error messages should be gone. However, I still receive an error message: Error: The view for BlogController::index() was not found. Error: Confirm you have created the file: /Users/trippstephens/Dropbox/cakephp-cakephp1x-348e5f0/app/views/blog/index.ctp For the life of me, I can not figure out what I have done wrong. I am running cakephp under MAMP and it "installed" successfully. Any help would be appreciated.

    Read the article

  • What are the possible reasons for App::import() not working?

    - by Julien Poulin
    I'm trying to implement a simple way to manage static pages in CakePhp, as described in this article. The problem I'm facing is that App::import() doesn't seem to import the required class in the routes.php file. The code is the following: App::import('Core','ClassRegistry'); $page = new StaticPage(); $slugs = $page->find('list', array( 'fields' => array('StaticPage.slug'), 'order' => 'StaticPage.slug DESC' )); I'm getting the error: Fatal error: Class 'StaticPage' not found in ... I just started CakePhp a few weeks ago and I guess I'm missing a simple thing here... I'm using CakePhp 1.3 and Php 5.2.42.

    Read the article

  • .htaccess setting is not working on Google Chrome

    - by Zack
    I am using CakePHP framework, it redirect everything to the app folder using .htaccess, and then I set up a WordPress blog in /news/ folder outside of CakePHP, so I don't want everything in /news/ to be redirect, so I modify the .htaccess, and here is the final version: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/news/(.*)$ RewriteRule ^.*$ - [L] </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> It's working fine in IE and FireFox, I can visit mydomain/news/, but in Google Chrome, it still redirects to CakePHP app folder. How can I fix this?

    Read the article

  • Mod_rewrite (CakePHP routing functionality) forbidden after Snow Leopard upgrade

    - by Ryan Ballantyne
    Hello ServerFault, I am using the standard Apple-provided installations of PHP 5.3 and Apache 2 to do web development on a Mac Pro that I just upgraded to Mac OS X 10.6 (Snow Leopard). The upgrade went well enough, if I ignore the fact that it destroyed my ability to get work done. ;) After the update, the CakePHP application I was developing started giving me 403 Forbidden errors when accessed. Based on the errors in the log file, I've determined that Apache is choking on the mod_rewrite rules in Cake's .htaccess file. Here's the file, in its entirety: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> It's not that the rules themselves are wrong, but that Apache is forbidding the use of mod_rewrite altogether. All other pages on the machine work fine, and the 403 errors go away if I comment out the .htaccess file (but nothing works, of course). In my httpd.conf file, I've tried changing this: <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> To this: <Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Allow from all </Directory> ...which has no effect. I don't know much about Apache configuration files, and I'm quite stuck on this. In fact, I know little enough that I'm not sure which information about my setup is needed to enable people to provide useful answers. I'm just using the vanilla OS X setup, nothing fancy. Googling has yielded no fruits for me this time, so I'm turning to you. Any ideas?

    Read the article

  • Comparing ASP.Net Framework to Cakephp, Zend , Ruby on Rails

    - by numerical25
    I am a PHP developer migrating to C# ASP.Net Framework. As of right now, I am experienced in using Php for developing sites and I use CakePhp and Zend framework as my RAD tools to help me produce better applications. As I move over to ASP.NET, I have this view that C# ASP.Net framework itself is already a RAD tool and is equivalent to using Cakephp, Zend, or even Ruby on Rails. So I really shouldn't have no concerns trying to find a separate library for ASP.NET that will help me produce better applications. To me, in a sense the ASP.NET is already like a MVC cause it seperates the model from the view and the methods are almost like controllers. So as far as having the best tools are concerned, should I be satisfied with just using ASP.NET as my RAD tool.

    Read the article

  • A simple message board with WYSIWYP

    - by kwokwai
    Hi all, I am making a simple message board with some WYSIWYP function using cakePhp 1.26. I have googled for some hints and finally reached this URL: http://bakery.cakephp.org/tags/view/wysiwyg But I am not sure which one is the best out there.

    Read the article

  • CakePhp on IIS: How can I Edit URL Rewrite module for SSL Redirects

    - by AdrianB
    I've not dealt much with IIS rewrites, but I was able to import (and edit) the rewrites found throughout the cake structure (.htaccess files). I'll explain my configuration a little, then get to the meat of the problem. So my Cake php framework is working well and made possible by the url rewrite module 2.0 which I have successfully installed and configured for the site. The way cake is set up, the webroot folder (for cake, not iis) is set as the default folder for the site and exists inside the following hierarchy inetpub -wwwroot --cakePhp root ---application ----models ----views ----controllers ----WEBROOT // *** HERE *** ---cake core --SomeOtherSite Folder For this implementation, the url rewrite module uses the following rules (from the web.config file) ... <rewrite> <rules> <rule name="Imported Rule 1" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" /> </rule> <rule name="Imported Rule 2" stopProcessing="true"> <match url="^$" ignoreCase="false" /> <action type="Rewrite" url="/" /> </rule> <rule name="Imported Rule 3" stopProcessing="true"> <match url="(.*)" ignoreCase="false" /> <action type="Rewrite" url="/{R:1}" /> </rule> <rule name="Imported Rule 4" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> I've Installed my SSL certificate and created a site binding so that if i use the https:// protocol, everything is working fine within the site. I fear that attempts I have made at creating a rewrite are too far off base to understand results. The rules need to switch protocol without affecting the current set of rules which pass along url components to index.php (which is cake's entry point). My goal is this- Create a couple of rewrite rules that will [#1] redirect all user pages (in this general form http://domain.com/users/page/param/param/?querystring=value ) to use SSL and then [#2} direct all other https requests to use http (is this is even necessary?). [e.g. http://domain.com/users/login , http://domain.com/users/profile/uid:12345 , http://domain.com/users/payments?firsttime=true] ] to all use SSL [e.g. https://domain.com/users/login , https://domain.com/users/profile/uid:12345 , https://domain.com/users/payments?firsttime=true] ] Any help would be greatly appreciated.

    Read the article

  • Cookie not renewing/overwriting in IE

    - by deceze
    I have a weird quirk with cookies in IE. When a user logs into the site, I'm generating a new session id and hence need to overwrite the cookie. The flow is basically: Client goes to https://secure.example.com/users/login page, automatically receiving a session id Client POSTs login credentials to same address Client receives the following headers together with a 302 redirect to https://secure.example.com/users/mypage: CAKEPHP=deleted; expires=Sun, 05-Apr-2009 04:50:35 GMT; path=/ CAKEPHP=98hnIO23...; expires=Mon, 12 Apr 2010 04:50:36 GMT; path=/; secure Client is supposed to visit https://secure.example.com/users/mypage, presenting the new session id. This works in all browsers, except IE (tested in 7 & 8). IE retains the old, unauthenticated session id, and is redirected back to the login page. It works on my local test environment (using a self-signed certificate at https://localhost:8443/...), but not on the live server. I'm using CakePHP and simply issue a $this->Session->renew(), which produces the above cookie headers. Any ideas how to get IE to accept the new cookie?

    Read the article

  • Passing a URL as a URL parameter

    - by Andrea
    I am implementing OpenId login in a CakePHP application. At a certain point, I need to redirect to another action, while preserving the information about the OpenId identity, which is itself a URL (with GET parameters), for instance https://www.google.com/accounts/o8/id?id=31g2iy321i3y1idh43q7tyYgdsjhd863Es How do I pass this data? The first attempt would be function openid() { ... $this->redirect(array('controller' => 'users', 'action' => 'openid_create', $openid)); } but the obvious problem is that this completely messes up the way CakePHP parses URL parameters. I'd need to do either of the following: 1) encode the URL in a CakePHP friendly manner for passing it, and decoding it after that, or 2) pass the URL as a POST parameter but I don't know how to do this. EDIT: In response to comments, I should be more clear. I am using the OpenId component, and I have a working OpenId implementation. What I need to do is to link OpenId with an existing user system. When a new user logs in via OpenId, I ask for more details, and then create a new user with this data. The problem is that I have to keep the OpenId URL throughout this process.

    Read the article

  • Why is my .htaccess file redirecting to full server path instead of relative path?

    - by death.au
    I've never had a problem with cakePHP before, but something's odd about this server and is causing the redirects in the .htaccess files to behave oddly. CakePHP uses mod_rewrite in .htaccess files to redirect requests to its own webroot folder. The problem is that the redirects are listing the wrong path and causing a 404 error. My CakePHP application, which is stored in the listings directory, has a .htaccess file as follows: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app/webroot/ [R=301,L] RewriteRule (.*) app/webroot/$1 [R=301,L] </IfModule> (*note that the R=301 causes an external redirect so we can see what is going on from our end. It should really omit this flag and do the redirect internally, transparent to end-users) This is supposed to redirect any request from http://hostname.com/~username/listings/ to http://hostname.com/~username/listings/app/webroot/ However, rather than simply adding “app/webroot/” to the end as it is supposed to, it is adding the full server path ( /home/username/public_html/listings/app/webroot/ ) resulting in the final URL http://hostname.com/home/username/public_html/listings/app/webroot/ which is obviously incorrect and triggers a 404 error. The hosting is on a shared hosting account, so that limits what I can do with the settings. I've never seen this happen before, and I'm thinking it's something wrong from the hosting side of things, but if anyone has some helpful suggestions then I can put them to the hosting company as well.

    Read the article

  • compromised site

    - by pinniger
    So, I have a web site that has been compromised twice in two weeks. every index.php and .js file gets a script injecting into the source code of the file. The problem is that I have no idea how they're doing it. I've seen this done via sql injection before, but I don't know how they are actually writing to the file. I've dug through the Apache logs but didn't find anything interesting. The site is built using the cakephp framework on a godaddy shared server. Anybody know what secturity settings or log files to check to see how they are doing this?

    Read the article

  • .htaccess rules to have cakephp in root and wordpress in subfolder

    - by cc-mf
    Hello, How can I combine the .htaccess rules for cakephp RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] with the following RewriteEngine On RewriteCond %{HTTP_HOST} folder.yoursite.com RewriteRule ^(.*)$ /folder [L] in other words redirect anything to app/webroot/ except /blog (wich is an exisiting folder with a wordpress installation) and redirect blog.domain.com to the blog subfolder Thank you very much

    Read the article

  • learning OO with PHP

    - by dole doug
    Hi there I've started to learn OO programming, but using the PHP language with the help of the "PHP 5 Objects, Patterns, and Practice" book. The thing is that I wish to learn to use into same time the CakePHP framework which make use a lot of the MVC pattern. Because I don't know much about OO and less about MVC I wish to understand the later one but assumptions I make with my OO knowledges might have bad impact on long term. Does anyone know a good tutorial about what means MVC (more than cakephp manual says about it, but more easy to read/understand than wikipedia)? TY

    Read the article

  • Encode URL while send ajax

    - by meotimdihia
    I use cakePHP and it generate ajax /animemanga/animes/search/page:1?type%5B0%5D=3&amp;genre%5B0%5D=20&amp;genre%5B1%5D=4&amp;info%5B0%5D=episodes&amp;info%5B1%5D=released&amp;info%5B2%5D=rating&amp;info%5B3%5D=synopsis&amp;info%5B4%5D=completed&amp;info%5B5%5D=rating_count&amp;info%5B6%5D=name&amp;info%5B7%5D=id&amp;info%5B8%5D=name&amp;info%5B9%5D=id cakePHP encoded: & = &apm; will create error while use with Ajax. I use Jquery, browser Opera. how can this solve ?

    Read the article

  • ACL suggestions needed for a small light framework developed

    - by Sai
    Hello all, I've developed a small framework that was needed for the firm that I work. The problem is I've not made a full level framework, as developers are finding tough time to understand what is what, So I made a simple structure with app/controllers, app/models, app/views so that they can clearly separate the code and can get used to higher frameworks later. All other things like components/modules/helpers are just coded for now in a file called app_functions.php. The above framework is derived from cakePHP, not all, but just the framework uses a modified code of dispatcher of cake. The models all work with normal sqls, and views with pure html using a template engine. Now I'm trying to develop a small application over it, it cameout well, but ACL is something which many versions of it have not proved that satisfactory. Can anybody suggest a good ACL. I've checked phpGACL(too heavy), Zend_ACL likely won't be compatible, Cakephp's ACL which wont fit in the structure,as we are not using cake's SQLs, as there too many queries hitting the database for one page display.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >