Most voted "symfony" questions
Symfony is an open source PHP framework focusing on fast and easy development cycles including project standards and programming philosophies of the highest level.
Learn more…67 questions
Sort by count of
-
5
votes2
answers326
viewsUse of uncharted entities in Symfony2
I read that normally the Entity folder of a Bundle stores the entities that will be persisted (in my case, by Doctrine) in the database. But, due to the ease of working with validations in the…
-
5
votes1
answer191
viewsSimulate another environment by using the `Composer update`command
I have a project Symfony2 with facilities managed by composer, with their respective files composer.json and composer.lock synchronized between my local machine and the production server via git. It…
-
3
votes1
answer551
viewsBlock access to a system URL or folder path
Hi, I’m looking to block access to the administrative part of my site and release to only a few ips. I can do this using the .htacess well quiet but the problem is that I have the module…
-
3
votes1
answer654
viewsAccess-Control-Allow-Origin: * does not work for all my domains
I have four applications that use the same API, and the Access-Control-Allow-Origin: * not all of them, the only application that doesn’t work is the one that I’m using Zend Framework 2 and Symfony,…
-
3
votes0
answers38
viewsSymfony/React Solving Problems with Babel
I’m new to Symfony/React and soon I come across the following problem... I cannot execute the same commands that I find in some tutorials (Destined to React) on the Web, so I understood the "plugin"…
-
2
votes0
answers261
viewsZend Framework and Symfony
I started studying Symfony 2 and realized that it is very productive for system development, but there are people who say that Zend Framework 2 is the best framework in PHP. I would like to know the…
-
2
votes2
answers793
viewsApache directing two Urls to the same folder
I have 2 sf2 projects in different folders. When I access them through Urls localhost/projeto01 and localhost/projeto02m go to the same location (project01 even when access /project02). I created…
-
2
votes2
answers125
viewsShow date field information - php symfony
I have a table in the database with date type data, the dates in the database are in this format: 2009-09-10. I’m trying to bring them via the symfony json this way: linha 7: date("d/m/Y",…
-
2
votes3
answers1765
views"php. h not found" error while installing Intl extension on Mac
I’m having problems installing the extension Intl on Mac, already followed the following tutorials: Installing Intl package on OSX Lion Install the PHP INTL Extension on a Mac Installing the PHP…
-
2
votes1
answer175
viewsError while uploading site
Guys I just uploaded a site of mine made in Laravel 5.2 with Pho 5.6 locally. I went up to a shared hosting in Locaweb that I have. I configured PHP 5.6 correctly and I went up the site here giving…
-
2
votes2
answers309
viewsHow to use REST to validate XML receiving via POST
I have an application in Delphi that sends an XML with a code via Post. I have to develop an application in Symfony that needs to validate the receipt of this XML via post. To hear it would be via…
-
1
votes1
answer153
viewsUsing Symfony to start the database automatically when deploying the project
Is there any place in Symfony reserved for me to provide scripts or run a class that populates the database with the initial information I need? The ideal would be during the first run and each…
-
1
votes2
answers66
viewsSymfony 2 create query
createQuery("select p.name from blogBundle:Person p where p.id not in(select c.person from blogBundle:Category c)")->execute(); And I’m getting this mistake: Error: Invalid PathExpression. Must…
-
1
votes2
answers217
viewspreg_match('/ d*$/', $nr_procedure) ? 'f' : ’t'; - what do ? php
I have it (preg_match('/^\d*$/', $nr_procedimento) ? 'f' : 't';) in a code, but I have no idea what it does, more precisely the part of preg_match('/^\d*$/'. Does anyone know?…
-
1
votes1
answer108
viewsBlameable behavior does not work on Symfony2
I am implementing in Symfony2 the behavior Blameable using the Gedmo\Mapping\Annotation. I have successfully implemented the Timestampable, but I cannot implement the Blameable. The problem is that…
-
1
votes1
answer59
viewsSymfony2 - Security/Custom User Class
I’m learning how to work a little with Symfony2 and a certain doubt has arisen. Following the Symfony document itself, it teaches you to create a simple login form, where it implements the interface…
-
1
votes1
answer104
viewsDoubt about how to share information
Create a static control for the menus, the goal was for each Bundle to register its menu item. <?php namespace Test\RegisterBundle\Controller; use…
-
1
votes1
answer206
viewsHow to check if a table date is lower than today in Doctrine - Postgresql
I have to check if the user has registered an expiration date, if yes, I check if that date is lower than today if it is, it shows if it does not hide, I did so: $this->noticia =…
-
1
votes0
answers38
viewsThe "Types" model has no "Situation" relation
Opa, I’m trying to make a relationship between two tables but is returning me this error, above. I have no idea what is wrong. this is my YAML structure: Tipos_denuncias: connection: doctrine…
-
1
votes0
answers40
viewsConnect LDAP to manual symfony
Hi, I’m trying to log in with an LDAP connection on symfony 1.4. I blew the connection variables, ldap_connect and ldap_bind and they return me True, but I can’t redirect the user into my system: if…
-
1
votes0
answers36
viewsSymfony Api with Auth0
Someone can help me is that I’m having trouble implementing the Auth0 to authenticate an api I’m seeing this example https://github.com/auth0/jwt-auth-bundle/tree/master/example only that the…
-
1
votes1
answer255
viewsSelect Distinct in Doctrine and Symfony
Hi, I have a photo album creation table. My code makes 1 Insert for each image added in the photo album. I have a grid for displaying Albums for the user to view. I want to make a distinct of…
-
1
votes0
answers359
viewsImage cropped when comparilhar on facebook
Hi, I have a button to share on facebook the news from my site. It takes the correct image, the correct title and the correct description. But when the window appears in the news feed on facebook…
-
1
votes2
answers82
viewsSymfony - Working with images?
I need to create an image with php , I would like to know if Simfony has a library or something already included in it to work with GD/Imagemagick functions. I’ve been researching and I’ve seen…
-
1
votes1
answer100
viewsFatal Error: Silex Application::share()
I am developing an API in Silex and while trying to test it on my server, I am encountering following error: Fatal error: Call to Undefined method Silex Application::share() in…
-
1
votes0
answers43
viewsSending Newsletter to Bulk Bank Emails - No Limit Swiftmailer Email
Hi, I have an action on my controller that triggers emails from the database. I did some tests on my machine by inserting only my own e-mail into the table, put up to 1000. I only managed to receive…
-
1
votes2
answers334
viewsAttempted to call Function "iconv_strlen"
I started using Manjaro and suddenly this error with no other information is appearing. Before in Debian it was all functional. I haven’t changed anything for a few days. The mistake is Attempted to…
-
1
votes0
answers84
viewsHow to configure Symfony in Windows?
I have an application written in Symfony 3 that I want to publish in a Ubdomain. The application is currently hosted in Ocaweb. My main website is this: example.com The goal is to create a specific…
-
1
votes3
answers159
viewsRead values from a Json structure using Jquery
I’m trying to read the data that is received via php and I need to read these values separately. Return is an object json, when I show on console using command console.log(data) and the following…
-
1
votes1
answer1182
viewsSend an ajax post request to PHP
I am trying to send a text that is typed via ajax to a php page that will make a query using this text that is received. I want to know how to send the variable value nmCliente for the php page. I…
-
1
votes1
answer82
viewsSymfony 4 - How to save images with Formbuilder (Filetype) in Base64 in the Database(Mysql)?
Hello, I’m trying to make a form where the user just inserts an image. In theory, the image should be stored as a Blob file (Base64) in the database, but Symfony is storing "tmp/php/random value" in…
-
1
votes0
answers30
viewsIntegrate symfony wordpress
I’m trying to Integrate a Symfony 4.3 PHP app in Wordpress, By integrating I Mean that the Symfony page call the get_header() and get_footer() So I Managed this by putting require dirname(__DIR__) .…
-
1
votes0
answers61
viewsSemantical Error The Annotation "@Symfony Component Validator Constraints Notblank " in Property was Never Imported
I am developing a simple API with Microframework Slim using Doctrine, I decided to implement some validations, so I installed the library symfony/validator:^5.2. In my entities, I have some Doctrine…
-
0
votes2
answers142
viewscurrent_date Doctrine
Bye, i’m wanting to bring the bank information only when it has the same day as today I tried those ways: ... ->where('a.data_hora = ?', current_date()); .... ->where('a.data_hora =…
-
0
votes4
answers698
viewsDoes anyone know a good tutorial on ACL in Symfony 2?
I’m starting a new project and decided to use Symfony, I wonder if anyone knows a good tutorial on Acl and/ or roles so I can implement. The hierarchy I’ll need to use is more or less this: Master…
-
0
votes1
answer641
viewsDate Data Recovery - php + mysql
Hello, I am searching from the bank a data information in a grid with various information, I am doing so: $data = $tbdeliberacoes->getData(); date("d/m/Y", strtotime($data)); and this is my…
-
0
votes3
answers212
viewsError at end of Symfony installation
I’m willing to learn Symfony and then did the installation as they speak on the site: composer create-project symfony/framework-standard-edition meuprojeto/ '~2.5' Until then did the installation,…
-
0
votes2
answers690
viewsSQLSTATE[42703]: Undefined column: 7 ERROR: column Alis.column name_column does not exist LINE 1:
I have a page on my system that does a file transfer, it just does an update on the table. I copied the lines of this code and put it to work on another page, changing only the names of fields and…
-
0
votes1
answer175
viewsQuery with json type field in Doctrine 2 and Symfony 3
Does anyone know a way to perform a query using Doctrine which has a JSON field? Example query in Postgresql: select id, nome, tipo, '{"idUsuario":465,"login":"paulo"}'::json from public.usuarios…
-
0
votes1
answer440
viewsPrint an array with multiple select data, once
I have a array which receives precisely 18 values. Each "key" of that array is a time and each value of this is an SQL query. I pass this array for a json file to bring the data objects I need. The…
-
0
votes1
answer227
viewshow to write the output of var_dump($_FILES) to monolog;
I need to save the var_dump($file) records in the monolog to identify an error. I don’t know how to proceed. My monolog in app config monolog: handlers: main: type: 'rotating_file' path:…
-
0
votes1
answer137
viewsHow to display images in symfony
I’m starting at symfony and would like to know the correct way to display an image. I’m changing the index.html.twing which is in app/Resource/view/default/ and base.html.twing which is in…
symfonyasked 8 years, 4 months ago fabricio_wm 1,090 -
0
votes1
answer50
viewsSymfony Custom Field 2
How to write a custom form field on Symfony2? Since in this form should appear: A field of type Dropdown with the label City; Another field of the kind number alongside the label door number.…
-
0
votes1
answer136
viewsRecover Symfony action data in Ajax
Hi, I have a button that triggers an action Ajax that leads to a action in the controlador Symfony. In the action I can do the select and see the information I want, but I just can’t get it from…
-
0
votes1
answer61
viewshow to prevent sql Injection symfony 1.4 and Doctrine 1.2?
Hi, I have a 3 research inputs that query the database and return me the obtained data. With this a malicious user can bypass my system and get other information. Analyzing the behavior I use for…
-
0
votes1
answer44
viewsWhere is the error log file in symfony?
I am running a project, in localhost same, done with Symfony to fix an error and for that I would like to see the file with the error in the log but I do not know where it is. Can anyone tell me?…
-
0
votes1
answer86
viewsSymfony2 + Fosuserbundle - Password without Encoder
Using Symfony2 plus Fosuserbundle, I want the user registration in the database to have no password encoder. In security.yml was placed: encoders: FOS\UserBundle\Model\UserInterface: plaintext…
-
0
votes1
answer52
viewsError changing table via Doctrine Migrations
Through git I used the command below: php bin/console doctrine:migrations:generate I opened the file and made the change <?php namespace Application\Migrations; use…
-
0
votes1
answer56
viewsUsing Voter with Symfony 4
I’m learning Symfony 4 and I am facing a problem. In version 4 of Symfony the ACL was discontinued and from what I’ve seen they’re using the Voter. I’ve researched the internet and the documentation…
-
0
votes1
answer19
viewsUse Doctrine createQueryBuilder with tablets that have no entity
It is possible to perform a query with Doctrine createQueryBuilder using a table that does not have a declared entity (Entity)? Example: In the code below table table2 (t2) does not have an entity…