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
-
0
votes1
answer96
viewsSimplesaml using Cakephp - Simplesaml_error_nostate: NOSTATE
I’m trying to configure simpleSAMLphp using Cakephp, in the project using only PHP works all right but using Cakephp-simpleSAMLphp-Plugin I got the errors when I try to access the View: Warning…
-
0
votes1
answer172
viewsLinking Tables to Cakephp
There are two tables in the database, posts and comments and I want to relate them. I think I have to create a foreign key in the table comments in a field that holds the title or table id posts, so…
cakephpasked 9 years, 11 months ago I Wanna Know 907 -
0
votes1
answer1166
viewsCakephp 3 - Inner Join
How do I link an article table to a table of favorite articles using cakephp 3. bookmark table: CREATE TABLE IF NOT EXISTS `favorites` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL,…
-
0
votes1
answer608
viewsHow to access a function variable in another function
Let’s just say I have the job public function testeX(){ $x = 1; $this->set('x', $x); } And I want to access the value of x in another Function that has a view testY.ctp public function testeY(){…
-
0
votes2
answers72
viewsContain or John, huh?
I have the following code: $contacts = $this->Contact->find('all', array( 'limit' => 20, 'contain' => array('Address', 'Phone' => array('fields' => 'Phone.phone' ), 'Campaign'),…
-
0
votes2
answers571
viewsError generating PDF in Cakephp through FPDF
I’m rewriting a legacy system of the company I work on (using Cakephp for this) and it generates some PDF reports using FPDF. However, in Cakephp I cannot generate any PDF. Follows the code Action…
-
0
votes0
answers95
viewsUpdate information without updating the page with Cakephp 3
How do I update some information without updating the page, I am working with Cakephp 3. Ex: I have 2 lists, one with all items and another with favorite items. In the first list I have the option…
-
0
votes1
answer136
viewsConsole. My application works normally no longer I can use the Console
My application works normally more when I try to use the Console it gives the following error: PHP Warning: include(Cake/Console/Shelldispatcher.php): failed to open stream: No such file or…
-
0
votes1
answer86
views3 levels of Cakephp data
Suppose I have the following tabaelas products brands manufacturers Then I will have 3 models. One for each table. Each model is configured with the following schema: Product model -> belongsTo:…
cakephpasked 9 years, 9 months ago user21494 -
0
votes1
answer532
viewsError generating PDF with mPDF
I rode this script to generate a PDF invoice, but when I try to generate the PDF the message appears: This PDF document may not be displayed correctly. <?php $meses = array( '01' => 'Janeiro',…
-
0
votes1
answer50
viewsAjax + Auth Cakephp only returns false
I’m using ajax to log in to my system using Cakephp Page with Ajax <form id="login"> <input type="text" name="username" placeholder="Usuário" required> <input type="text"…
-
0
votes0
answers43
viewsUsing Virtualfields in cakephp variable
I created a virtual field, but I don’t have much concept about it, until today I only used to make pagination, as I do to use the result of this virtual in a variable? public $virtualFields = array(…
cakephpasked 9 years, 3 months ago Michel Henriq 647 -
0
votes1
answer39
viewsChange Children id to another id
I made a panel with some functions of Tree, edit, move and delete. Until then my erasing is working when I want to erase a specific thing without children. The problem is that when I delete an item…
cakephpasked 9 years, 7 months ago Roberto Saragoça 1 -
0
votes0
answers96
viewsSaving id from a select form
I need to save the id of a select, but in my select, is showing the name of the item, so in case I need to save in the database the id of this item. Form:…
-
0
votes1
answer33
viewsfpdf problems in cakephp
When I will create a new PDF class extending it to the FPDF to rewrite the methods Header, Footer, etc... This following error appears to me, I already searched but I could not solve.. this is my…
cakephpasked 9 years, 2 months ago Michel Henriq 647 -
0
votes0
answers80
viewsA query to add the values and select all fields according to the clause "Where" and "or" with the like operator
In cakephp, I want to do a query that takes all the values according to the parameter passed to the expense field or to the data_expense field, as well as summing the values of the expense…
cakephpasked 9 years ago André Nascimento 1,258 -
0
votes0
answers43
viewsParameter as array(cakephp)
I am passing this an array containing data from a form, to a function, but in php accuses this error. Cannot use string offset as an array. public function add($galeria_id) { if…
-
0
votes0
answers102
viewsMod_rewrite in Cakephp
I need to change all the URL’s of a website once it’s done. The current URL is in the following structure: www.meudominio.com.br/website/ And I would like it to be removed from all the internal…
-
0
votes1
answer336
viewsHow to work layouts and javascript in php frameworks
I am doing a course on frameworks and would like to know the following. The tool name itself already speaks: PHP framework Question: You mean the organization of html layouts and scripts based on…
-
0
votes1
answer148
viewsDifferent layouts in cakephp
My system when the user type the url it will fall on the login screen that has its own layout, after the login the user is redirected to an administration screen style Adminlte, however I do not…
-
0
votes1
answer56
viewsSave tab-pane active when updating the page
I have a two-tab structure, and I need to keep the active tab active when updating the page. I thought about making a click function that saves the id of the open tab, but I need to send a request…
-
0
votes0
answers18
viewsFailed Opening required no cakephp
I’m implementing a plugin in my cakephp project, but when I request a file that’s in the folder 'webroot/blog/file', he shows me the following message: Error: require()…
cakephpasked 9 years ago Michel Henriq 647 -
0
votes1
answer45
viewsHow to put an exact number of cakephp 2x pagination results
I believe that by this code I can set an exact number of results per page in my pagination public $paginate = array('limit' => 7,); It’s just that the results don’t follow that number, and they…
-
0
votes1
answer42
viewscontroller name with hyphen in cakephp 2x url
I’m working Google SEO on my site, and I realized, in word separations, a hyphen is better than an underline, or words together, only I realized that at first cakephp doesn’t accept creating…
-
0
votes1
answer150
viewsCSS is not being loaded
I have a client’s website http://suprimark.com.br/ it was working normally, but when the service agency was accessing, it appeared like this, without css, and it has calls to the files .css. I have…
-
0
votes1
answer30
viewsSitemap cakephp with Routes
Instead of doing sitemap on the nail, it is possible to make a method inside my Routes, which, all pages that exist in my project, are mapped by sitemap?
cakephpasked 8 years, 11 months ago Michel Henriq 647 -
0
votes2
answers214
viewsCakephp version 1.3.15 Error 500
I’m working on a project in Cakephp that I can’t test on localhost. I took the project already started and as I can not do the tests, put straight keeping always the backup and work like this is…
-
0
votes1
answer24
viewsCakephp 3 - Problem with Nested Eager Loading
I have the following table structure: Users Tools Groups All of them have membership from Many to Many And I already own the pivot Tables: groups_tools groups_users tools_users I am trying to do the…
-
0
votes1
answer59
viewsUnexpected end of file error in cakephp
I have a cakephp project that is in version 1.3.15 and I am trying to run in Xampp but it is giving this error as the attached print and this line corresponds to the closing of my html tag. Does…
-
0
votes0
answers101
viewsError Undefined variable: siteConfig APP/views/Elements/header.ctp, line 9
I have a problem uploading images to a project using Cakephp 1.3.15. The link below shows what is occurring. http://curia.mitrarj.org.br/files/images/list_type_5/_DSC9589_16022016124709.jpg Follows…
cakephpasked 8 years, 9 months ago fabricio_wm 1,090 -
0
votes1
answer30
viewsDaily cakephp 2x routine
How would I create a daily routine, so that every day he runs a trial? Would you do this via linux(crontab)? or is there a different and more practical way?
cakephpasked 8 years, 9 months ago Michel Henriq 647 -
0
votes1
answer91
viewsSubmit without reloading page cakephp
How do I give Ubmit to pages without reloading with cakephp?
-
0
votes1
answer208
viewsSynchronize local app times via internet
Hello. I have an application that I’m building in cakephp. The application keeps showing the date and time on the page, but it’s computer time. How do I get the time of some server or internet link?…
-
0
votes1
answer35
viewsHow to edit project online on a server?
Long live! I’m developing an application in cakephp 3, uploaded to the server, someone knows a way to continue working on the project with an IDE even on the server?
-
0
votes1
answer97
viewsredirect to the view
How can I redirect to cakephp based on the following code: <noscript> //redirecionamento aqui </noscript> I’m using: <noscript> <meta http-equiv="refresh" content="1;…
cakephpasked 8 years, 5 months ago André Nascimento 1,258 -
0
votes1
answer103
viewsVariable debugging on the cake php layer
How do I debug or printf a variable in the model to display it on the screen? I can only debug variables in the view and controller public function atualizaCatalogo(){ $arr_produtos_out =…
-
0
votes1
answer49
viewsCakebake generating invalid Controller
I am generating a controller for cakebake based on a table called cliente_planos. It generates controller methods using always $this->ClientePlanos, is generating correctly, but no control method…
-
0
votes0
answers52
viewsCakephp Router Failure
I’m updating a website that was made on Cake Php and I have a problem with Route. In app\config\routes.ctp are the rules below and this works: Router::connect( '/curia/anuario', array( 'controller'…
cakephpasked 9 years, 3 months ago fabricio_wm 1,090 -
0
votes1
answer363
viewsCakephp 3 - How to sum column values amount of multiple rows and display the result in the view?
I have the Table Entradaestoques id - Prod - Qtd 1 - soap - 10 2 - cloth - 7 3 - soap - 20 4 - disinfectant - 4 5 - soap - 20 6 - cloth - 3 I want to show in the View Soap: 50 units Cloth: 10 pieces…
-
0
votes0
answers70
viewsCakephp 2.x if, Else
I have a project in Cakephp 2.x, with the following code: <?php echo $this->Form->create('Planos', array('url' => 'addPlanos')); foreach($ListarPlanos as $indice => $AdicionarPlanos):…
-
0
votes0
answers163
viewsFormat all Date objects in Cakephp 3
In my database I have some fields with the Date type. Therefore the data is stored in the format '2016-01-23'. However, when I retrieve this data to display it in the VIEW, it appears in the format…
-
0
votes1
answer226
viewsHow do JOIN using find()?
I am trying to Join tables using cakephp find(). I have 3 tables, they are: users, pessoas e matriculas. On the table users i have a foreign key for table pessoas and in the table matriculas I have…
-
0
votes1
answer145
viewsSet variable to template
I need to define a variable that will be displayed in the footer of all my pages, ie in the cake 3 template. Any ideas?
-
0
votes1
answer123
viewsFilter in CAKEPHP 2.0
Talk guys, I’m having an error in my ['Filter']['Uf'] search filter and I don’t know how to solve. My controller has the following check: $this->loadModel('User'); $this->loadModel('Conta');…
-
0
votes1
answer52
viewsCakedc/Users - Types of users
I have deployed the Cakedc/Users authentication plugin and want to add other types of users to my system. Currently I only have the two default permissions: superuser and user. I am controlling…
-
0
votes1
answer53
viewsCan Cakephp 3 be used to create screens to manipulate CRON like Sidekiq?
Have some way to create screens to manipulate CRON PHP with Cakephp3 as we have the sidekiq option for Ruby on Rails? It would be interesting to be able to list the active Jobs, and also the option…
-
0
votes1
answer245
viewsIllegal string offset key error cakephp
I’m starting to use CakePhp, when I register something, it returns the following errors: Warning (2): Illegal string offset 'key' [CORE Cake View Helper Sessionhelper.php, line 143] Warning (2):…
-
0
votes1
answer43
viewsSCRIPT to Convert and Save Addresses
I developed a script to convert a coordinate in a REST API with Cakephp $lat and $lng in formatted addresses. The script checks if the coordinate is saved in the bank, if negative it searches google…
-
0
votes2
answers582
viewscakephp controller using functions from another controller
good evening! I have 2 client tables and email ,when saving the client I need to save the email next to the email table, but I need to call the "save" function of the email controller. How do I do?…
cakephpasked 7 years ago Horacio Neto 169 -
0
votes0
answers42
viewsPopulating select via the other select option
I have a system made in Cakephp. I have 3 selects in one view: One to list stocks; One to list the locations of the stock (A stock can have several locations); And one to list the products you have…