Wednesday, January 26, 2011

Doctrine:insert-sql InnoDB Error

$ php symfony doctrine:insert-sql

I've got another error after fixing MySQL Driver Error. It says "The 'InnoDB' feature is disabled". I fixed it by editing C:\AppServ\MySQL\my.ini. Commented out line:

# skip-innodb

Restarted my MySQL and re-run the command.

Doctrine:insert-sql MySQL Driver Error


$ php symfony doctrine:insert-sql

I've got an error running this line. It says "Couldn't locate driver name mysql". I gues Mysql is not completely configured yet for symfony.

Enabling the following modules in php.ini file will fix this error:

extension=php_mysql.dll;
extension=php_pdo;
extension=php_pdo_mysql;

Don't forget to restart your MySQL.

Running commands from the command prompt

Page 3: http://www.symfony-project.org/jobeet/1_4/Doctrine/en/03

I've got different errors or alert that says my php_mbstring.dll can't be found, or need to be reinstalled or some errors with php4ts.dll. But after a quick research about these extensions, it was suggested to put php_mbstring.dll extension before php_exif.dll in my C:\Windows\php.ini file, like this:

;extension=php_dbase.dll
extension=php_mbstring.dll
extension=php_exif.dll
;extension=php_fdf.dll

And it worked!

Symfony on Appserv

Page 1 : http://www.symfony-project.org/jobeet/1_4/Doctrine/en/01

Appserv 2.5.10's Apache is not configured yet to serve fake domain/subdomains (or virtual hosts). I chose 'jobeety.com' as my fake domain.

The first thing we need to do, is to enable the vhost_alias_module in our Apache configuration file. To do this, we need to open the httpd.conf file located in C:\AppServ\Apache2.2\conf.

Uncomment this line removing sharp (#) :

LoadModule vhost_alias_module module/mod_vhost_alias.so
and

Include conf/extra/httpd-vhosts.conf

In conf/extra/httpd-vhosts.conf file:

<VirtualHost 127.0.0.1:8080>
  DocumentRoot "C:\AppServ\www\symfony\jobeet\web"
  ServerName jobeety.com
  ServerAlias www.jobeety.com
  DirectoryIndex index.php
  <Directory "C:\AppServ\www\symfony\jobeet\web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf "C:\AppServ\www\symfony\jobeet\lib\vendor\symfony\data\web\sf"
  <Directory "C:\AppServ\www\symfony\jobeet\lib\vendor\symfony\data\web\sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>


The domain name jobeety.com used in the Apache configuration has to be declared locally. I have added the following line:

127.0.0.1 jobeety.com

in my C:\WINDOWS\system32\drivers\etc\host file.

Then I restarted my Apache server. To do that,
  • Right-click C:\AppServ\Apache2.2\bin\httpd.exe
  • Click "Run as Administrator"
Test http://jobeety.com in your browser.

Introduction

Alright! I have decided to create this blog for those who are symfony beginners like me. This may not be useful to all of you but at least I have shared some of the errors I've encountered and the fix I've done.

I'm using:
  • Dell Inspiron 560
  • Pentium(R) Dual-Core CPU E5400 @ 2.70GHz 2.70 GHz
  • Windows 7
  • 2 GB RAM
Has installed:
Has downloaded: