31,674
questions
116
votes
9
answers
140k
views
Best way to document Array options in PHPDoc?
I'm struggling to write readable and easy to understand documentation that describes the multi-tree structure for Array options that are passed to a function.
Here is an example array structure.
$...
115
votes
3
answers
221k
views
"[notice] child pid XXXX exit signal Segmentation fault (11)" in apache error.log [closed]
I am using Apache/PHP/MySQL stack.
Using as framework CakePHP.
Every now and then I get a blank white page. I can't debug it through Cake, so I peek in the apache error.log and here's what I get:
[...
101
votes
6
answers
146k
views
Set Response Status Code [duplicate]
I have an API call for which I need to be able to run some checks and potentially return various status codes. I don't need custom views or anything, I just need to return the proper code. If the user ...
88
votes
7
answers
125k
views
How do you make strings "XML safe"?
I am responding to an AJAX call by sending it an XML document through PHP echos. In order to form this XML document, I loop through the records of a database. The problem is that the database ...
81
votes
9
answers
279k
views
How to check not in array element
I am trying to check if an element is not in array than want to redirect page:
My code is as below:
$id = $access_data['Privilege']['id'];
if(!in_array($id,$user_access_arr))
{
$this->Session-...
80
votes
9
answers
159k
views
How can I see CakePHP's SQL dump in the controller?
Is there a way that one can cause CakePHP to dump its SQL log on demand? I'd like to execute code up until a point in my controller and see what SQL has been run.
76
votes
2
answers
13k
views
Fat models, skinny controllers and the MVC design pattern [closed]
I just read a blog post that explains MVC with a banking analogy. I have a few months of experience with web application development with an MVC framework (CakePHP), so I get the basics, but I began ...
72
votes
2
answers
203k
views
What is /var/www/html? [closed]
I am starting to pick up PHP / MySQL, but in all the documentation I'm reading, it mentions /var/www/html as being the folder you want to install a framework such as CakePHP, or for example /var/www/...
69
votes
15
answers
239k
views
PHP Fatal error: Class 'PDO' not found
PHP Fatal error: Class 'PDO' not found in /home/bd/public_html/app/webroot/Cake/Model/Datasource/Database/Mysql.php on line 177
PHP INFO:
PDO
PDO support => enabled
PDO drivers => sqlite, ...
69
votes
18
answers
110k
views
CakePHP 3.0 installation: intl extension missing from system
Using the CakePHP docs, I am trying to install 3.0-beta2 using composer but I got this error:
cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from ...
64
votes
7
answers
251k
views
Request exceeded the limit of 10 internal redirects due to probable configuration error
I'm getting the following error in my CakePHP application:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit ...
63
votes
25
answers
152k
views
How to get complete current url for Cakephp
How do you echo out current URL in Cake's view?
63
votes
16
answers
170k
views
Input value doesn't display. How is that possible?
This must be something utterly stupid that I've done or am doing, but I have an input with a value attribute that simply isn't being displayed:
<div class="input text required">
<...
62
votes
4
answers
209k
views
Generate ER Diagram from existing MySQL database, created for CakePHP [closed]
For CakePHP application, I created MySQL database.
Which tool to be used to create ER Diagram of database? Fields and relations between tables are created in a way cakePHP likes.
thank you in ...
56
votes
8
answers
80k
views
Can I use one model inside of a different model in CakePHP?
Can I use another Model inside one model?
Eg.
<?php
class Form extends AppModel
{
var $name='Form';
var $helpers=array('Html','Ajax','Javascript','Form');
var $components = array( '...