[FLOW3-general] Notice: Undefined index: identifier

Georg Ortner go at simplaweb.at
Wed Jan 27 17:13:01 CET 2010


> You simply change the default DSN, username, password combo defined in
> Settings.yaml to your own settings.
>
> Check the Settings.yaml on the FLOW3 package, copy the persistence
> section to your top-level Configuration/Settings.yaml and adjust as needed.
>
> FLOW3:
>    persistence:
>      backendOptions:
>        dataSourceName: 'mysql:dbname=blog'
>        username: bloguser
>        password: somepassword

Hi Karsten, first of all thank you for your great work and support for us!

Basically this works but I had some difficulties and I guess others who 
want to use mysql could find that useful:

1) First off all with the configuration above you will get an 
"SQLSTATE[HY000] [2002] Invalid argument" Exception from PdoBackend. We 
need to specify also a host. E.g.:

 > FLOW3:
 >    persistence:
 >      backendOptions:
 >        dataSourceName: 'mysql:dbname=blog;host:127.0.0.1'
 >        username: flow3user
 >        password: somepassword

(Shall I create an issue for that, because I think it would be good if 
PdoBackend assumes that we want to use the localhost on default?)

2) Now before this can work you need to create the tables. Therefor you 
can use 
Packages/Framework/FLOW3/Resources/Private/Persistance/SQL/DDL.sql. But 
if you want to feed mysql directly (without PDO in between) you need to 
change a little bit of the syntax. (I attached a file with the correct 
syntax)

Or you change PdoBackend->connect() and add this line at the end:

$this->createTables();

Now you just run your Application once. This will create the tables and 
throw an exception because apparently the index on line 36 in DDL.sql is 
too long for mysql. (I'm gonna create an issue for that if there isn't 
already one)
Fortunately just for testing you won't need that index and so you just 
don't care about the exception. Now just remove the createTables() line 
again.


3) Now you need to define an encryptionKey for the security package. But 
be warned if you change that in your global configuration it won't work 
because in Framework/FLOW3/Configuration/Settings.yaml it is set to an 
empty string and your global setting will be owned. (Shall I open an 
issue for that?)


So if you have set the persistence config, successfully created the 
tables and have set an encryption key you are able to have fun with 
mysql and the best PHP-Framework ever!


Regards,
George
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mysql.sql
URL: <http://lists.typo3.org/pipermail/flow3-general/attachments/20100127/6996d0c5/attachment.asc>


More information about the FLOW3-general mailing list