DB error 1364 when submitting article on localhost

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
mm22
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 19, 2009 7:53 am

DB error 1364 when submitting article on localhost

Post by mm22 » Wed Aug 19, 2009 8:19 am

I have recently installed Joomla 1.5.13, I couldn't complete the installation via browser so I did a manual installation. I had a few problems when adding tables to my localhost, among those I had to modify a few SQL lines because the mysql installed on my localhost (version 6) wouldn't accept default values for TEXT fields.

For example I had to change

Code: Select all

CREATE TABLE `jos_banner` (
  [...]
  `description` TEXT NOT NULL DEFAULT '',
  [...]
into

Code: Select all

CREATE TABLE `jos_banner` (
  [...]
  `description` TEXT NOT NULL,
  [...]
After that everything was fine I could access the administrator section and add users, also the frontpage looks fine and I could populate the tables with sample content from Joomla.

Problems came when I tried to add an article, when clicking Save or Apply I got the following Error 500 page

Code: Select all

DB function failed with error number 1364
Field 'images' doesn't have a default value SQL=INSERT INTO `jos_content` ( `id`,`title`,`alias`,`introtext`,`fulltext`,`state`,`sectionid`,`mask`,`catid`,`created`,`created_by`,`created_by_alias`,`checked_out`,`checked_out_time`,`publish_up`,`publish_down`,`attribs`,`version`,`metakey`,`metadesc`,`metadata`,`access` ) VALUES ( '0','test','test','

Text of the article...
','','1','0','0','0','2009-08-19 07:50:36','63','','0','0','2009-08-19 07:50:36','0000-00-00 00:00:00','show_title=\nlink_titles=\nshow_intro=\nshow_section=\nlink_section=\nshow_category=\nlink_category=\nshow_vote=\nshow_author=\nshow_create_date=\nshow_modify_date=\nshow_pdf_icon=\nshow_print_icon=\nshow_email_icon=\nlanguage=\nkeyref=\nreadmore=','1','','','robots=\nauthor=','0' )
It looks like field 'images' whose value is not explicitly given in the INSERT statement lacks a default value, so I thought the problem followed the changes I made to the tables when loading them on localhost.

That is not the case because I did not alter this table, it looks exactly the way it is supposed to be from Joomla installation, i.e. not having a default value for 'images' field. I am pretty sure the problem is related to my local server configuration because everything seems to work fine on the Joomla installation on my webhost, at least for this part.

I am running PHP 5.2.6 and MySQL 6.0.4, could this problem and the previous ones be related to MySQL 6? My host runs version 5.

Any help is appreciated.

mm22
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 19, 2009 7:53 am

Re: DB error 1364 when submitting article on localhost

Post by mm22 » Wed Aug 19, 2009 8:27 am

Sorry forgot to mention I am running Apache on Windows XP on my local machine. My webhost runs on Linux. I want to use localhost for testing purpose only so it is OK if not everything works perfectly, but adding articles is a pretty important function.

Linc
Joomla! Explorer
Joomla! Explorer
Posts: 305
Joined: Wed Aug 05, 2009 4:03 am
Contact:

Re: DB error 1364 when submitting article on localhost

Post by Linc » Wed Aug 19, 2009 9:17 am

what's the problem for browser install? I would recommend it as it will configure everything correctly.
www.webhostpark.com
Get quality web hosting with latest promotion

mm22
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 19, 2009 7:53 am

Re: DB error 1364 when submitting article on localhost

Post by mm22 » Wed Aug 19, 2009 10:08 am

Linc wrote:what's the problem for browser install? I would recommend it as it will configure everything correctly.
The problem was that mentioned about creating tables with a default value for text fields.

I suspect all of these issues come from mysql 6, so I am now installing mysql 5.1 and I will test joomla there.

mm22
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 19, 2009 7:53 am

Re: DB error 1364 when submitting article on localhost

Post by mm22 » Thu Aug 20, 2009 3:48 am

Quick update that could be useful to someone who is trying to use Joomla! on MySQL 6.

As reported above using joomla on mysql 6 causes great problems, specifically in my case regarding default values of text fields in the content tables.

I have now installed MySQL 5.1 and everything works fine in Joomla! by using the same exact tables. I reckon I could also use the browser installation for Joomla! but I think for the moment I am happy enough to have Joomla! finally running on my localhost so I'll just leave it like that.

So in my experience Joomla! 1.5.13 is NOT compatible with MySQL 6.0.4 on Windows XP and Apache 2.


Locked

Return to “Administration 1.5”