Questions tagged [fat-free-framework]

Fat-Free Framework is a powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

Filter by
Sorted by
Tagged with
0 votes
1 answer
73 views

How does Fat-Free Framework get post api request?

I want to create an API POST handler on Fat-Free Framework. When I send any test POST request inside the application, nothing happens, can't find the reason for the error. Sending a request $...
Jarosław Bielawski's user avatar
1 vote
0 answers
24 views

How do I setup a route for containing a dot in the query path

http://localhost:9000/get/123/123/123.tar Code: require 'vendor/autoload.php'; $f3 = \Base::instance(); $f3->route('GET /get/*/*/*', function ($f3,$params) { header('Content-...
Dayong Chen's user avatar
1 vote
1 answer
30 views

Fail when using jTable in Fat-Free Framework

I'm trying to load data with jTable in Fat-Free Framework but I can't. The web page has a button to perform the upload: <form> <fieldset> <legend>Requests - Filter</legend&...
Roberto Delgado's user avatar
0 votes
0 answers
78 views

Multidimensional array with affiliate tree

I'm working on a system with affiliate logic behind, with up to 3 levels in the structure. I've got it working for 2 layers perfectly already. Here is the code I used for 2 layers. I'm using fat free ...
nameless's user avatar
  • 1,483
2 votes
0 answers
198 views

php undefined index or variables don't throw any error

I came across a fat-free framework where indexes are accessed without checking if there's data present or not. few e.g. e.g.1 $sObj = new Site($db); // this returns null? $site = $sObj->getById($...
Azima's user avatar
  • 3,903
1 vote
1 answer
113 views

Fat free framework - prevent direct access to html files

I'm wondering if there is any good way to prevent direct access to html files in Fat Free Framework... So the intended way would be to call a route like /login. However, with the default configuration,...
nameless's user avatar
  • 1,483
0 votes
0 answers
96 views

Secure POST request against manipulation

I'm currently building a little mini game collection web app, with Fat Free Framework in the Backend (which shouldn't matter too much here). Now in the games, you can also reach highscores - sending ...
nameless's user avatar
  • 1,483
0 votes
1 answer
44 views

F3 Sql Mapper: Misleading error message when setting value for non existent field in the mapped table

Given this code $mapper->reset(); $mapper->set( 'foo', 'bar' ); // <--- Error here: `foo` does not exists in the table $mapper->insert(); Where foo is a column that does not esist in the ...
Paolo's user avatar
  • 15.4k
0 votes
1 answer
142 views

How do I create middleware specific to route not whole controller class

I have an api and some routes are public some need to be protected via auth. I want to have them in one controller class as they are related. I can extend the controller and have beforeRoute function ...
Dalibor Trampota's user avatar
0 votes
1 answer
66 views

Getting `id` of newly created record after `save()`

As per save Cursor Method documentation This method saves data to the database. The Cursor class automatically determines if the record should be updated or inserted as a new entry, based on the ...
Paolo's user avatar
  • 15.4k
0 votes
0 answers
58 views

How to push a new value to a cached array in fat-free-framework?

