Background I have a OptionHelper-Class that is looking in the database-table, where I store some flexible parameters. This class is working fine in Controllers. Now I want to use this class in a …
Tag: php
Send Image file with Google reCaptcha v2 token to PHP via jQuery + Ajax
I want to POST and upload image via AJAX with Google reCaptcha v2 validation. but I am facing an issue that I am not not able to send image with caption text with google recaptcha token in Ajax. I …
Fatal error: Uncaught Error: Call to a member function X on Y
I am trying to learn OOP PHP so much of this is new to me. I have seen other posts but havent found one that answers my question. class Test { public function a(){ //getting data… return $…
Is it possible to check if cronjob is running in Symfony application?
I am currently working on the project that has over 20 crons. Some of them are pretty long processes. It was built on Symfony 2.8, so we decided to upgrade it to 3.4 LTS. After the upgrade we noticed …
PHP Exception with symfony mailer
I’m a beginner with Symfony, and I have to put a Mailer in my web service. But I have a php exception that I don’t understand. There is my mailer function : private function sendMail(MailerInterface $…
Method not found. error when using Google my business API
I am getting 404 from accouts list function by using google api client. I have already access token by using OAuth2.0. In addition to this, I already enable the Google My Business API via https://console.developers.google.com for OAuth 2.0. ■Here is environemnt PHP 7.2.3 Ubuntu 18.04 LTS google/apiclient ^2.5…
PHP unable to echo the text after a condition is met
I am not getting the desired result from the code below. Everything works fine But there is one main problem: When there is no song in the database it shows empty result just with back button. It …
values inserted as null into database
hi im trying to insert a url and its content into 2 table but i will use an id from a table and insert this id in multiple entries in the second table i hope i succeed to clarify my issue here the …
How to implement custom item get endpoint with filtering in api platform?
I am working on a symfony/api platform app that allows users to track sports matches. My entities look like this (shortened for brevity): User.php MatchPlayer.php Match.php So in my model, a user can relate to many matches and a match can relate to many users via the glue table that also saves what position a…
How often must timezone be set for a php web application, using mysql’s session time-zone
I might be lazy, but this question seems easier to just ask than to go laborating for. I have been able to set time-zone with mysql cli, with the query I wonder, for a php web application (that keeps a users time-zone), how often must this query be made. Is it for every connection to the MySql/MariaSql databa…