Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-11 19:52:30

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

r1919 - addding an image

On my Windows laptop, I’m getting an error when I try to add an image:
<code>
Warning: Field ‘caption’ doesn’t have a default value insert into txp_image set w = 124, h = 124, ext = ‘.jpg’, name = ‘earth_globe.jpg’, date = now(), author = ‘hcgtv’, category = ‘’ in C:\var-www\textpattern\lib\txplib_db.php on line 84
Call Stack
# Function Location
1 {main}() C:\var-www\textpattern\index.php:0
2 include(‘C:\var-www\textpattern\include\txp_image.php’) C:\var-www\textpattern\index.php:104
3 image_insert() C:\var-www\textpattern\include\txp_image.php:30
4 image_data() C:\var-www\textpattern\include\txp_image.php:333
5 safe_insert() C:\var-www\textpattern\include\txp_image.php:578
6 safe_query() C:\var-www\textpattern\lib\txplib_db.php:118
7 trigger_error () C:\var-www\textpattern\lib\txplib_db.php:84
</code>

Diagnostics:
<code>
Textpattern version: 4.0.3 (r1919)
Last Update: 2006-10-10 17:39:27/2006-08-31 16:17:23
Document root: C:/var-www (C:\var-www)
$path_to_site: C:\var-www
Textpattern path: C:\var-www\textpattern
Permanent link mode: section_id_title
upload_tmp_dir: C:\var-lib\tmp
Temporary directory path: C:\var-www\textpattern\tmp
Site URL: hcg.valleyhaven.net
PHP version: 5.1.4
Server Local Time: 2006-10-11 15:48:59
MySQL: 5.0.21-community-nt
Locale: English_United States.1252
Server: Apache/2.0.58 (Win32) PHP/5.1.4
Apache version: Apache/2.0.58 (Win32) PHP/5.1.4
PHP Server API: apache2handler
rfc2616_headers:
Server OS: Windows NT 5.1

Pre-flight check:
————————————
C:\var-www\textpattern\setup\ still exists
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

#php_value register_globals 0

————————————

Charset (default/config): latin1_swedish_ci/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: latin1
character_set_filesystem: binary
character_set_results: utf8
character_set_server: latin1
character_set_system: utf8
character_sets_dir: C:\usr-bin\MySQL\share\charsets\
17 Tables: -

PHP extensions: bcmath, calendar, com_dotnet/0.1, ctype, date/5.1.4, ftp, hash/1.0, iconv, odbc/1.0, pcre, Reflection, session, libxml, standard/5.1.4, tokenizer/0.1, zlib/1.1, SimpleXML, dom/20031129, SPL, wddx, xml, xmlreader/0.1, xmlwriter/0.1, apache2handler, bz2, curl, dba, filepro, gd, gettext, mbstring, mime_magic/0.1, mysql/1.0, openssl, shmop, sockets, xmlrpc/0.51, xdebug/2.0.0rc1-dev

Apache modules: core, mod_win32, mpm_winnt, http_core, mod_so, mod_access, mod_actions, mod_alias, mod_asis, mod_auth, mod_autoindex, mod_cgi, mod_dir, mod_env, mod_imap, mod_include, mod_isapi, mod_log_config, mod_mime, mod_negotiation, mod_rewrite, mod_setenvif, mod_userdir, mod_php5

pretext_data: array ( ‘id’ => ‘’, ‘s’ => ‘’, ‘c’ => ‘’, ‘q’ => ‘’, ‘pg’ => ‘’, ‘p’ => ‘’, ‘month’ => ‘’, ‘author’ => ‘’, ‘request_uri’ => ‘/d7e6b1fb4e80a4fcf22c388168710a0b/?txpcleantest=1’, ‘qs’ => ‘txpcleantest=1’, ‘subpath’ => ‘\\/’, ‘req’ => ‘/d7e6b1fb4e80a4fcf22c388168710a0b/?txpcleantest=1’,
)

