Questions tagged [phalcon]

Phalcon is an open source, full stack framework for PHP. Functionality is exposed as PHP classes ready to be used. Written as a C extension, it is optimized for extremely high performance, being the fastest possible framework available for PHP developers.

655 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
1 answer
2k views

Combining and and or operators in Phalcon\Mvc\Model\Criteria

I'm just writing my first phalcon application and have a question for filtering a query using Phalcon\Mvc\Model\Criteria. Finally I want a query like this SELECT * FROM table WHERE status = 'A' ...
iRaS's user avatar
  • 1,968
5 votes
0 answers
304 views

Restangular send 403 forbidden error or XMLHttpRequest error from dirrenet host

I wrote this easy comet implementation var app = angular.module('App', ['restangular', 'Comet']); app.config(function(RestangularProvider) { //RestangularProvider.setBaseUrl('http://...
X-Mat's user avatar
  • 123
5 votes
1 answer
2k views

Check bcrypt passwords always fails Phalcon php

I have a little issue with checking bcrypted passwords with Phalcon php. What I have is : Login script where I check the password $username = $this->request->getPost('username', 'string'); ...
Andriy Haydash's user avatar
5 votes
6 answers
3k views

Can't call indexController's actions other than indexAction in Phalcon php

I have a simple project in my xampp/htdocs directory called phalcon and I have apache configured to point to that folder so that I can go to phalcon/ in my browser. The problem occurs when I try to ...
Andriy Haydash's user avatar
4 votes
1 answer
763 views

Class not found, namespace, subfolder

I have cli app with a couple of classes which resides in /core/modules. Too much, so I want some of them to be in /core/modules/evaluate/ with Class Core\Modules\Evaluate\Something. On my local ...
Matthias Hoffmann's user avatar
4 votes
1 answer
2k views

phalcon querybuilder total_items always returns 1

I make a query via createBuilder() and when executing it (getQuery()->execute()->toArray()) I got 10946 elements. I want to paginate it, so I pass it to: $paginator = new \Phalcon\Paginator\...
zogby's user avatar
  • 462
3 votes
0 answers
515 views

Error installing phalcon 4.0.5 on php-fpm-alpine docker

When I try to make custom docker image with php:7.4.4-fpm-alpine and install phalcon 4.0.5 with pecl on it, there is an error on compiling phalcon creating libtool appending configuration tag "CXX" ...
Mohammad Askari's user avatar
3 votes
1 answer
2k views

PHP Startup: Unable to load dynamic library 'phalcon.so'

I am trying to run phalcon in php but it seems from the errors that it cannot load it. PHP Warning: PHP Startup: Unable to load dynamic library 'phalcon.so' (tried: /usr/lib64/php/modules/phalcon....
Waaaaat's user avatar
  • 634
3 votes
1 answer
534 views

Phalcon PHP : Jquery Datatable Server Side individual column filtering only gives first pages selection options

Here is my Jquery Server Side DataTable set up, correctly returning data from my database and the filtering does actually work, but the problem is that the selection box for each column only shows ...
S.Void's user avatar
  • 31
3 votes
0 answers
213 views

Class entry requested for an object without PHP class - segfault

We've recently began seeing segfaults occurring with the following crash message: Class entry requested for an object without PHP class in .../StatementTransformer.php on line 140 The error ...
Mike Kaperys's user avatar
3 votes
0 answers
490 views

Phalcon: Custom Access Control List not setting permissions

I am trying to follow an online tutorial in Phalcon PHP, and I'm at the stage where we are creating an ACL, and setting permissions based on the user's role (which is pulled from a session variable). ...
mpdc's user avatar
  • 3,560
3 votes
1 answer
1k views

Phalcon - mock models for unit testing

I am trying to perform a Unit test in my Phalcon app. I have setup the Unit test environment according to the tutorial provided. What I am trying to do is to mock database adapter only for several ...
masterFly's user avatar
  • 1,072
3 votes
1 answer
241 views

How to autoload PayPal classes with Phalcon autoloader?

Phalcon autoloader is configured in the following way: $loader = new Phalcon\Loader; $loader->registerDirs(array( '../app/4/controllers/', '../app/models/', '../app/services', '../...
Politechniczny's user avatar
3 votes
1 answer
597 views

Phalcon PNG to JPG and remove transparent background image

I'm using Phalcon PHP Phalcon\Images\Adapter\GD and I have a problem with the PNG to JPG. When I upload a PNG image on my server, I resize this image, I set the background color in white with the ...
John's user avatar
  • 4,731
3 votes
1 answer
143 views

PHP Namespace collision with Phalcon, Vagrant, Apache2

I have this strange problem that I can best describe as "namespace leakage". I have setup a vagrant box running Apache2 with VHosts setup to replicate the production server in terms of domains & ...
Ally's user avatar
  • 955
3 votes
1 answer
260 views

Phalcon url parameter missing but action still gets executed

I am using the latest phalcon version and i am finding it hard to find info on how to make the action not execute when the required parameters are missing as shown below class TestController extends ...
user1217974's user avatar
3 votes
0 answers
270 views

Phalcon Application sending "No data received" on production, but not localhost

I am writing a Phalcon PHP website on windows and on my local server everything works as specified. When the base url is reached, it forwards to my public folder with .htaccess and loads index.php. ...
ChristopherW's user avatar
3 votes
0 answers
2k views

PHP Phalcon Wild card routing in multi module application

UPDATE This is now fixed with this solution. foreach (array('core', 'backend' => array('alias' => 'admin'), 'api') as $module => $options) { // If an alias is set use that ...
Kal's user avatar
  • 2,269
3 votes
1 answer
4k views

Related models with conditions in Phalcon

How to setup filtering on related model data using $this->hasMany() or $this->hasOne() in model? For instance: I have SomeData table which can be referenced to ModalA or ModelB. In ModelA and ...
jodator's user avatar
  • 2,445
3 votes
2 answers
4k views

PHP Xdebug debugging stops working in VSCode at first breakpoint

I am using Wamp on Windows 10 Pro 64bit. Firstly, PHP XDebug based debugging works fine on my normal Core PHP application in Visual Studio Code but when I start debugging a PhalconPhp (MVC) based ...
Amal's user avatar
  • 41
2 votes
0 answers
112 views

Phalcon 4 namespace bug factor

I'm on windows 10 server edition x64 Architecture using Phalcon 4.0.6, php-7.4.7 with xampp & psr-1.0.0. Following example from: 'https://docs.phalcon.io/4.0/en/application'. I'm unable to load ...
Styled Bee's user avatar
2 votes
0 answers
436 views

Stripe payment SCA

My current Stripe code is as below: as I pass to stripe. Had been using following Stripe Library: https://github.com/stripe/stripe-php Its working fine as of now. Now I need to change code according ...
Paul P Jose's user avatar
2 votes
0 answers
680 views

Why YouTube IFRAME Player API is not loading the next video?

I am fetching videos from a table and then listing it in the player via YouTube iframe player api but when I click next button it doesn't load next video into the player! UPDATE: On next/previous ...
Iftikhar uddin's user avatar
2 votes
1 answer
2k views

Incorrect datetime value: '1540564519' for column 'date_updated' at row 1 On saving model Phalcon?

I'm trying to save data in a table but when i save it throws the below error: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1540564519' for column 'date_updated' at ...
Imad uddin's user avatar
2 votes
1 answer
181 views

Phalcon route groups 404 not working

I have URL's: site.com/sdfsdfsdfsd - 404 Working site.com/ru/page/sdfasdfasfasdfsad - not working, I get redirect to main page $router->add('/', array( 'module' => 'frontend', 'controller'...
Jajaja's user avatar
  • 133
2 votes
1 answer
297 views

Phalcon route conflict

I have a problem with routes on phalcon. I have code: $router->add('/{aliascat:[0-9\-a-z\-]+}(/?)', array( 'module' => 'frontend', 'controller' => 'category', 'action' => 'view', '...
Jajaja's user avatar
  • 133
2 votes
1 answer
498 views

Phalcon REST API structure

I am developing REST API using Phalcon. The application will have multiple modules like Users, Company, Contacts and so on. Each of these modules have their own tables for storing data. Moreover each ...
mary josh's user avatar
2 votes
1 answer
218 views

Insert array into postgresql error

I using Phalcon Framework and PostgreSQL I try to insert an array to database column type: varchar[]: array(4) { [0]=> string(1) "1" [1]=> string(1) "6" [2]=> string(1) "9" [3]=> string(...
user3625084's user avatar
2 votes
0 answers
453 views

Understanding the core dump after Segmentation Fault | Phalcon + Php + Apache

I have managed to get the Core dump after a segmentation fault caused in an env that has Phalcon 1.3.1 Php 5.5.9 Apache 2.4.7 Running on Ubuntu 14.04 Core dump : http://pastebin.com/KeWipxU9 ...
greenjambi's user avatar
2 votes
1 answer
1k views

how to do php unit testing post data passing from javascript to controller?

I am using phalcon framework and i want to write a unit test. In JS I am using Post Method and In my controller public function controllerAction { $this->view->disable(); $body = $...
Badassram93's user avatar
2 votes
1 answer
2k views

Dispatcher has detected a cyclic routing causing stability problems in phalcon

When i am trying to access any controller following error is coming. My code is working fine in my local machine where Apache server is running. When i am uploading same code in my server machine and ...
user2465708's user avatar
2 votes
1 answer
324 views

Phalcon REST - cmoore4/phalcon-rest

Good day! I'm trying to create rest for angular using phalcon - https://github.com/cmoore4/phalcon-rest Hello! I have similar error https://github.com/cmoore4/phalcon-rest/issues/10 But i can't ...
PapaRoach's user avatar
2 votes
0 answers
497 views

Phalcon REST Api multi-module

I'm building a multi module using Phalcon. I have an Application named frontend and a REST API in micro application. But I have a question about the way to create my rest api. It's necessary to use a ...
John's user avatar
  • 4,731
2 votes
1 answer
843 views

PHP Authorization: Bearer header keeps changing names

I implemented JWT tokens in PHP/Phalcon, for which you need to send the JWT token in the Authorization header. I send the header as follows: $.ajax({ url: URL, dataType: 'text', ...
Ayush Sharma's user avatar
2 votes
0 answers
83 views

From XML to MySQL

I have loaded my XML file with PHP simpleXML but I have next situation ... My XML file looks like this: <xml> <status>1</status> <market> <shop> &...
LinuX's user avatar
  • 21
2 votes
1 answer
1k views

Volt templating (Phalcon) - What is better between "partial" and "include" to use in a loop?

I see there are 2 options to include a "partial" template within a template (using Volt, Phalcon PHP framework) Documentation: https://docs.phalconphp.com/en/latest/reference/volt.html#view-...
Martin's user avatar
  • 137
2 votes
0 answers
124 views

A good practice to create phalcon 2.0 form decorators?

To created form decorators (for view rendering), I have created an abstract class BaseForm as follows: abstract class BaseForm extends Form { /** * Render form field * @param $name * @param ...
Mihai Petcu's user avatar
2 votes
0 answers
989 views

MVC with Cordova/Phonegap?

Most MVC-frameworks (e.g. Phalcon or Laravel) use PHP, or some other script language that uses curly brackets, and placeholders in view-templates and connect them to models and controllers. Each ...
Dylan's user avatar
  • 9,159
2 votes
0 answers
132 views

Phalcon does not receive GET URI with escaped html characters

I have a GET URI /phalcon-dash/change/action/get/c123h%23516466 In ChangeController, I only have this $params = array('get', 'c123h') It looks like Phalcon omits everything after # (%23 is the ...
lightbringer's user avatar
2 votes
1 answer
491 views

Phalcon: Cannot use alias column in where/having clause

I have to select some location points with a distance from given coordinates. Presented query $locations = Locations::query()->columns(['id','distance' => '(1+2)']) ->order(...
piotr's user avatar
  • 1,282
2 votes
1 answer
177 views

htaccess with Angular and Phalcon

I'm trying to switch the frontend of my Phalcon app to AngularJS. I'm having some troubles with the .htaccess file though. Below is what I currently have. RewriteEngine On RewriteBase / RewriteCond %{...
user4992124's user avatar
  • 1,574
2 votes
1 answer
5k views

401 response doesn't return json

This is my api using phalcon: $response = new Response(); $response->setStatusCode( 401, 'Unauthorized' ); $response->setContentType( 'application/json', 'UTF-8' ); $response->setJsonContent(...
mignz's user avatar
  • 3,668
2 votes
1 answer
2k views

Fatal error: Class 'Phalcon\Http\Client\Request'

Error on request Fatal error: Class 'Phalcon\Http\Client\Request' not found in ControllerBase.php on line 41 use Phalcon\Http\Client\Request as CRequest; $provider = CRequest::getProvider(); ...
hariom srivastava's user avatar
2 votes
1 answer
102 views

Phalcon v.1.3. Model's onConstruct does not fire after unserialize

Phalcon 1.3 MVC Model docs say: The initialize() method is only called once during the request, it’s intended to perform initializations that apply for all instances of the model created within the ...
temuri's user avatar
  • 2,767
2 votes
1 answer
2k views

Phalcon routing, how to set default parameters?

I'm trying to create dynamic routes in Phalcon 1.3.4, but if a parameter is missing (like :action or :params) the route doesn't match. Here is the (working) code : $router = new Phalcon\Mvc\Router(...
thomas-hiron's user avatar
2 votes
1 answer
323 views

Model Hierarchy In Php Phalcon - Can't Find Attribute of Parent Model When Accessing Child Model

I am working on Php Phalcon, Xampp server. My model classes form an heirarchy. I have a UsersAbstract class which has some generic attributes like Full_Name, Email_ID etc. Then I have derived class ...
Rabbiya Shahid's user avatar
2 votes
0 answers
128 views

Derived Classes in Php Phalcon

I am fairly new to php phalcon and the language itself. I am making a website that involves an abstract class and derived classes. The Abstract Class: <?php abstract class UsersAbstract extends ...
Rabbiya Shahid's user avatar
2 votes
0 answers
297 views

Phalcon Micro Application(facing prob with finish middleware event)

I am facing a problem while implementing micro application in which i want a middle ware that is executed after response is send to browser. As mentioned in documentation of phalcon finish middle ware ...
Deepak Kumar - Grene Robotics's user avatar
2 votes
0 answers
2k views

Memcached / Memcache Keys Not Expiring

It seems that data expires as expected with Memcached, but the keys themselves never expire. Why are the keys sticking around after the value has nulled? When I run this code: $frontCache = new ...
Tabby Laredo's user avatar
2 votes
1 answer
2k views

Phalcon, IIS 7.5 and URL Rewrite problems

So, I'm following the Phalcon php tutorial at this link http://docs.phalconphp.com/en/latest/reference/tutorial.html, but I'm trying to recreate the process using IIS 7.5 (as opposed to apache) and I'...
fuzzlog's user avatar
  • 131

1
2 3 4 5
14