I have a fat-free-framework application where I need to cache API calls, in order to move them later to the database in a Cron job: <?php class ApiCallRepository extends BaseRepository { ...
Ali Habieb's user avatar
2 votes
1 answer
169 views

Fat-free get data from PUT request

I have a PUT request from frontend side. I use F3 framework on backend side and want to parse params from query. How can I do that? GET, POST requests work fine. $f3->get('GET'); //works $f3->...
askuzenkov's user avatar
2 votes
1 answer
189 views

Trying to Use .Htaccess to 301 redirect all pages but one. However The One Page Exception Rule is Not Working

I have been trying to redirect all of my website's pages to a new website but would like to rule out one single page as an exception. This is the code I am using: RewriteEngine On RewriteCond %{...
Vanbel Manik's user avatar
0 votes
0 answers
11 views

Fat free Framework Parameterized queries LIKE [duplicate]

I'm trying to get a query with a LIKE comparison going in Fat Free Framework. $db->exec('SELECT * FROM ideas WHERE name LIKE %:idea%',array(':idea'=>$idea)); That's the query. The error I'm ...
nameless's user avatar
  • 1,483
0 votes
1 answer
54 views

Can i use fat-free framework to develop Action Domain Responder app

hi i need to know if is possible develop a webApp following Action Domain Responder architecture with fat-free framemwork. i have used it to do MCV webAPP but i don't sure is the framwork framework to ...
MarcoZ's user avatar
  • 1
0 votes
1 answer
252 views

PHP 7.4 OpCache and FatFreeFramework

I am running a website on a PHP 7.4.12 system with the OpCache enabled. My question: Do I need to tell F3 in the settings to make use 7.4s cache options? If so, how would I do this.
Armin Hierstetter's user avatar
-3 votes
1 answer
141 views

Problem trying to insert records with foreign keys in php fat free framework and mysql

I need to insert the record in the usuarios table, then in the personas table using the foreign key id_usuario and finally insert the record in the usuarios_roles table using the foreign key ...
Jorge Espinoza's user avatar
0 votes
1 answer
323 views

FatFreeFramework sent JSON by using Web component and method POST

I'm trying to send a post from my app written in f3. I followed this documentation https://fatfreeframework.com/3.5/web#POST, but I don't know how to send JSON. In curl it is params -d. My call by ...
MiMo's user avatar
  • 124
0 votes
1 answer
298 views

F3 Framework: how to make sure that caching is working correctly?

I'm getting the database credentials from AWS secrets manager and storing it in the cache so that it doesn't have to be fetched from AWS on every request. The problem is that, if I change the secret ...
Lynob's user avatar
  • 5,105
1 vote
1 answer
276 views

fat-free-framework multi-language: translating a string that includes link?

In fat-free-framework is there any way to translate a string that includes a hyperlink, without using multiple translate file variables? I've read the multi-language support documentation and F3 ...
Ayam D Fynest's user avatar
2 votes
1 answer
198 views

How to perform a conditional update using Fatfree framework's ORM

The situation consists of attempting to use F3 ORM (MySQL) with a state machine. A transaction/action should only be performed/persisted to the database if the original status allows for the ...
smokedice's user avatar
  • 930
0 votes
1 answer
190 views

Why are F3 database queries on views not working with sqlite

I'm setting up an API using the fatfree framework and want to use sqlite in development. I followed the docs (https://fatfreeframework.com/3.7/databases). At the bottom of that page, I learned about ...
micksp's user avatar
  • 123
0 votes
1 answer
221 views

F3 routing engine works using XAMPP and PhpStorm on Linux, but gives 404 for CSS files

I'm trying to code a F3 ("Fat Free Framework") application using PhpStorm and XAMPP on Linux. In order to make use of the .htaccess file provided by F3 necessary for the RewriteEngine (see ...
leftcursor's user avatar
0 votes
1 answer
228 views

Use Ajax in Fat free framework to render route every 5 seconds

I need for help in fat free I want to use ajax to render to a specific route every 5 seconds But I can't console any data the ajax page and this is my php code : elseif ($this->session->isRole(...
adnen manssouri's user avatar
1 vote
1 answer
90 views

replace all strings that contains a word in a PHP Array

I'm trying to all URLs that contain http://api.example.com/data/ to https://example.com/data/ in an array from a Database while using the Fat-Free Framework, the code iv tried below gives me Internal ...
Seth Kruse's user avatar
0 votes
1 answer
75 views

Route with PHP F3 matching an "http://..." adress

I am working with PHP F3. I have some issues with their routing engine. Let say my website is www.test.com, I would like to have a special handler when I enter this url : www.test.com/https://www....
zictozin's user avatar
1 vote
2 answers
474 views

500 error when an unset framework variable is used in template

I got a mysterious error on the page routed to MainController::somefunction Internal Server Error Unable to open [vendor/bcosca/fatfree/lib/base.php:2315] Base->error() [vendor/bcosca/fatfree/lib/...
Alan T's user avatar
  • 11
2 votes
1 answer
70 views

Dynamic Parameter in fat free template roue

I have the following duplicate code in layout <repeat group="{{ @devices }}" value="{{ @device }}"> <tr> <td> <a href="{{ 'net_device', 'id={{ ...
Prem Kumar's user avatar
0 votes
1 answer
147 views

Fatfree Framework nested Templates

Trying to wrap my head around Fatfree and how I can nest templates using data from the DB. So far I have a home page loading that loads three templates. So good so far and everything works. Main class ...
Paul's user avatar
  • 326
0 votes
1 answer
198 views

Fat-Free with Cortex Models and REST

I'm trying to use FatFree and Cortex plugin within my REST API. I seem to have some challenges, at first I was challenged with the namespaces, which I was trying to find how to solve that. And then ...
Justin's user avatar
  • 2,512
0 votes
1 answer
2k views

error 500 with Call to a member function on bool

I am using Fat Free Framework but I got this error when trying to check non-existent data ID with dry() function my code below will throw Call to a member function dry() on bool error if I supply it ...
zimorok's user avatar
  • 326
0 votes
1 answer
529 views

Fat Free Use Google OAuth + Google API

I'm trying the following thing for quite a while now and am heavily struggling... On a website, I first want to authenticate a user with his Google Account using OAuth. Therefore, I'm using this ...
nameless's user avatar
  • 1,483
0 votes
1 answer
157 views

How to get a username when logging in to Fat-Free Framework?

I use a fat-free framework, inside there is a plugin for authorization. I connected it, everything works correctly https://fatfreeframework.com/3.7/auth to enter the user name and password, I use the ...
Jarosław Bielawski's user avatar
1 vote
0 answers
233 views

Deprecation errors on GitLab CI when testing F3 request mock using PHPUnit

I'm attempting to setup unit testing with PHPUnit 9.5 on my GitLab repo. The codebase is PHP 7.3, and I'm using Fat-Free Framework v3.7. Because the web app uses sessions, setting up a test to call $...
inventor96's user avatar
0 votes
0 answers
183 views

Fat Free Framework and websockets

I am trying to get the example located here to work. I have this on an Ubuntu server with apache 2.4.41 and PHP 7.4.3. I start the sample server using ./websocket-server.php tcp://192.168.2.162:9001 ...
Nic's user avatar
  • 703
0 votes
1 answer
182 views

Duplicate session_id PRIMARY KEY for session in F3 (DB session)

longtime lurker, first-time poster. Sorry for any trouble! I'm using FatFreeFramework, which I like a lot (donated some money). I started using DB backed sessions (\DB\SQL\Session) and they work ...
carambas's user avatar
0 votes
1 answer
402 views

PHP Composer autoload

I code with fat-free-framework and I try use this structure app/ vendor/ public/ index.php composer.json { "require": { "bcosca/fatfree": "^3.7" }, &...
Archistico's user avatar
1 vote
1 answer
53 views

contact form not giving data

I have issue with fat-free contact form. My contact form does nothing. Like no success or any kind of error data. My contact form POST and GET route: $f3->route('GET @contact: /contact', 'Rimtay\...
pcisfcnxshrjjilcsw's user avatar
1 vote
2 answers
220 views

Find data 2 days before date mysql and fat free framework

Hi i'm trying to make a module of upcoming services and i need to show the user the services 2 or more days before the date, i am working with php fat free and mysql and i have this query: SELECT * ...
Edgar Josue Baeza Suchite's user avatar
1 vote
1 answer
519 views

Same mariaDB inserts much more slower in PHP 7.4 than PHP 7.1 with FAT FREE

I'm trying to migrate a legacy PHP/Fat Free project from php 7.1 to 7.4 and I found that some queries take too long (like 10x more time) to finish. Particularly some inserts. I'm running the same ...
Ivan Stadius's user avatar
1 vote
3 answers
2k views

Change container background color on slide change in Slick slideshow

I have a Slick slider where each slide has its own background color. My container color is white, but I want to use a container color that's the same as the slide if swiping or changing slides. My JS: ...
uob61824's user avatar
0 votes
2 answers
72 views

(Spotify) how to stop cross browser session sharing?

I'm using the spotify api and for some reason their session class blocks to store own data in $_SESSION. As a workaround I wrote a class 'SystemHelper': namespace App; class SystemHelper { ...
Wondarar's user avatar
  • 171
1 vote
1 answer
175 views

dynamically change CSS with fat free framework?

I am trying to use some shortcodes inside my CSS so I can change them all at once with fat free variables. For example from my config.ini: accentColor=8f0 And in my style.css would be: .addToCart:...
bossturbo's user avatar
0 votes
1 answer
328 views

How to use variables in new mysql interface in Fat Free Framework

I'm struggling on this with fat free framework: $db=new DB\SQL( 'mysql:host=localhost;port=3306;dbname=mysqldb', 'admin', 'p455w0rD' ); How tu use variables instead on plain text? I'd ...
Kasterby's user avatar
0 votes
0 answers
23 views

Successful ajax calls but why do I have to update the page? [duplicate]

On the user's profile page he can subscribe to or unsubscribe from a newsletter. I want this to be handled with ajax calls so the site doesn't have to be reloaded. PHP part (to get the email address): ...
Wondarar's user avatar
  • 171
0 votes
1 answer
75 views

Print newlines (linebreaks) with Fat Free Framework

I have a textarea which posts and saves a message in MySql I try to print it in a div with fatfree as {{@note}} or {{@note | raw}}. Both shows the text as single line. I've checked in phpMyAdmin that ...
Mesut Aslan's user avatar
1 vote
4 answers
292 views

in Fat Free Framework, is it possible to display a missing key in a Template?

Working with Fat Free Framework template engine and translations using dictionary files. In my template I have {{@_someNonTranslatedWord}} keys. Currently FF just leaves the space emtpy when this ...
vanMeerdervoort's user avatar
0 votes
1 answer
388 views

How to use expectOutputString PHPunits?

this my first question. I install composer (1.10.5), fatfree-core(3.7) and phpunit (9.1.3) and go to TDD. All working, but if i use $this->expectOutputString(); I've Assertions: 0 - not working. I ...
Born-kes's user avatar
0 votes
1 answer
217 views

Unable to use Memcached in PHP Fat free framework

I have been trying to implement memcached in my application built in fat free framework. I have read that it should be explicitly defined as "memcached=192.168.--.---:11211" but no matter how I ...
RSJ's user avatar
  • 15
0 votes
1 answer
549 views

Retrieving data from database in a fat free framework

I start learning fat-free framework v 3.7, I just read the documentation, I am trying to read the database and showing the result into HTML, but it doesn't work, this is index.php <?php $f3 = ...
zer0sign's user avatar
  • 143

1
2 3 4 5
9