Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8941965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:25:15+00:00 2026-06-15T11:25:15+00:00

I have a project in Symfony2 which works good at my localhost, but after

  • 0

I have a project in Symfony2 which works good at my localhost, but after moving it to external server problem has started.

  1. I don’t see any results names from database which contains polish characters
  2. In Profiler i checked queries:
    • ‘Parameters’ section has correct charset
    • ‘runnable query’ has the same parameters but with bad charset

for example:

(...)
WHERE ((((c1_.name LIKE '%�%') OR (c3_.name LIKE '%�%') OR (..)

Parameters: ['%ś%', '%ś%', (...)]

All database tables has charset = utf8_unicode_ci.

In config.yml i set

doctrine: 
    dbal: 
      charset: UTF8 

Setting framework charset doesn’t work.

/config.php test says:

RECOMMENDATIONS:
  1. Install and enable a PHP accelerator like APC (highly recommended).
  2. Set short_open_tag to off in php.ini*.
  3. Set magic_quotes_gpc to off in php.ini*.
  * Changes to the php.ini file must be done in "/usr/local/php/php.ini".

But unfortunatelly i have no access to php.ini on that server. Is that possible magic_quotes_gpc caused that problem?
I don’t have access to command line too, so i have added project (database, file system, vendors) via ftp, and phpmyadmin.

Becouse I don’t have problem on my localhost i guess that is problem with server configuration, and I have no access to that, the only way I see is to try to change charset configuration of QueryBuilder. Where can I do that? Do you know what else could cause that problem?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:25:17+00:00Added an answer on June 15, 2026 at 11:25 am

    Found solution:
    To set “SET NAMES utf8” I changed my doctrine config

    doctrine:
        dbal:
              driver:   %database_driver%
              host:     %database_host%
              port:     %database_port%
              dbname:   %database_name%
              user:     %database_user%
              password: %database_password%
              charset:  UTF8
              options:
                 1002:  "SET NAMES 'UTF8'"
    

    It works fine now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a symfony project which, because of DNS issues, is http://<project-name>/ locally, but
I have a Symfony2 project which uses composer, and I'd like to use this
I have a symfony2 project and I would like to create route (prefix) which
In my Symfony2 project, I have a ModelBundle which holds my entities, and other
I have a Symfony2 project with a MySQL db: #app/config/config.yml doctrine: dbal: driver: %database_driver%
When I update my Symfony2 project I always have to do this: root@xxx:/var/www/project# php
I have a question about symfony2. I have a project and I am using
Problem: I have a symfony project with a database full of production data I
I have what I assume is a configuration problem with my Doctrine schema.yml, but
I have the following project structure which I can't get to work: Mac OS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.