Most voted "cakephp" questions
Cakephp is a framework written in PHP whose main objectives are to provide a framework that enables PHP programmers of all levels to develop robust applications quickly, without losing flexibility. Cake-PHP utilizes well-known software engineering concepts and design standards such as Activerecord, Association Data Mapping, Convention on Configuration, Front Controller and MVC (Model-View-Controller).
Learn more…376 questions
Sort by count of
-
1
votes1
answer469
viewsMaintain subdomain sessions with Cakephp
I’m having trouble keeping sessions active between system subdomains, I’m using Cakephp version 2.4.7, I’ve added the function below in App/bootstrap.php ini_set('session.cookie_domain',…
-
1
votes3
answers931
viewsLogin Cakephp 2.0 does not work
I had already successfully logged in with the default table and fields in cakephp, I decided to change the table and fields for login and now do not log in. File Logs/login.ctp: <div…
-
1
votes2
answers313
viewsHow to set up cronjobs in cakephp?
How do I use cronjobs in Cakephp, need to call a controller action on the linux server, is the script path? I’ve tried it here and it didn’t work!
-
1
votes1
answer312
viewsHow do I check if it was an INSERT or UPDATE in Cakephp’s save method?
Hello, I have a script that gets an ID by a POST notification along with other data. It turns out that the ID is from a transaction created on another system (Ids are not generated by…
-
1
votes1
answer378
viewsInvalid login message always appears in Cakephp
When I log in to my login page, the warning message appears that the user or passwords are invalid, but this should only appear after pressing the login button. There’s no way around this? My view:…
-
1
votes1
answer1118
viewsAfter registration, redirect to another Cakephp layout
I have a layout for the home page of my project, with only a registration form and nothing else. After the person signs up, they are redirected to another page, completely different from the home…
-
1
votes1
answer296
viewsHow to make only the webroot folder visible to everyone?
In the Cake documentation, it indicates there you should only have this folder visible to everyone. How can you do that? This protects my application’s code from being tampered with?…
-
1
votes1
answer204
viewsControllers in Cakephp Subfolders
Would you like to know how I can put controllers in subfolders in Cake? I made the following change in bootstrap.php but it didn’t work: App::build(array( 'Controller' => array( ROOT .…
-
1
votes1
answer541
viewsCakephp relationship HABTM
I have a question related to Framework Cakephp. Is the following: Suppose we have a relationship hasAndBelongsToMany (HABTM) between a Model Pessoas and Projetos, with tables of the same name. The…
-
1
votes3
answers405
viewsPick up last Wordpress post on Cakephp
When loading: define('WP_USE_THEMES', false); require(ROOT.'\blog\wp-blog-header.php'); I’m having the following mistake: Fatal error: Cannot redeclare __() How can I upload the latest blog post to…
-
1
votes1
answer384
viewsUsing Cakephp, how to generate editable Pages?
I’m developing a site using Cakephp, but although basic I would like to know the correct way to create pages like : Home, Contact, About, simple user page(logged in with permission 1), administrator…
-
1
votes1
answer100
viewsAutomatic process in PHP
I wanted to know how to (and if possible) leave something automatic occurring in PHP. My idea is, a site where it automatically collects data from another site and stores it in a database only…
-
1
votes0
answers84
viewsDrag and drop in a cakephp listing
I have to sort through the drag-and-drop methods. I wonder how you could use this in cakephp? The problem is this: I have several records returned in a list, I would like to drag for example, the…
-
1
votes0
answers75
viewsCakephp Ubuntu Error
I have an error in the system exclusively in Ubuntu, when I run with apache in windows it works normally, but when I order run with apache Ubuntu it gives the following error: Fatal Error Error:…
-
1
votes1
answer122
viewsApp:Uses does not work on the server
I created a class in the Lib folder of cakephp with some functions. Testing locally, and adding to controller App::uses('readMessages', 'Utility'); Everything works properly, but when I upload to…
-
1
votes1
answer84
viewsSUBSTRING_INDEX with REGEX
It has as I make a search of the last name of a people but with regular expression? Today I use the SUBSTRING_INDEX to catch the last name, the more I want to take parts of this last name, when I…
-
1
votes0
answers268
viewsHow to pass a vector from a view to a controller?
I have a view that prints a report on the screen. I put a button and am doing a function to export this report to excel. My question is: How to send this data that is in an array to my controller?…
-
1
votes2
answers150
viewsFormatting JSON in cakephp
I’m generating a json from a find in Cakephp. Controller: public function listar() { $this->layout = 'ajax'; $this->set('resultados', $this->Sala->listarSala()); } Model: public function…
-
1
votes1
answer275
viewsLog into restricted area of external site
Hello. I have a site with login form and I want the user to be redirected to the restricted area of another site, which was made using Cakephp
-
1
votes0
answers65
viewsHow to debug (show errors) on a system that uses Mootools?
all right? I don’t know JS in depth, but I need to debug a chunk of code that uses Mootools. When I tell my code to write an array with print_r or debug (from cakephp), I don’t see anything and the…
-
1
votes1
answer454
viewsError while saving data
I’m learning how to use Cakephp, and I’m trying to make a tool to upload images using cake 2.4.4. the problem is that only the fields modified and created are entered into the database, although…
-
1
votes1
answer79
viewsCakephp: Why is Model not being loaded correctly?
Model: CategoriaBanner Controller: CategoriasBannersController One thing’s keeping me up at night: When trying to use create(); it gives object error when trying to use what would be the…
-
1
votes1
answer127
viewsPerformance in dynamic menus
I’m building a cakephp and mysql application, and would like to display some menus and items dynamically through the database. Better example: Display latest updates, latest entries in the database,…
-
1
votes1
answer735
viewsCakephp - Loading a background-image css
I’m not being able to upload my image to the Css Background style.css - working, just not able to call this image .layout{ width: 100%; height: 230px; position: relative; margin: auto;…
-
1
votes1
answer167
viewsHow to create a login page with registration?
I’m creating a web application in cakephp and I’m having doubts because I can’t create the log-in button on the login page. My code is this on \View\Users\login.ctp: <div class="container">…
cakephpasked 10 years, 7 months ago user3332475 11 -
1
votes1
answer61
viewsIn Cakephp, why does the input method generate an empty selector?
In my application there are 2 related models and Shortcut and Role, where Role has several Shortcuts, the link between the two occurs normally, except when trying to create an input in the "save"…
-
1
votes1
answer175
viewsCondition inside foreach before saving model
In my Controller of Cakephp was made a foreach passing all data from a form to a variable. Now, how do I make one if specific, that its objective would be if the value that the foreach is passing is…
-
1
votes2
answers162
viewsCreating a link from one site to another in cakephp
I’m having a problem, I’m creating a button, which is on an X site, but the controller the action of the link is on the Y site. My problem is that when I click the button, it references the…
cakephpasked 9 years, 9 months ago Michel Henriq 647 -
1
votes1
answer45
viewsError: Shell class Syncaccesstokenshell could not be found
My app is cake 2.4.4, is hosted on Amazon. Before the server was apache, but now we migrate to Nginx for better performance. As it was to be expected several problems occurred (normal), one more of…
-
1
votes1
answer72
viewsDisregard HTTP authentication for a given URL
I have an application developed in Cakephp 2, but I believe that the issue does not have as much involvement with the framework itself, just citing to contextualize. Being this private application,…
-
1
votes1
answer521
viewsHow to dynamically add and remove fields generated via Cakephp?
Hello. I have a <select> which is powered by database data. I need to manipulate this select and multiply it if the user wishes to send two different data. How the <option>s depend on…
-
1
votes1
answer65
viewsIs there any way to "summarize" elseif’s?
In my Cakephp project, there are two dropdown fields to do a database search, both as string’s. I need to add two more fields (both dates). In the code below (controller), I used 4 if’s to check the…
-
1
votes1
answer122
viewsHow to keep a controller item in static part of the page?
It’s the following guys, I have a page of the project that serves as a standard for all the others, a Layout.. However I wish to add an item (informative) in it, and it only remains on the home page…
-
1
votes1
answer179
viewsCakephp 3 - Vendors
How do I import a vendor into cakephp3? I tried it this way: require_once(APP . 'Vendor' . DS . 'Dailymotion' . DS . 'Dailymotion.php'); but it returns me the error: Fatal error: require_once()…
-
1
votes1
answer42
viewsRedirect cakephp
I created an action, in which, when clicking an icon on the page, it calls this action and in itself has a redirect to the page itself. The problem is you’re not doing this redirect. Action: public…
cakephpasked 9 years, 8 months ago Michel Henriq 647 -
1
votes1
answer86
viewsRoute + Pagination - Cake 2.x
I have a "classic" question about paging. I did as below, everything worked normally, only I could not mount the route for paging to stay as I want. I tried that: Controller class NoticiasController…
-
1
votes0
answers130
viewsCakepdf for Cakephp 3.x, DOUBT!
I’m using Cakepdf, pro cake 3.x Follow the link : https://github.com/FriendsOfCake/CakePdf/tree/3.0 I’m having problems, because I did it according to myself.. and when I type .pdf.. is the best…
-
1
votes1
answer266
viewsReturn records from a table whose key is referenced in another Cakephp 3
I’m using the ORM native of Cakephp 3 to retrieve the product table records (through the ID) along with the records that references it with the following method: public function view($id) {…
-
1
votes1
answer48
viewsChildren/Parent cakephp
In the code below, I have a Select, that returns all my accommodations that are with parent_id null, which in case would be all accommodations FATHER. But when it comes time to return, I need you to…
-
1
votes1
answer391
viewsGet data from another Model
I’m not getting a phone related to a user on View edit(). I can get the phone number on ver() but not in the edit(). Controller Patient: public function edit($id = null) { if…
-
1
votes1
answer74
viewsInput listing cakephp query result
Hello, I’m trying to list a result of a query of my controller in an input, but it is returning zero, but when I give print_r, it returns me all array, what’s wrong? Controller: public function…
cakephpasked 9 years, 9 months ago Diego Krashowisk 11 -
1
votes1
answer169
viewsHow to safely upgrade Cakephp from version 0.2.9 to the latest version
I took a website to manage which is a content manager that was developed in CakePHP in the version 0.2.9. I would like to know which is the correct and safest way to upgrade to the version 2.0 or…
-
1
votes1
answer294
viewsSearch query in cakephp
I want to do a query that finds the date, but the query below is finding even when I do not pass value or when it is a value that has nothing to do with date: $busca =…
cakephpasked 9 years, 3 months ago André Nascimento 1,258 -
1
votes0
answers367
viewsRedirect if not logged in to Auth Cakephp
I’m having a little doubt. I set the beforeFilter correctly to allow access to the appropriate actions. My question is this. When I try to access a certain action in a given controller, the…
-
1
votes1
answer28
viewsFor + Count in Cakephp
I’m trying to get my for rotate according to how many pictures are 'inputadas' in SELECT. The problem is that regardless of how many images are 'inputadas', it only saves the first one. What’s wrong…
cakephpasked 9 years, 9 months ago Carlos Dagmar 11 -
1
votes2
answers62
viewsHow to use User-informed search conditions ( Not required )
My doubt is a little complicated to explain, but come on. I have several Checkboxs, where it is not mandatory to select them to do the search, are only search parameters, my question, how to do this…
-
1
votes2
answers583
viewsSend emails with built-in HTML/CSS Cakephp
Good afternoon! I’m trying to do something "simple", I need to send a stylized email, I don’t want to send just text, I need to insert html and css tags. Before working with cakephp I used the…
-
1
votes0
answers46
viewsjquery combobox with cakephp 2x
With the code similar to what jquery ui provides, I am testing this combobox in my cakephp, the problem is that in no way it shows the arrow to enable the dropdown menu, already downloaded jquery ui…
-
1
votes1
answer243
views.htaccess does not allow entering folders
I have a website in Cakephp and its due htaccess correctly. The problem is because I created an additional domain in the hosting and as usual, it creates a folder in the public_html to put the files…
-
1
votes0
answers61
viewsPassing sql in CAKEPHP array input
I need to make 3 queries, if x icon is enabled, make query X. If it is y icon, query y. If both are, I want everything from x and y query. I can get the x and y query, but when it comes to getting…