Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2006-06-29 19:09:06

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Garbage generated by doSlash() function

hosts have the ability of switching it on and the possibility (and hence the problem) remains of TextPattern (and other apps of course) not working because of it.

No, the setting doesn’t affect Textpattern negatively. Your problem is due to a bug in a specific release of mysql.

While we wait for the ‘other person’ to fix it, TextPattern remains unusable for me as a potential user.

That’s very unfortunate, yet I don’t think it’s reasonable to assume that it is somehow our responsibility to provide workarounds for broken, exotic features in other software (especially given that the vendor already provides a fix themselves). We’re busy enough with working around all the broken stuff in default setups of PHP and mysql (a lot more than you see other weblog/cms-systems do).

Offline

#32 2006-06-29 19:47:11

daveh
Member
From: Bristol, UK
Registered: 2006-06-24
Posts: 33
Website

Re: Garbage generated by doSlash() function

<h1 style=“font-size:large”><b>OK, FOR ALL YOU SUFFERERS, HERE IS A FIX
for TextPattern and Brinkster.com</b></h1>
<ol>
<li>Open txplib_db.php (in a text editor (notepad) or something) (see * below)
<li>Find line 37 that reads <b>//be backwardscompatible</b>
<li>Create a blank line just below it and Copy and paste the following command to it…
<code>
mysql_query(“set sql_mode = replace(local.sql_mode, ‘NO_BACKSLASH_ESCAPES,’, ‘’)”);
</code>
<li>Save the file
<li>Upload it to Brinkster (or your own nasty hosting service).
<li>Voila. (Well it worked for me anyway.)
</ol>
Of course, this would be too difficult to include by default within TextPattern… because it’s ‘their fault’ it doesn’t work, not ours. Honest Guv! ;-)

ALSO, when your hosting service upgrades their version of mySQL there is no need to remove this fix.
<i style=“font-size:x-small”>(Of course, you can remove it if running that extra single query each page load bothers you.)</i>

YeeeeeHaaaaaa! :-)
Enjoy, Dave H.
<hr>
* txplib_db is in the <webroot>/your-textpattern-folder-name/textpattern/lib folder!


—————
Dave-H

Offline

#33 2006-06-29 23:49:02

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Garbage generated by doSlash() function

What I meant was, now that the setting exists (for all future versions of mySQL), hosts have the ability of switching it on and the possibility (and hence the problem) remains of TextPattern (and other apps of course) not working because of it.

Sorry, but that’s not correct.

Textpattern should work perfectly well on most platforms, and on all platforms after MySQL 5.0.22, regardless of whether the NO_BACKSLASH_ESCAPES setting is turned on or off.

The problem only affects certain platforms in a narrow range of MySQL versions. Earlier versions, later versions, and the most common platforms, all work fine with the setting on or off.

If Textpattern was doing something wrong, or there was no workaround available, or the problem affected an open-ended range of versions, we’d add a workaround to the Textpattern code.

If we added a workaround for every bug that ever occured and was later fixed in an obscure version of MySQL or PHP, we’d have more workarounds than code.


Alex

Offline

Board footer

Powered by FluxBB