I was installing the symfony2 CMF using composer and I noticed that the default PDO handler for it is set to sqlite. I'm just curious if there's any reason behind it that related to performance or the symfony team just don't feel like using mysql for CMF.
the cmf sandbox is using sqlite only because this is the most simple thing to setup. for a production system with jackalope-doctrine-dbal, i would rather use mysql or postgres.
if you want optimal performance, your best option is jackalope-jackrabbit and installing the jackrabbit java server. for a production environment, you should install jackrabbit with tomcat. there is a tutorial in the jackalope wiki: https://github.com/jackalope/jackalope/wiki/Running-jackrabbit-in-tomcat-with-mysql
And if you still prefer MySql, use the defaults but change
database_driver: pdo_mysql
database_path: null
Related
I will like to deploy an app that uses sqlite to Heroku. Googling for how to do this, I come across the official documentation of sqlite on hereku here
And the amazing thing is that, the documentation seems to be suggesting you should not use sqlite on heroku and then went further to tell you how to use Postgres instead!!!
Is it really impossible to use sqlite on heroku and have your data not transient?
Heroku has a database offering of its own, based on the Postgres database so it is necessary to switch so as to avoid the file-based SQlite. To connect to a Heroku database, you will need to use the Heroku CLI. That is the recommendation, as you have noted.
You can run heroku addons:add <your database choice, say the free tier one for example>. It is as simple as that.
If you try to run heroku config:get DATABASE_URL you will notice that a postgres://<> (now postgresql) has been created for you.
I have one problem with Doctrine (or with my server configuration, I don't know where is the problem) in my Symfony2 web. I have been looking for an answer since several days but I haven't found it yet.
I need to connect my symfony web to a remote Microsoft SQL database through Doctrine. For this reason, I have added the "database_driver: pdo_sqlsrv" param in app/config/parameters.yml, but when I try to execute (in my Mac) a command like:
php bin/console doctrine:database:create
or
php bin/console doctrine:generate:entities AppBundle/Entity/Product
I get the following error:
[Doctrine\DBAL\Driver\PDOException] could not find driver
[PDOException] could not find driver
I have checked the phpinfo and the driver doesn't appear (only mysql, sqlite). I don't know if it's possible to add MSSQL, because in Microsoft SQL Server Functions (PDO_SQLSRV) appears that it needs to be running on a Windows.
Is not possible to access a mssql database without Windows? (If yes, how can I do it).
Would I need a Windows hosting?
Thanks in advance.
I'm using sql server on my last project.
here is what i've done to make it work on my dev environment
install pdo-dblib
composer require leaseweb/doctrine-pdo-dblib
configure doctrine to use the driver_class from the lib above instead of refering the sql_serv driver
driver_class: Lsw\DoctrinePdoDblib\Doctrine\DBAL\Driver\PDODblib\Driver
I am using Sf 1.4 for a project. I want to switch from mySQL to PostgreSQL because of technical reasons (I have written some database extensions, which I need access to in my queries).
I have trawled the net, but can't seem to find any info on how to fo this. So far, I have modified my database.yml file by modifying the database.yml dsn entry as follows:
From:
dsn: mysql:dbname=##PROJECT_NAME##;host=localhost
To:
dsn: postgres:dbname=##PROJECT_NAME##;host=localhost
I have also commented out the mysql specific entries in propel.ini
However, when I run ./symfony propel:build-sql and checked the generated SQL, I notice that the SQL generated was MySQL dialect rather than PostgreSQL.
How do I tell Symfony to generate SQL for PostgreSQL?
Since the OP won't post his own answer and accept it...
The DSN for PostgreSQL must begin with pgsql:, not postgres:.
how to install pdo sqlite drivers to enable onserver support
Assuming I understand the question, you want to know how to enable PDO SQLite access. Depending on the version of your PHP configuration, you may need to select different options, but assuming PHP 5.3.x, you should edit the php.ini to include the following libraries (for Windows - similar libs with different extension on *nix) in the extension=lib.dll (or extension=lib.so):
php_pdo.dll
php_pdo_sqlite.dll
php_sqlite.dll
This assumes they are available on your server and you can edit the PHP.ini config. If you cannot then you may have to ask your host provider to do this for you (which they may...).
SQLite Functions (PDO_SQLITE)
Introduction
PDO_SQLITE is a driver that implements the PHP Data Objects (PDO) interface to enable access to SQLite 3 databases.
http://www.php.net/manual/en/ref.pdo-sqlite.php
I am developing lots of custom modules for my web application and needs to implement memcache with it. I have installed and enabled memcache module in my drupal installation but now I have to see what data is being cached.
Is there any additional work required to cache my module specific data? Also, What is the exact work flow of caching mechanism in Drupal?
Regards,
Once set up correctly the memcache module overrides the standard Drupal cache functions, so your module dosen't need to be memcache aware. It will use memcache on systems with it enabled and standard Drupal db caching elsewhere.
The memcache module requires a bit more work to enable than most other modules.
These are the broad steps you need to
take in order to use this software.
Order is important.
Install the memcached binaries on your server. See How to install
Memcache on Debian Etch or How to
install Memcache on OSX
Install the PECL memcache extension for PHP.
In php.ini set memcache.hash_strategy="consistent".
Put your site into offline mode.
Download and install the memcache module.
If you have previously been running the memcache module, run
update.php.
Apply the DRUPAL-5-cache-serialize.patch that
comes with the module to your Drupal
installation.
Start at least one instance of memcached on your server.
Edit settings.php to configure the servers, clusters and bins that
memcache is supposed to use.
Edit settings.php to include either memcache.inc or
memcache.db.inc. For example,
$conf['cache_inc']
='sites/all/modules/memcache/memcache.db.inc';
Bring your site back online.
Once installed and running you can telnet to the memcache instance on your server (11211 I belive is the default port) and type get *cache-key* to see if your data has been cached.