Most voted "cakephp-2" questions
Cakephp Version 2 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.
Learn more…92 questions
Sort by count of
-
3
votes1
answer50
viewsFind where heavy query is generated
Good morning I need to find where in Cakephp 2.5.2 this query is performed: SELECT COUNT(*) AS count FROM umatabela WHERE status = 1 Has a model where this table is referenced, and may be referenced…
-
3
votes1
answer440
viewsAdd and remove fields generated via Cakephp
I have a <select> which is powered by database data. I need to manipulate this select and multiply it in case the user wants to enter more different data. I also need to change the "name"…
-
3
votes1
answer1829
viewsHide domain directory using htaccess or cakephp router
I am having trouble creating a setup on . htaccess to hide a folder from my site. My domain has the following structure: www.site.com.br/cake , where are the files and folders referring to the…
-
2
votes2
answers1347
viewsCall to a Member Function find() on a non-object
I’ve been racking my brain here for a while and I still don’t understand the mistake. I’m learning about Cakephp. I did the Regionals table MVC manually, and for the others, I used the Bake. The…
-
2
votes1
answer384
viewsConfiguring Cakephp with Composer
I installed Cakephp on a MAMP (Mac OS X) server and configured the cakephp-upload plugin there was the hint of installing the plugin using the Composer. I set up my composer.json as follows: {…
-
2
votes1
answer132
viewsDropdown with "default" value and "all" option
Using Cakephp in my project, I created a dropdown to use to search the database by values and strings. I need to create an "all" option to search for all results and to be the "default" option of…
-
2
votes0
answers20
viewsHow do I pass vectors from one controller to another in cakephp?
I wonder if you have how to go from one controller to another passing parameters. For example: I have an array with information in one view and would like to send it to another controller. How to do…
-
2
votes1
answer251
viewsHow do I resolve this Cakephp issue on my Mac?
Warning: require(/Applications/XAMPP/xamppfiles/htdocs/cake-teste/bookmarker/vendor/autoload.php): failed to open stream: No such file or directory in…
-
2
votes2
answers841
viewsGoogle Maps API and Google Indoor Maps
Good afternoon. I work with Network Design and Structured Cabling and developed an application for fiber optic mapping with the Google Maps API, which you can see in the following URL:…
-
2
votes1
answer4783
viewsremove duplicate values in multidimensional array
I have a huge multidimensional array and need to remove duplicate values with PHP or some function that does this when using Cakephp. Array structure: Array ( [0] => Array ( [Advertencia] =>…
-
2
votes1
answer94
viewsCakephp Submit form using Jquery?
I have a form in Cakephp and I want to make the Submit of this form using Jquery. I’m looking for a solution on how to do this without using Cakephp’s Jshelper, I want to use only the same native…
-
1
votes2
answers1630
viewsIn php how to run a function after past X days of last run
I’m designing changes and routines in a web application created in PHP and Cakephp, in which case one of the routines would be a Component run every 15 days , to update a file. html As in PHP I…
-
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
votes2
answers1096
viewsChange the value of a select in Cakephp
I’m making a system, and there’s a part of it that needed a select. The names inside the select are being displayed, but the data saved in the database (mysql) is relative to the 'id' field, and…
-
1
votes1
answer362
viewsHow to customize error pages in cakephp?
How to create custom error pages in cakephp?
cakephp-2asked 9 years, 11 months ago Devidy Oliviera 381 -
1
votes2
answers685
viewsHow many lines did a database query return (Cake PHP)?
$this->Post->Comment->find ('all', array('conditions' => array('Comment.post_id' => $id))); I do this query, how to know if returned 5, 7, 10... comments before displaying them in the…
-
1
votes1
answer1288
viewsHow to pass parameters using cakephp redirect?
I am using the following code snippet in my controller: $this->redirect(array('action' => 'duplicate', $contact)); The $contact variable contains an array. The command redirects to the…
cakephp-2asked 9 years, 10 months ago Devidy Oliviera 381 -
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
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
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
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
answer419
viewsHow to use the "Answer" of an XMLHTTPREQUEST in Cakephp (2.5)
CONCLUSION: I put it up here to get a quick look, I was using onClick to get this function, but I was leaving the request(request) out of function so it wasn’t working. I have an action in the Posts…
-
1
votes1
answer599
viewsHow do I get a saved record from the Cakephp database
Good evening, how do I get a specific field on my table. I wanted to take this field and receive it in a variable and show in the view. Thank you!!
cakephp-2asked 9 years, 9 months ago Everton Silva 7 -
1
votes1
answer178
viewsHow to insert an audio/mp3 using Cakephp?
I’m trying to view this: <?php echo $this->Html->media('musica.mp3'); ?> but nothing appears
-
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
answer245
viewsCakephp site does not work on localhost
Hello. I have a cakephp site running on an internet server. I’m trying to move to my local machine (Windows 8.1) where I already have xampp running with Cakephp in version 2.1.0. I downloaded the…
-
1
votes1
answer41
viewsGoogle Adsense with Cakephp?
I’m trying to put an Adsense banner on Cakephp and I’m not getting it, the banner just doesn’t show up. How to do this ? footer.ctp <footer> <?php echo $this->fetch('script');?>…
-
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
votes1
answer46
viewsQuery does not return all record data
The following query returns the correct record, but missing items on its return. $nota = $this->Nota->find('first', [ 'conditions' => ['id' => $numero, 'serie' => $serie ] ]); For…
-
1
votes1
answer70
viewsBake cannot find model and controller files
I am using cakephp version 2.9, to make it easier I decided to leave all applications with a single core. So far everything ok, but when using Bake to be faster it does not find the…
-
1
votes0
answers33
viewsAccess external webservice with cakephp
I’m trying to make requests on external Webservices with Cake’s Httpsocket, in the documentation you have this example $HttpSocket = new HttpSocket(); // string query $results =…
-
1
votes1
answer35
viewsSession from the Config
I have the following case: I want to send an email from cakephp, but since there is more than one user in the database (each containing a different email), I need to send each user’s email and…
-
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
votes0
answers27
viewsCakephp with Vendors
Hello, good morning, sir. I have a project done on Cakephp 2, and the need arose to use HTML2PDF, installable by Composer, which was never used in this project. When I install HTML2PDF by Composer,…
-
1
votes0
answers84
viewsShowing error message
I made the following validations in Model: class Inscricao extends AppModel { public $name = 'Inscricao'; public $useTable = 'inscricoes'; public $validate = array( 'nome' => array( 'between'…
-
1
votes2
answers208
viewsCakephp 2.x: Custom Query Paging
I’ve hit my head a lot so far to try to understand how Cakephp pagination works with Custom Query’s but haven’t had much success. This is the method I currently have, I want to make a pagination on…
cakephp-2asked 9 years, 3 months ago AComerlatto 341 -
1
votes1
answer105
viewsupdate mysql attribute according to a day (12/12/2019) cakephp, mysql
I have the following problem: If a client does not pay a certain portion, he would like the system (mysql+cakephp) to place the client with the debtor status. would have some way to automate this,…
-
1
votes1
answer121
viewsI’m unable to update a field in Cakephp with $this->Model->saveField()
I’m unable to update a certain field in Cakephp. When the $this->OrdemServico->saveField(), he simply does not perform. Code: class OrdemServico extends AppModel { public $name =…
-
1
votes1
answer223
viewsHow to insert a CDATA type node in the xml generated by Cake PHP
With the code below XML in the CakePHP, however I need some nodes, have another CDATA type node. Example: <![CDATA[ Buscape Teste ]]> But I don’t know which parameter I have to pass for him to…
-
1
votes1
answer132
viewsCakephp 2.X : External SESSION
I have the following situation: I have my application running with Cakephp 2.X, but the authentication system is external and I don’t have access to it, the only thing I was given are the $_SESSION…
-
1
votes1
answer34
viewsYou doubt conditions in cakephp?
I’m trying to make a conditions in a find. I have 2 tables: tipopessoas and pessoas, on the table pessoas I have a foreign key for table tipopessoas. I want my find to bring the result only to two…
-
1
votes1
answer229
viewsHow to make two relationships for the same table?
I have a table called advertencias, in this table I have 2 Foreign key for the same table called pessoas in this table person I have two types of person Student and Teacher, then in the table…
-
1
votes1
answer494
viewsCreating/Viewing HTML report
Guys, I have a problem and I couldn’t think of a solution ... People who have used iReport know that it has to do grouping very easily in it... The problem is that I am now reporting in HTML ( in…
-
1
votes1
answer56
viewsAssembling a CAKEPHP Array
Guys, I need some help setting up a bad array here. I got a calendar (bootstrap Calendar) ready and I’m trying to implement it on my site with Cakephp. All right with the layout but when searching…
-
1
votes1
answer87
viewsLink to cakephp within jquery?
How to create a link using Cakephp conventions within Jquery ? I’m trying like this but I still can’t make it work. $(document).ready(function() { $('#dataTables-example').DataTable({ "processing":…
-
1
votes1
answer431
viewsUsing Jquery Datatable with Cakephp?
I’m trying to use Jquery Datatable server-side with Cakephp but I’m not getting it. I am looking for some example for this but not yet found. When running Datatable Jquery returns an error: Uncaught…
-
1
votes0
answers16
viewsProblems in find() Cakephp
Good afternoon, I’m making one find() to check if in the period chosen by the user the feature he will use is available, the only problem I found in it was that if I have an event at 10:00 to 15:00…
cakephp-2asked 8 years, 6 months ago Rodrigo Gaster 71 -
1
votes1
answer97
viewsLog Shell cakephp
I have a SHELL file in cakephp as below: <?php class AtualizarIndicadoresNormaisShell extends AppShell { public function atualizar() { //Chama model e sua action…
-
1
votes0
answers216
viewsError sending email: Connection refused cakephp
[CAKEPHP 2] Hello guys, I’m having a problem sending email on a website that is hosted, the local server works normally, but once it gets hosted it doesn’t work. I did the hosting by goddady,…
-
1
votes2
answers2337
viewsTake the value of a select and play in php variable
How do I get the selected value from a select and already print it? I have a simple form, when the user selects the value I want to assign to a php variable, because I will show the selected…