2,040
questions
1
vote
5
answers
33k
views
PHP/Phalcon Error: Closed without sending a request; it was probably just an unused speculative preconnection
I have a basic controller action:
public function createAction() {
$this->view->disable();
$formData = $this->request->getJsonRawBody();
$user = new Users();
...
84
votes
6
answers
110k
views
Error building : fatal error: pcre.h: No such file or directory
I'm just finished installing Ubuntu 13.10.
I want try Phalcon, and when I build the source (phalcon.so), I have this error :
from /home/fabrice/Downloads/cphalcon/build/32bits/phalcon.c:204:
/...
0
votes
0
answers
26
views
Issue with Data Returning [false, false, false] after looping updated data in Phalcon
I am working on a project using Phalcon and encountering an issue while trying to save DrugOrder objects. Below is the relevant part of my code:
$drug_order = DrugOrder::find([
'conditions' => &...
3
votes
1
answer
3k
views
Phalcon db connection to multiple databases on same host
I've recently started using Phalcon PHP Framework, and there is one thing that confuses me a lot.
How to set $di to use multiple databases on same host? For example how to make this query work
...
1
vote
2
answers
743
views
Phalcon save unable to perform
Phalcon save function is asking required fields even if its available from post. Previously was using tag and everything was working fine and able to do complete CRUD functionality. Now i wanted to ...
2
votes
1
answer
1k
views
Phalcon: HMVC view not working
I got a problem rendering nested view, here is what I'm trying to do
I changed your 'request' of HMVC (HMVC-GitHub or/and HMVC-Pattern) function into an Elements module
namespace Modules\Main\...
1
vote
0
answers
33
views
How do I handle 500 and 200 error on phalcon?
I was wondering, what's the best way to handle 500 and 200 error in Phalcon? I'd like to create a default error page for when an error occurs.
In my app/config/service.php:
use \Phalcon\Mvc\Dispatcher ...
0
votes
2
answers
166
views
How can I test a Controller's protected method using reflectionClass in a unit test?
Environment
Windows10
phalcon 3.2.4
Docker for Windows 18.03.1-ce-win65
phpunit 5.7.27
Problem
I want to test my controller's private property using reflectionClass with phpunit, but I didn't ...
1
vote
0
answers
32
views
Using Phalcon models inside migrations
Iam trying to use my phalcon models inside migrations like you can in laravel. The problem is with namespaces. I try to load the namespaces with loader to solve the namespace issues by calling a ...
0
votes
2
answers
487
views
Adding external libs to the Phalcon project
Cannot add the Phalcon mailer and use it in the project. Doing same as instructions say. I have config linking to 'libraryDir' => APP_PATH . '/app/lib/', in the lib folder I have a Mailer folder ...
0
votes
0
answers
62
views
Localhost keep reloading
I have a PHP Phalcon setup on Ubuntu with the following versions:
PHP = 7.4.33
Phalcon = 4.0
Phalcon Dev Tools = 4.2
Ubuntu = 20.02
Server = Apache 2
The issue I am facing is that my localhost ...
1
vote
2
answers
327
views
why using viewSimple renderer in Phalcon corrupts main renderer
First I declare simple view like this:
$di->set('viewSimple', function() {
$view = new \Phalcon\Mvc\View\Simple();
$view->setViewsDir('../app/views/');
$view->registerEngines(...
0
votes
1
answer
524
views
Preserve Order of IN in ORM Order
I'm trying to do a query where I preserve the order of the ids in a IN statement. I can't seem to do it with either the Model Manage Query Builder or the standard ORM 'order' array parameter. Am I ...
2
votes
1
answer
1k
views
How to add a new index to an existing array on Volt?
So I have an existing array, I want to run a for loop through it and recreate new arrays. I am trying to figure out how to create my own array directly on volt. Here is my code:
{% set ...
0
votes
1
answer
510
views
Phalcon multiple table select resultsets always complex?
Whenever I select from more than one table in the same query (using phql, builder, or criteria) the result is always an instance of \Phalcon\Mvc\Model\Resultset\Complex, which is a bit... complex to ...
1
vote
3
answers
187
views
hasManyToMany relation with two tables
Is it possible to make many to many relation with 2 tables ?
Lets say I have following structure:
<?php
use Phalcon\Mvc\Model;
/**
entity
-id
-name
-sub_group_id
*/
class Entity extends Model {
...
0
votes
0
answers
56
views
Update mysql 5.7 for 8.0 in phalcon 4.1 and php 7.4
i have a problem in update mysql version of my application, 8.0 version causes a 300% more loewst process in database compare of 5.7 version.
Any sugestions or cases for improve performance in this ...
0
votes
0
answers
20
views
why object of my model return all values string in phalcon 4.1
in my model Course extended \Phalcon\MVC\Model
and when i want get data like this:
$course = \App\Models\Course::findFirst($courseId);
$course->id ->>>> "196"
why is string ...
5
votes
3
answers
8k
views
Phalcon and cli applications
Is it possible to use phalcon in cli applications to handle requests with argv parameters?
I want to use argv parameters to understand command that should be executed, e.g.
./script.php robot/create --...
0
votes
0
answers
48
views
phalcon and phalcon devtools installation issue in windows 10
I am trying to create a new phalcon project in my machine which has windows 10 with wamp server installed. I tried to create the project in different ways. I have tried with pecl and phalcon windows ...
2
votes
1
answer
1k
views
How to change datatables row background color
In my Phalcon project, I'm trying to change the color of a row based on some data. I'd appreciate any help. This is what I'm working with. In my controller :
private function dataTablesAjax($request)
...
1
vote
1
answer
247
views
Adding multi select form to filter query and export the filtered data into an excel file
I'm working on the project that uses a lot of mysql data importing into excel files. So far I've been writing queries in my controller and then simply exporting the result data as an excel file. But ...
0
votes
3
answers
766
views
Phalcon PHP validation Uniqueness but allow empty values
I have the following validation:
use Phalcon\Validation;
use Phalcon\Validation\Validator\Uniqueness;
class Users extends BaseModel {
public function validation() {
$validator = new ...
1
vote
1
answer
71
views
Phalcon 5 query betweenWhere OR betweenWhere
I can't get to make this query to work in phalcon, depending on how I change the query I get "Invalid parameter number: parameter was not defined" :
SELECT start_date, end_date
...
0
votes
0
answers
31
views
Phalcon - Swiftmailer send email with invitation of event
I'm try to send a email on Phalcon adding an invitation with an event. This are the versions of my backend:
"phalcon/devtools": "^4.0",
"phalcon/migrations": "^1.2&...
0
votes
0
answers
61
views
php phalcon micro api endpoint return 404 except root url
I am trying to setup very simple, 2 api endpoints using Php Phalcon Micro. I am getting 404 not found on endpoint route with "/api/healthcheck". But when I call root "/", I get ...
5
votes
4
answers
10k
views
What CMS can be used with Phalcon framework? [closed]
I've been using Wordpress for the past 4 years for developing small and medium websites. Now I have an enterprise project and I'm considering using Phalcon PHP framework.
My enterprise project will ...
0
votes
3
answers
3k
views
Fatal error: Uncaught Error: Class 'Phalcon\Config' not found
Hello im trying to install phalcon and devtools but something is going wrong. I did everything I saw in tutorials installed phalcon, changed the php.ini, intalled devtools but it still doesn't no work....
0
votes
1
answer
250
views
phalcon 5 'request' service issue
I had a project running on phalcon 5.3.0. But after upgrading to phalcon 5.3.1 with php 8.2 i'm facing some errors. and unable fix it. i did no change but errors are occurred. Also i did not get any ...
0
votes
0
answers
166
views
Phalcon PHP - Token not being read from Authorization Header in Postman
I have a Phalcon PHP application where I'm trying to implement token-based authentication. I have a method in my code like this:
public function infoAction()
{
$access_token = $this->request->...
0
votes
0
answers
28
views
Phalcon 4 Multi-Module MVC Application: Default Module and Controller Issues
I'm coming to you because I'd like to set up a multi-module MVC application with phalcon 4. I have followed the documentation and my bootstrap file is as follows:
<?php
use Phalcon\Debug;
use ...
1
vote
2
answers
2k
views
Phalcon\Loader\Loader not found
I have a newly cloned phalcon repository:
software: MacOS
Phalcon: 5.0.0RC4
PHP: 8.1
Zephir: 0.16.0
brew: [email protected]
Location: ~/Documents/cphalcon
I am trying to set up my new repository by ...
1
vote
0
answers
48
views
Can Aspecktmock used in Codeception API testing?
We use Codeception with Phalcon.
We are trying to add testing around an API. This API has DB saves and other application logic. Assume our requirement is to receive 403 HTTP status If the DB save has ...
3
votes
2
answers
1k
views
Phalcon 4 How to get URL of current page?
In phalcon 3.4 we had the below function to get the current URL,
$current_url = $this->router->getRewriteUri();
However, it seems to be that, it was dropped in version 4.0 however there is no ...
0
votes
0
answers
46
views
Can I cross join to tables using phalcon query builder?
I have 2 tables that use the 3rd table's id as their primary key id. They look like this
Accounts Table
id
1
GNCC
accountsID
1
Payments
accountsID
1
Currently, I'm getting the data that I ...
2
votes
2
answers
3k
views
How to retrieve data from database Phalcon php
I'm using tutorial-master https://docs.phalconphp.com/en/latest/reference/tutorial.html the Create step from CRUD is awesome, I can input data to database. But I don't understand how to generating ...
0
votes
1
answer
229
views
Error: Adapter Phalcon\Db\Adapter\Pdo\Mysql is not supported, HOWEVER
Edit:
Phalcon version 4.2.0 and php 7.4.3 versions are the compatible versions I was told to used and Im sure that I had scaffolded the users table. But now when I am trying to rescaffold since I ...
0
votes
0
answers
86
views
Phalcon Session
I have set my session, however it is not being seen on the other pages.
within the loginController, the login function has:
$session->set('auth', $user->id);
I want when the person log in, ...
0
votes
0
answers
330
views
php.ini - Install Phalcon not appearing in PHPInfo
I installed my own server for the very first time with the objective to test Phalcon but it doesn't seems to be enabled, or even present:
echo Phalcon\Version::get();
Returns error:
Fatal error: ...
1
vote
0
answers
28
views
Phalcon PHP in RunCloud
To install Phalcon PHP on servers managed by RunCloud, something special to do as RunCloud installs multiple versions of PHP? How to install Phalcon for an X version of PHP? Thanks.
I'm having some ...
0
votes
2
answers
197
views
phalcon GET routes allowing any other non http method to make successful request to that route
I'm using Phalcon\Mvc\Router to map the routes and I have a GET route /api/test like this,
$router = new \Phalcon\Mvc\Router(false);
$router->addGet('/api/test', [
'module' => '...
-1
votes
1
answer
82
views
Can I get an id of a submitted button in my Controller in Phalcon?
I'm looking for a way to get the id of a button when the button is submitted. Right now, when I submit the form and dump it in my controller, I can only access the value of the button, nothing else. I ...
0
votes
1
answer
218
views
Using views in Phalcon Task
for one of my developments, I would like to run a Phalcon task that can retrieve the HTML code of a .volt view. The purpose of using a .volt view is to pass parameters to my .volt view before ...
0
votes
3
answers
304
views
How to invalidate Model cache | Phalcon 4
I've the following to cache model query and it is working fine,
public static function getSubcategories($partnerId)
{
$instance = new self();
$q = $instance->modelsManager->...
1
vote
0
answers
88
views
How to get the value of a select input in Phalcon?
I have a small form with a select input and a textarea for commenting. I want to make the textarea required only if the value of the select input is 1, for example, otherwise, it shouldn't be required....
0
votes
1
answer
165
views
PHP Phalcon getConfig() error: #0 /var/www/html/gadgetsplash/ui/public/index.php(46): Phalcon\Di->__call() #1 {main}
I have build a phalcon MVC project, it runs fine on my local machine which is Ubuntu 18.04, while deploying on the server, CentOS 7, it throws this error. It's Phalcon v4.
#0 /var/www/html/...
0
votes
1
answer
386
views
About phalcon / incubator that can be used with phalcon 5.0.0 beta3
I need to update from PHP 7.3 to PHP 8.0 or PHP 8.1.
About composer.json php from ~ 7.3.0 to ^ 8.0, ext-phalcon from ^ 3.3.0 to 5.0.0 beta3 I think I have to update to
I'm looking for a phalcon / ...
0
votes
1
answer
126
views
Can't connect phalcon project with mysql database
I'm new into learning phalcon, I'm trying to setup a phalcon project, I've managed to serve it on my localhost and it kinda works except for when an interaction with the database is needed. I got a ...
0
votes
3
answers
431
views
Define dynamic actions/slugs with Routers in PhalconPHP
I have a website made in PHP Phalcon, and it has several controllers.
Now I need this website to receive words in the URL (example.com/WORD) and check if they exist in the database, but I must ...
2
votes
3
answers
2k
views
how to install specific phalcon framework version 2.0.?
i have a application which is working fine with version 2.0
for that i am unable to install phalcon version 2.0 only latest version version 3.2.2 is installing..
so how can i install v 2.0..??
...