/include/txp_category.php: r1879 (aa84dc76082b0227a2b84cb5028c5ff2)
/include/txp_plugin.php: r1917 (def1c6926df4dd5ef4fa607655bef350)
/include/txp_auth.php: r1879 (f84d0af5836156c5f10e503e19eea592)
/include/txp_form.php: r1913 (b41e377f44b03b7127d9c83b4cf08559)
/include/txp_section.php: r1891 (8085ac2980f510c1edb8023c059a4f2d)
/include/txp_tag.php: r1915 (434b53e6d7d7edeffb6c3386117c8382)
/include/txp_list.php: r1892 (8dcd73ec065ae5f0646a4e7e6d3da4d4)
/include/txp_page.php: r1913 (0b454b359aa189e066c22ffa5db49422)
/include/txp_discuss.php: r1909 (e3e8b3033c04ee02d5a2fab5a918fc3d)
/include/txp_prefs.php: r1881 (ad2848365729421547dcc67c4342c558)
/include/txp_log.php: r1919 (0d8990043f8b8d3d6f144eb8aa7ece1f)
/include/txp_preview.php: r1238 (5d3f54eeb736dc7cde1ae8d269d7ed37)
/include/txp_image.php: r1895 (26bc66f03dbc676acbb2e64854e6275e)
/include/txp_article.php: r1889 (f6d150d49ccbf5c2676892271ebd97e4)
/include/txp_css.php: r1897 (62a795fc0bde840125fc5222252c974d)
/include/txp_admin.php: r1879 (2877d7d092f0812c7956313408d79834)
/include/txp_link.php: r1879 (c1ea6a187e4f314e108cef85e6fe3157)
/include/txp_diag.php: r1902 (c8185f20380666dba2e261cf1e026bf1)
/include/txp_file.php: r1895 (35faafb0d5eb0fb5e3ee0fa436eeef27)
/include/txp_import.php: r1238 (e5e41b797bc26018755828fe7b2f5f11)
/lib/admin_config.php: r1747 (f9c6ea27f665cd037d31c06ed54b3514)
/lib/txplib_misc.php: r1899 (11a324f565da001d3a5f242dc4d3134c)
/lib/taglib.php: r1535 (5efb10c2638b6671ec3a47099cc428cd)
/lib/txplib_head.php: r1887 (c6e2241f040e0616595f8262cd61a098)
/lib/classTextile.php: r1903 (ddf4d1873e881c072686a60c38956e09)
/lib/txplib_html.php: r1874 (2eda1d3992eb76f10f433e8393d29ed9)
/lib/txplib_db.php: r1879 (142f3d8eaf1e6e4aa120622925c1c8df)
/lib/IXRClass.php: r765 (2efb0fb05b55c634072b0bae9af38bdd)
/lib/txplib_forms.php: r1887 (1c7e8d0e03b1033b5b660129d2b71725)
/lib/class.thumb.php: r1879 (78e4339bb1d65978b1c57698d1bf3f49)
/lib/constants.php: unknown (0e40251c717c52b2b7fe992b62a3e97a)
/lib/txplib_update.php: r1239 (813b996fd418da19242d7bc07d66bdf5)
/lib/txplib_wrapper.php: unknown (584448787b4a3488200722672c0eee0d)
/publish/taghandlers.php: r1914 (1e0fcb42bdb49feded3645bb5c655d72)
/publish/atom.php: r1864 (8b51c019578514c6e0765cb11024b689)
/publish/log.php: r1637 (91f4ca2e4a9bd0a5a90e319646620a8e)
/publish/comment.php: r1904 (a6f5a1caa88943cf5efbd1eaf44fb0b8)
/publish/search.php: r1748 (1f3b5b2dffa90ccf597959b1b0e975ff)
/publish/rss.php: r1864 (c48e432b1e7ccfe06de06842249f125d)
/publish.php: r1918 (8be8475feebe003e7fdb63a76fc7818c)
/index.php: r1878 (a4ea5339eed6340fe7c7a5602833fdd8)
/css.php: r944 (df1c754417bdfb4e97a2c83ae5b454ee)
</code>

Offline

#2 2006-10-11 21:33:15

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1919 - addding an image

Not only that, it looks like caption and alt aren’t being inserted at all (even if you give a value)?

Offline

#3 2006-10-11 21:48:02

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1919 - addding an image

r1922

Offline

#4 2006-10-11 21:51:51

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r1919 - addding an image

Not directly related to the above question, but while browsing txpsql.php, noticed a few things:

txp_css table, column ‘name’ and ‘css’ are set like this:
<code>`name` varchar(255) default NULL,</code>
<code>`css` text,</code>
shouldn’t that be:
<code>`name` varchar(255) NOT NULL default ‘’,</code>
<code>`css` text NOT NULL,</code>
?

txp_lang: lang, name and event columns are set to <code>default NULL</code>… shouldn’t that be <code>NOT NULL default ‘’</code>? For the ‘data’ column, NOT NULL is not set.

txp_prefs: prefs_id, name and val columns are set to <code>default NULL</code>… shouldn’t that be <code>NOT NULL</code> with some default value set?

Offline

#5 2006-10-11 22:00:43

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1919 - addding an image

Thanks for catching those too. r1924.

Offline

#6 2006-10-11 22:12:58

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r1919 - addding an image

r1923 + r1924: text/blob types cannot have a default value (didn’t know that until I tried it with the caption thing that started this topic), see:
<a href=“http://dev.mysql.com/doc/refman/5.0/en/blob.html”>http://dev.mysql.com/doc/refman/5.0/en/blob.html</a>

Last edited by ruud (2006-10-11 22:16:21)

Offline

#7 2006-10-11 22:27:56

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1919 - addding an image

Ok, it’s working fine now on the new install.

Offline

#8 2006-10-12 07:48:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r1919 - addding an image

Using a default value ‘’ on text/blob columns could give warnings or errors in future MySQL versions, see:
<a href=“http://bugs.mysql.com/bug.php?id=19498”>http://bugs.mysql.com/bug.php?id=19498</a>

Last edited by ruud (2006-10-12 07:49:06)

Offline

#9 2006-10-12 16:14:18

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1919 - addding an image

r1926

Offline

Board footer

Powered by FluxBB