In CakePHP 3, is it possible to run a custom SQL query from within a table model? If so, how? I tried the following from within a table model: (The query is deliberately simple for example purposes.) But then, when I loop through the $rows, this results in an infinite loop. I’m surprised CakePHP 3 does …
Tag: php
How to always use ignore-platform-reqs flag when running composer?
On my local machine, I have php v7.0.3. A project of mine has a dependency on php v5.5. So as expected, a simple run of composer install crashes: I know I can ignore the platform via: yet I often forget to add the flag. Yet since the application runs inside a docker container, a mismatching php can install th…
How to debug “FastCGI sent in stderr: Primary script unknown while reading response header from upstream” and find the actual error message?
SO has many articles mentioning this error code: That probably means that this error message is more or less useless. The message is telling us that the FastCGI handler doesn’t like whatever it was sent for some reason. The problem is that sometimes we have no idea what the reason is. So I’m re-st…
Laravel: Error InvalidArgumentException
I’ upload the project from localhost to my dedicated server and after so many problems, finally some pages works domain.com | domain.com/home | domain.com/allsites etc.. But now, the routes “domain.com/site/create” “domain.com/site/ID/manage”, “domain.com/site/ID/edit”…
Laravel error: Missing required parameters for route
I keep getting this error ErrorException in UrlGenerationException.php line 17: When ever any page loads and I’m logged in. Here is what my nav looks like @if(Auth::guest()) <…
Specific email conditional on Radio Button selected in Form
Thank you for all the info here, but I seem to be missing something to make it send to each particular email address. Basis for this code came from thread: Send PHP Form to Different Emails Based on Radio Buttons Answer EDIT: HTML PHP
what is $this->load->view() in CodeIgniter
$this is use for current class and view is method but what is load. Is this a property? Is this example correct? Answer Yes, load is a property. Think of it like this: This syntax is called chaining.
how can i make PHP to display pictures
I need help to display all my pictures in my folder in a row, not over each other. Answer You should use css classes and styles. Then include your stylesheet in html head and finally style your images in that stylesheet.css All of this is the most basic html and css stuff. Please consider reading some tutoria…
Graph returned an error: Invalid appsecret_proof provided in the API argument
i am using facebook PHP sdk (v4) to fetch user information, after installing SDK, i add the code but when i run the page it gives me this error, i am copying the app secret correctly, what could be the reason for such error and how should i fix this ? Answer You may want to read this: https://developers.faceb…
PHP end a financial year in june of every year
I would like to do something of this sort in php, when the month reaches June 2016, I would like to echo 2016-17, but before that i echo 2015-16 What I have so far echos 2015-16 meaning it changes with the beginning of the year, but i would rather it does that in june onwards, Any suggestions Answer Very basi…