Login / Status
developer.Resource

Sponsors

Netfielders Newsgroups - typo3.dev

28.01.2008 18:38 Frank McCarry <fmccarry@xxxxxx>ID 321733

Re: [TYPO3-dev] MYSQL5.0 error when trying to insert first page using exec_INSERTquery.

Hi,
I got help resolving this one.
Make sure that your database is not configured to use strict mode.
in the file
MySQL\MySQL Server 5.0\my.ini

I changed the line from
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

too
sql-mode="ANSI,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

This works where I have control over the db configuration. Not sure what
problems a locked down hosting environment will throw me!

Frank.

"Frank McCarry" <fmccarry@atg.com> wrote in message
news:mailman.1.1201527728.30174.typo3-dev@lists.netfielders.de...
> System:-
> TYPO3 4.1.5
> MySQL 5.0
> Windows XP
> PHP 5.2
> Apache 2.2
> Downloaded test site 'dummy-4.1.5'
>
> Issue:-
> When trying to create my first page into dummy-4.1.5 (root home page)
> using 'Create new page' I got an insert to DB failed error. I know what
> the error is;Typo3 has defaulted the value for storage_pid to be ''
> instead of 0. I have checked and this, 0, is the default in the database
> for this field and it is also defined to allow nulls.
>
> What I want to know is;
> How do I get Typo3 to use the correct default for the field storage_pid?
>
> caller t3lib_DB::exec_INSERTquery
> ERROR Incorrect integer value: '' for column 'storage_pid' at row 1
> lastBuiltQuery INSERT INTO pages
> (
> doktype,hidden,starttime,endtime,layout,urltype,lastUpdated,newUntil,cache_timeout,shortcut_mode,module,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,sorting,pid,no_search,title,alias,target,no_cache,subtitle,nav_hide,TSconfig,php_tree_stop,editlock,storage_pid,is_siteroot,l18n_cfg,extendToSubpages,fe_group,crdate,cruser_id,tstamp
> ) VALUES (
> '1','1','0','0','0','1','0','0','0','0','','1','1','31','27','0','256','0','0','home','','','0','home','0','','0','0','','1','0','0','','1201214664','1','1201214664'
> )
> debug_backtrace SC_alt_doc->processData // t3lib_TCEmain->process_datamap
> // t3lib_TCEmain->insertDB // t3lib_DB->exec_INSERTquery //
> t3lib_DB->debug
>
> Frank McCarry
>