Doctrine could not create db named 'Symfony' - symfony

Hello console gives this issue while trying create db via console. I am using uniform server under windows 7 and trying to learn Symfony. It says it could not find driver which is pdo_mysql but i'm using pdo already with native php code. How will i fix it? Thank you.
SOLVED.
SOLUTION: I activated extension=php_pdo_mysql.dll in cli version of php.ini and restart apache.

SOLVED.
SOLUTION: I activated extension=php_pdo_mysql.dll in cli version of php.ini and restart apache.

Related

Symfony deployment problem on hostinger, impossible to download dependencies

I have been trying for several days to deploy a Symfony site. All the files are well in the public folder with the .htaccess, I only need the dependencies for the site to be functional. The problem is that when I run the command
php composer.phar update
I get several error messages concerning my version of PHP.
The host is hostinger. I know the problem comes from the composer.json file and the version of the bundles but I don't know how to solve the problem.
Thanks
you need php version 8.1 as the message says. Normally, for a deployment you should not launch a composer update. It would rather be a composer install.
I contacted hostinger, and the problem is that the server was in PHP7 after changing to PHP8 it worked. Thank you all for your responses

How to install symfony2 project existing in github repository to local instance

I'm having a symfony2 project in github repository. I want to install it to my local instance. I'm using Xampp on Windows 7. How can I achieve it?
Thanks!!
if your using xampp the easiest way is to use symfony build in server.
clone or download the symfony project to your xampp htdocs.
start your xampp and open the shell, (shell button on the right)
locate yourself in the root symfony dir. and type:
php app/console server:run
a local php server should start on http://localhost:8000
i recomment using this because (dev mode is loaded by default).
its faster then a VM because you dont sync files.
you can also add verbose arguments
php app/console server:run -vvv
that way you get more output info when debugging.

Memcachier add-on for cloudcontrol is failing

I followed the installation guide at https://www.cloudcontrol.com/dev-center/Add-on%20Documentation/Data%20Storage/MemCachier. The memcachier server is up and running, I tested it from the command line. But my cloudcontrol app isn't able to access it.
Here's the error in our logs:
Info MemcachedError: error 40 from memcached_set: FAILED TO SEND AUTHENTICATION TO SERVER, no mechanism available, host: [my-memcachier-server-url]:11211 -> libmemcached/sasl.cc:221
Notice No worthy mechs found
This seems to be a SASL-related issue. Is it possible that cctrl does not have the correct sasl2 libraries installed? Did anyone else experience this problem?
Further info:
django-pylibmc==0.5.0 and pylibmc==1.4.1 in requirements.txt
url and credentials are read from the cctrl environment correctly
This is caused by the libmemched version bundled with the buildpack missing a patch (https://bugs.launchpad.net/libmemcached/+bug/1381160). Because it is a stackoverflow bug, it can work systematically on your machine while it systematically breaks in the container. I will update the python buildpack to use the patched libmemcached library from the stack.
In the meantime you can try to achieve this manually by setting the LD_LIBRARY_PATH environment variable to /usr/local/lib either via config add-on or web: env LD_LIBRARY_PATH=/usr/local/lib <your_command> in the Procfile.

Change CLI's php

Im working with Symfony2. Im trying to execute the following command:
php app/console doctrine:database:create
The problem is that I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so' - dlopen(/opt/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so, 9): image not found in Unknown on line 0
Could not create database for connection named <comment>symfony</comment>
could not find driver
APC is already installed, since the Symfony/web/config.php was OK, what I realised is that the version of php from CLI is different from the one Apache is running.
The one Apache is running has APC installed, so I would like CLI to run that same php, How can I do that?
in my case deleting the version that macports installed was enough to have CLI and Apache run the same PHP.
And that's:
sudo port uninstall php5

sqlite is not working

i came to know that, when we install php it automatically install sqlite. otherwise we need to enable it. is it correct?
i have installed php in my local server.when i execute the phpinfo it show sqlite enabled. still sqlite is not working. below are the lines came under pdo_sqlite
PECL Module version 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6 2006/01/01 12:50:12 sniper Exp $
SQLite Library 3.3.6
apparat from this, anything i have to done. pls reply...
Try to see if you have read/write access to the database you are trying to open. I'm guessing this will solve the problem.

Resources