I used PHP to create a database with a table. I did it in the following way:
Why do you open the db two times ?
Try this code:
Edit: Fin is probably right; maybe you have to check the SQLite version with phpinfo().