Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Errors on clean install on localhost.
Hello,
I’ve just tried a clean install of Textpattern v4.5.7 twice on localhost; Apache/2.4.16 (Unix), PHP 5.5.29 (cli).
Tables have populated in the database but I get 16 errors:
1. Invalid default value for ‘Posted’
2. Table ‘drroofnz.textpattern’ doesn’t exist
3. Invalid default value for ‘posted’
4. Table ‘drroofnz.txp_discuss’ doesn’t exist
5. Invalid default value for ‘date_banned’
6. Invalid default value for ‘issue_time’
7. Invalid default value for ‘date’
8. Invalid default value for ‘date’
9. Table ‘drroofnz.txp_link’ doesn’t exist
10. Table ‘drroofnz.txp_link’ doesn’t exist
11. Table ‘drroofnz.txp_link’ doesn’t exist
12. Table ‘drroofnz.txp_link’ doesn’t exist
13. Table ‘drroofnz.txp_link’ doesn’t exist
14. Table ‘drroofnz.txp_link’ doesn’t exist
15. Invalid default value for ‘time’
16. Invalid default value for ‘last_access’
Any ideas?
<txp:carver category="stone" type="hard"> These bits are harder than Basalt </txp:carver>Offline
Re: Errors on clean install on localhost.
Hi Maurice,
I am not sure but it might be because you use a dot in the table_prefix. What happens if you installed with drroofnz_ instead of drroofnz.?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Errors on clean install on localhost.
Hi Yiannis,
I don’t have any table prefix defined.
<txp:carver category="stone" type="hard"> These bits are harder than Basalt </txp:carver>Offline
Re: Errors on clean install on localhost.
That is indeed odd. Where is the drroofnz coming from?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Errors on clean install on localhost.
Is drroofnz the name of the database?
Try removing the tables and then run the setup again.
Offline
Re: Errors on clean install on localhost.
Yes drroofnz is the name of the database. I have dropped the database completely three times and tried a clean install, every time I have the same errors. Since the last time I installed a Textpattern site I have upgraded to El Capitan v10.11.1 and updated Apache and PHP. I have installed another CMS on this setup without any problem.
Thanks for your help so far, Maurice
<txp:carver category="stone" type="hard"> These bits are harder than Basalt </txp:carver>Offline
Re: Errors on clean install on localhost.
Which SQL server do you have installed and which version?
On the page that shows the list of errors, can you view the HTML source? That would show the SQL queries that cause the errors.
Offline
Re: Errors on clean install on localhost.
Hi Ruud,
1. mysql Ver 14.14 Distrib 5.7.9, for osx10.9 (x86_64) using EditLine wrapper
2. I’m getting, ‘DB-Connect was successful, but the textpattern-table was not found.’
internal_error "Table 'drroofnz.textpattern' doesn't exist"
in /Users/Maurice/Sites/drroofnz/textpattern/lib/txplib_db.php at line 95
internal_error "Cannot modify header information - headers already sent by (output started at /Users/Maurice/Sites/drroofnz/textpattern/lib/txplib_misc.php:709)"
in /Users/Maurice/Sites/drroofnz/textpattern/lib/txplib_misc.php at line 2241
internal_error "Cannot modify header information - headers already sent by (output started at /Users/Maurice/Sites/drroofnz/textpattern/lib/txplib_misc.php:709)"
in /Users/Maurice/Sites/drroofnz/textpattern/lib/txplib_misc.php at line 2312
<txp:carver category="stone" type="hard"> These bits are harder than Basalt </txp:carver>Offline
Re: Errors on clean install on localhost.
Check your MySQL configuration (typically /etc/my.cnf). I suspect you have sql_mode set to contain NO_ZERO_DATE (and/or STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES). Remove that from the configuration, restart the MySQL server and you should be able to install TXP (remove the partially installed tables first).
I’ve opened an issue for this to get it fixed in future TXP versions.
Offline
#10 2015-12-16 07:10:28
- bulldog
- New Member
- Registered: 2015-12-15
- Posts: 5
Re: Errors on clean install on localhost.
ruud, I have exact the same problem at new installations (4.5.7) here. Even existing installations don’t work properly anymore, i.e. update language won’t work, save articles fails and so on.
Remove STRICT_TRANS_TABLES from the sql_mode in my.cnf doesn’t work. Any suggestions?
OS X 10.11.2 with MySQL 5.7.9
Last edited by bulldog (2015-12-16 07:10:42)
Offline
Re: Errors on clean install on localhost.
To make sure the problem is what I think it is, what happens if you save an article for which you’ve set an expiry date?
Offline
#12 2015-12-17 07:31:16
- bulldog
- New Member
- Registered: 2015-12-15
- Posts: 5
Re: Errors on clean install on localhost.
When I set an expiry date I can save the article.
Offline
Re: Errors on clean install on localhost.
Edit the file textpattern/lib/txplib_db.php. Search for the line that reads (should be around line 47):
mysql_query("SET NAMES ". $txpcfg['dbcharset']);
Just below that line, add the following line:
mysql_query("SET SESSION sql_mode = ''");
Does that fix the problem for existing installs?
For new installs, you’d also have to edit textpattern/setup/txpsql.php, search for the line that reads (should be around line 34):
mysql_query("SET NAMES ".$dbcharset);
And add that SET SESSION line below there as well.
Let us know if this solves the problem.
Offline
#14 2015-12-18 08:30:53
- bulldog
- New Member
- Registered: 2015-12-15
- Posts: 5
Re: Errors on clean install on localhost.
Existing installs
Save articles works well. It does not change the functional behavior to add another language (Preferences). By click on Install it says Preferences saved but the link shows further Update and remains active.
Clean install
All the Textpattern CMS database tables were created and populated.
Then I went to Textpattern login page. After login I get following JavaScript error popup:
Internal error “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ignore table `textpattern` add index section_status_idx (Section,Status)’ at line 1”.
Then the page shows:
I’m sorry. I’m afraid I can’t do that; article is an unsafe operation.
Offline
Re: Errors on clean install on localhost.
I’ve done some tests with MariaDB 10.1 (can’t get MySQL 5.7 to install on the debian/ubuntu versions I’m running), combined with PHP 7 and what is to become TXP 4.6 with the two proposed modified lines to unset the SQL mode.
For a new install that solved the errors I got during setup and after the initial login. I didn’t test upgrading an existing install.
@bulldog, I’m not sure what you mean by “byt the link shows further update and remains active”.
@bulldog, could you try grabbing the development version of TXP via GIT, add the two SET SQL MODE lines and then do a clean install to see if that causes errors as well, because this probably won’t be fixed for the TXP 4.5.x branch and the 4.6.x branch shouldn’t have that error (which seems unrelated and I can’t explain it).
Offline