Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2015-12-30 20:13:50
- walter976
- New Member
- Registered: 2009-08-02
- Posts: 7
New install problem populating/creating tables
Hi guys,
just installed TXP 4.5.7 and I get the following when trying to populate tables:
“
1. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘TYPE=MyISAM PACK_KEYS=1 AUTO_INCREMENT=2’ at line 42
2. Table ‘u699619608_db.textpattern’ doesn’t exist
3. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘TYPE=MyISAM PACK_KEYS=1’ at line 10
4. Table ‘u699619608_db.txp_category’ doesn’t exist
…….
“
Can you help please?
Offline
Re: New install problem populating/creating tables
Which version of MariaDB do you have installed?
Could you try the development version of TXP (download via GIT) and see if that gives the same error.
Offline
#3 2015-12-31 08:00:49
- walter976
- New Member
- Registered: 2009-08-02
- Posts: 7
Re: New install problem populating/creating tables
ruud wrote #297210:
Which version of MariaDB do you have installed?
Could you try the development version of TXP (download via GIT) and see if that gives the same error.
MySQL: 10.0.20-MariaDB
I googled it a bit and I actually fixed the problem by editing txpsql.php on setup folder:
ORIGINAL:
$version = mysql_get_server_info();
//Use "ENGINE" if version of MySQL > (4.0.18 or 4.1.2)
$tabletype = ( intval($version[0]) >= 5 || preg_match('#^4\.(0\.[2-9]|(1[89]))|(1\.[2-9])#',$version))
? " ENGINE=MyISAM "
: " TYPE=MyISAM ";
NEW:
$tabletype = " ENGINE=MyISAM ";
Simply assigning ENGINE instead of TYPE which is not longer used for newer MySQL versions.
Looks like he is not able to recognize the proper mysql version, any thoughts?
Offline
Re: New install problem populating/creating tables
Interesting. That would mean $version contains something we don’t expect. Could you put this in a file called info.php, upload it and then visit using your browser. What appears on the screen?
<?php $version = mysql_get_server_info(); var_dump($version); ?>
Offline
#5 2015-12-31 20:18:22
- walter976
- New Member
- Registered: 2009-08-02
- Posts: 7
Re: New install problem populating/creating tables
Here is what I get:
Deprecated: mysql_get_server_info(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/u699619608/public_html/info.php on line 1
Indeed something wrong…
Offline
Re: New install problem populating/creating tables
Ah, right, that’s already fixed in the development version, which no longer uses the mysql_ functions. Try this instead:
<?php $version = mysqli_get_server_info(); var_dump($version); ?>
I’m hoping that’ll show you the 10.0.20 version.
Offline