Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
4.0.5 (r2466): MySQL Image Update Syntax Error
I ran across the following while trying to update an image on a site running 4.0.5 (r2466):
Warning: 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 's Word', caption = '',
category = 'site-design', date = now(), a' at line 6 update txp_image set name = 'tagline.gif',
ext = '.gif', w = 290, h = 95, alt = 'Growing together in God's Word', caption = '',
category = 'site-design', date = now(), author = 'jdykast' where id = 5 in
/home/ccc/public_html/v2/textpattern/lib/txplib_db.php on line 84
The error is produced when I have already defined alt text which contains an apostrophe and then try to upload an image to replace/update the original. So, to reproduce the error: Add an image and give the alt text an apostrophe and save then update the image by browsing for a new image and then click “Upload.” This is when the error shows up. I can get around the error by removing the apostrophe, saving that change and then uploading the new image file.
I tried it on a website still running 4.0.3 (r1188) and was unable to reproduce the error. Both sites are at the same host.
Here is my diagnostic info:
Textpattern version: 4.0.5 (r2466)
Last Update: 2007-07-05 01:48:22/2007-07-05 01:48:22
Document root: /home/ccc/public_html
$path_to_site: /home/ccc/public_html/v2
Textpattern path: /home/ccc/public_html/v2/textpattern
Permanent link mode: section_title
Temporary directory path: /tmp
Site URL: www.calvarycleveland.org/v2
PHP version: 4.4.7
GD Image Library: version bundled (2.0.28 compatible), supported formats: GIF, JPG, PNG
Server Local Time: 2007-07-10 18:40:52
MySQL: 4.1.22-standard
Locale: en_US.UTF-8
Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.7 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.8b
Apache version: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.7 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.8b
PHP Server API: apache
RFC 2616 headers:
Server OS: Linux 2.6.18-8.el5
Active plugins: ccc_toolbox-0.1, rss_auto_excerpt-0.5, rss_suparchive-0.18m, rss_admin_db_manager-4.3, zem_contact_reborn-4.0.3.19m, zem_contact_lang-4.0.3.6, ob1_title-2.1m
.htaccess file contents:
------------------------
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /relative/web/path/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
------------------------
Offline
Re: 4.0.5 (r2466): MySQL Image Update Syntax Error
Thanks. Fixed in SVN revision 2478
Offline
Re: 4.0.5 (r2466): MySQL Image Update Syntax Error
Thanks. I’ve always appreciated the way Textpattern devs get things done. I know you guys were taking some heat a while back but I think the team has done a great job with things. I’ve been using and playing with Textpattern since late 2004 and have seen a lot of progress with TXP; thanks!
Offline