Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-08-16 17:01:11

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 48

Upgraded to 4.8.2; image uploads silently fail.

Hi, everyone!

Thanks again for your help last year; it was nice to eventually get rid of “Connections” after, oh dear, how many years..

Since updating to 4.8.2, my image uploads are silently failing; I see the post hitting in access log, but no errors or anything else is showing – debug mode is still showing nothing out of place, and upload_tmp_dir is set locally despite no open_basedir settings. Any insight would be greatly appreciated.

Textpattern version: 4.8.2 (b6e7a157e4f6a6eb0aeb62dca53f4e00)
Last update: 2020-08-16 16:11:20/2020-07-29 21:19:27
Textpattern path: __TXP-ROOT/textpattern
Article URL pattern: id_title
Production status: live
upload_tmp_dir: /var/www/tmp
Temporary directory path: __TXP-ROOT/textpattern/tmp
PHP version: 7.0.33-0+deb9u8
GD Graphics Library: 2.2.4; Supported formats: GIF, JPEG, PNG, WebP.
Server timezone: America/New_York
Server local time: 2020-08-16 13:00:47
Daylight Saving Time enabled?: 1
Automatically adjust Daylight Saving Time setting?: 1
Time zone (GMT offset in seconds): America/Boise (-25200)
MySQL: 5.5.5-10.1.45-MariaDB-0+deb9u1 (Debian 9.12) 
Database server time: 2020-08-16 13:00:47
Database server time offset: 0 s
Database server timezone: SYSTEM
Database session timezone: SYSTEM
Locale: en_US.UTF-8
Site / Admin language: en-us / en-us
Web server: Apache
Apache version: Apache
PHP server API: apache2handler
RFC 2616 headers: 
Server OS: Linux 4.19.0-0.bpo.9-amd64
Admin-side theme: classic 4.8.2
Active plugins: 
	com_connect-4.6.0
	etc_date-0.4.6
	etc_pagination-0.4.7b
	pap_comconnect-0.1.2
	zem_ir_05-ssh-0.5-ssh

.htaccess file contents: 
------------------------
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

<IfModule mod_rewrite.c>
    RewriteEngine On
    #RewriteBase /relative/web/path/
    #Old, old, old rollator hacks.
    RewriteRule ^go/(.*) /go.php?site=$1 [R=301,L]
    RewriteRule ^rss.(.*) /rss [R=301,L]
    RewriteRule ^getfile/(.*) /software [R=301,L]
    RewriteRule ^view/42(/?) /software [R=301,L]
    RewriteRule ^view/(.*) /$1 [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

    RewriteCond %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.*) index.php

    RewriteCond %{HTTP:Authorization}  !^$
    RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

<IfModule mod_mime.c>
    AddType image/svg+xml  svg svgz
    AddEncoding gzip       svgz
</IfModule>

------------------------

Charset (default/config): utf8mb4/utf8mb4
character_set_client: utf8mb4
character_set_connection: utf8mb4
character_set_database: latin1
character_set_filesystem: binary
character_set_results: utf8mb4
character_set_server: utf8mb4
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
collation_connection: utf8mb4_general_ci
collation_database: latin1_swedish_ci
collation_server: utf8mb4_general_ci
18 database tables: newtxp_textpattern is latin1, newtxp_txp_category is latin1, newtxp_txp_file is latin1, newtxp_txp_image is latin1, newtxp_txp_link is latin1, newtxp_txp_section is latin1

10 custom fields: custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10 (10)

Apache modules: core, mod_so, mod_watchdog, http_core, mod_log_config, mod_logio, mod_version, mod_unixd, mod_access_compat, mod_actions, mod_alias, mod_auth_basic, mod_authn_core, mod_authn_file, mod_authz_core, mod_authz_host, mod_authz_user, mod_autoindex, mod_bw, mod_cgid, mod_defensible, mod_deflate, mod_dir, mod_env, mod_evasive20, mod_fcgid, mod_filter, mod_geoip, mod_headers, mod_mapcache, mod_mime, prefork, mod_negotiation, mod_php7, mod_proxy, mod_proxy_fcgi, mod_proxy_http, mod_reqtimeout, mod_rewrite, mod_security2, mod_setenvif, mod_socache_shmcb, mod_ssl, mod_status, mod_unique_id, mod_xsendfile

Pretext data: array (
  'request_uri' => '/73fca59265a8c305720641f7e5d0a261/?txpcleantest=1',
  'qs' => 'txpcleantest=1',
  'subpath' => '\\/',
  'req' => '/73fca59265a8c305720641f7e5d0a261/?txpcleantest=1',
  0 => 2,
  1 => '73fca59265a8c305720641f7e5d0a261',
  2 => '',
  'secondpass' => 0,
  '_txp_atts' => false,
  'status' => '200',
  'id' => '',
  's' => '',
  'c' => '',
  'context' => '',
  'q' => '',
  'm' => '',
  'pg' => '',
  'p' => '',
  'month' => '',


/admin-themes/classic/classic.php: 
	5f05af5915e53fca94d56154af8f9710
/admin-themes/hive/assets/js/autosize.js: 
	c12d4a53b06622f18df7f80993daffb7
/admin-themes/hive/assets/js/darkmode.js: 
	256ec5c3f1b984fcc388949c4410f346
/admin-themes/hive/assets/js/main.js: 
	8e6a70c4cf6524b04dcbba793bb3151d
/admin-themes/hive/hive.php: 
	ee91c191279335628e8c53f0b58a01d0
/admin-themes/hiveneutral/assets/js/autosize.js: 
	c12d4a53b06622f18df7f80993daffb7
/admin-themes/hiveneutral/assets/js/darkmode.js: 
	256ec5c3f1b984fcc388949c4410f346
/admin-themes/hiveneutral/assets/js/main.js: 
	8e6a70c4cf6524b04dcbba793bb3151d
/admin-themes/hiveneutral/hiveneutral.php: 
	d27d8361fe9304becb871e46232e0912
/include/txp_admin.php: 
	320d396f66cd8c53892678fe9657e50d
/include/txp_article.php: 
	647613f37634379a4d94cf7662a7321a
/include/txp_auth.php: 
	a28a7c96d2f4740e7914fd26a7367d0f
/include/txp_category.php: 
	c5d908666194870d48bd429fac52b8dc
/include/txp_css.php: 
	ce9e9342ef29f4689d59f17466424ee5
/include/txp_diag.php: 
	a508b159b9143efd53ed0e7d454a1f55
/include/txp_discuss.php: 
	ebac1851a0ffba706b46f5302ac5b476
/include/txp_file.php: 
	3ed9385f82c70914e4f3c87c83aa8eb7
/include/txp_form.php: 
	3dfb85154f480fd9a0e5a6958d46c264
/include/txp_image.php: 
	e368fb3c172b567c30b20216ed8f904b
/include/txp_lang.php: 
	e5836ed10e7742e17712a17baca9ccd0
/include/txp_link.php: 
	853b4d86079635c82e79e1c88665169c
/include/txp_list.php: 
	225cf3ab1272d1e148e2fccd88d51400
/include/txp_log.php: 
	0edcff29657fb90f623f5b3e2ad6f256
/include/txp_page.php: 
	53fb1aa8f57cdfc600a2553cee3f515c
/include/txp_pane.php: 
	bf2dde5f6adafe8a848bc64f56af33d6
/include/txp_plugin.php: 
	975820737ca0d922dc0bf8ec72b33eb7
/include/txp_prefs.php: 
	e5b646771863a50d91678a84ed1d10bd
/include/txp_section.php: 
	f09fb91947607740f463dda532474da8
/include/txp_skin.php: 
	399fc5df206d85cd1af1b0a48f5413c5
/include/txp_tag.php: 
	f1c10d7dc58e0356ce17f3330fc9fb83
/index.php: 
	73a1a527260831b3ede15a507a18f9d7
/lib/admin_config.php: 
	5a187f910565d88a2bc188268d481b42
/lib/array_column.php: 
	154ae62342164fe4d727b28813f268b6
/lib/class.thumb.php: 
	6eae7d0b705769962596ae5a8e3eeac0
/lib/class.trace.php: 
	055e3bc1f8d3217aec152fa7e6216b1d
/lib/classTextile.php: 
	efa9a212910afd6fe90cbb08e703e1ef
/lib/constants.php: 
	5d2c24b1e3e101f932265b5b576eb7af
/lib/IXRClass.php: 
	a1b525b4a9ed12dcb5677d5232a3d92e
/lib/PasswordHash.php: 
	66a8aa4b2d6e0527877a797907efc035
/lib/taglib.php: 
	0f8171d7958d8a8123d828afd5ac41c8
/lib/txplib_admin.php: 
	995bf4421c26658a28f29cb7249c7fbc
/lib/txplib_db.php: 
	db369cd26901a3cb5435dc0fe7045c30
/lib/txplib_forms.php: 
	a00f57c72541c1844ccd321af3364bb8
/lib/txplib_head.php: 
	bd72c962f7ecff19ecea05b19b25dfc6
/lib/txplib_html.php: 
	ded5b4079b423884de311c13ac078f19
/lib/txplib_misc.php: 
	dd856c6f7e451201ed75535d72f0bed5
/lib/txplib_publish.php: 
	d0cd87958fad4d39f957c101cde04dfd
/lib/txplib_theme.php: 
	27b7a1f930a3ebcde8849823cac40cf6
/lib/txplib_update.php: 
	f772df9c9e145b69ff3f8af3c615572d
/lib/txplib_validator.php: 
	27dd061a50d6fecfbabdaec457e277b5
/lib/txplib_wrapper.php: 
	ff1afffce118dd291a615ed6540ed46a
/publish/atom.php: 
	08a9a3ae66e26e2fdc2a0955da102bf2
/publish/comment.php: 
	102a73887324863a28be762bb64564b4
/publish/log.php: 
	6d83a06dbe11520d7e43afec10011ceb
/publish/rss.php: 
	97fcd064d44aa1f11b87d079e97f1172
/publish/search.php: 
	0aa3e6b08c1bbcb020feadfbb35db67f
/publish/taghandlers.php: 
	5e61828ede59e8adf79408da6259a788
/publish.php: 
	3dcce18cb3a03d75d7f5b9e053300566
/textpattern.js: 
	6e644b0c951f287158dcb7a186b5d76d
/update/_to_4.0.3.php: 
	80c3afb0dcb80edcad2c30c4cf905b16
/update/_to_4.0.4.php: 
	be1739654b223bd951bf55d2f48a12f6
/update/_to_4.0.5.php: 
	afd860098366b0b2369bfa57c0f0ec7d
/update/_to_4.0.6.php: 
	0dddc6a11ed28c023e0b59828819d2df
/update/_to_4.0.7.php: 
	4e9e1d37870451a2e98f9c4c5ee89653
/update/_to_4.0.8.php: 
	d5aba30d332338eb38e3e1cff08502af
/update/_to_4.2.0.php: 
	3c25ab6bcc7a31edb52428096c042381
/update/_to_4.3.0.php: 
	e08cb6276170701f00be291fdba55446
/update/_to_4.5.0.php: 
	1a4488f63a53c6d8472312483f574fc9
/update/_to_4.5.7.php: 
	53ab3076e319727e121432227746eedb
/update/_to_4.6.0.php: 
	c78348eadea6b7be35d63a5c776a981e
/update/_to_4.7.0.php: 
	c9159b3a8ae39b4043b0fe5ca7a5dc28
/update/_to_4.7.2.php: 
	97db14ef5d1c14acaf3bd49f8395b8db
/update/_to_4.8.0.php: 
	e4da9bc708ef7b21c624d0cd6016ec4f
/update/_update.php: 
	3466df44919914a9a8aa6b872896999b
/vendors/blueimp/fileupload/jquery.fileupload.js: 
	c98670daf0e08d364fc69f2a48e63d17
/vendors/jquery/jquery/jquery.js: 
	dc5e7f18c8d36ac1d3d4753a87c98d0a
/vendors/jquery/jquery-ui/jquery-ui.js: 
	c15b1008dec3c8967ea657a7bb4baaec
/vendors/Netcarver/Textile/DataBag.php: 
	67ab988e7ab1d072937acbbcb023a288
/vendors/Netcarver/Textile/Parser.php: 
	ca95b629865b6fc8a03d2a6d57e5e164
/vendors/Netcarver/Textile/Tag.php: 
	73f14c01329e27998a213b7e5b79e620
/vendors/PrismJS/prism/prism.js: 
	56ce9efa4bb1bb43affd4018956f2a16
/vendors/Textpattern/Adaptable/AdapterInterface.php: 
	fe35dd6ba0eaedc1fb54193c014021d6
/vendors/Textpattern/Adaptable/Providable.php: 
	5e8af9e9397d4f16da71e4f4fc9c1cfa
/vendors/Textpattern/Adaptable/ProvidableInterface.php: 
	1ccb6be6edc7b3ff2272e35d644d0421
/vendors/Textpattern/Admin/Paginator.php: 
	218e9277e451bc1a1e9917a089c873ea
/vendors/Textpattern/Admin/Table.php: 
	c27a8ca7cf9d021c976464f5ef68e188
/vendors/Textpattern/Admin/Theme.php: 
	c5a220c63a2ff63d4725fcec73c1266a
/vendors/Textpattern/Admin/Tools.php: 
	f148194a51d8d6bb1915ce154862358d
/vendors/Textpattern/Container/Container.php: 
	9653aeffa179a27ead529f04d898ab9d
/vendors/Textpattern/Container/ContainerInterface.php: 
	87215cdfb9ba14484fa46e03763fa12e
/vendors/Textpattern/Container/FactorableInterface.php: 
	4c75c43e40e985dbb5ca0643dace001a
/vendors/Textpattern/Container/FactoryInterface.php: 
	48d909eeed80c8007e8c99b2f255a672
/vendors/Textpattern/Container/ReusableInterface.php: 
	d03462edb9a52096a01b69c999d4906a
/vendors/Textpattern/Date/Timezone.php: 
	47fdc11b43ce88f5ae171170e891f145
/vendors/Textpattern/DB/Core.php: 
	779c5c14052c4add4006737293f9e990
/vendors/Textpattern/Filter/Exception.php: 
	36f733921960bc185a8d48bd39a70c1d
/vendors/Textpattern/Filter/FilterCallable.php: 
	ba774a22a3be3fbf8c2d2dc4a79402ad
/vendors/Textpattern/Filter/StringFilter.php: 
	f1a962c18184fa1e489fcc12b111372e
/vendors/Textpattern/Http/Request.php: 
	8bfa3068cef4d98614d6b010942d2ad2
/vendors/Textpattern/Import/TxpXML.php: 
	2fe029d5e6e33474cc9536f81753053f
/vendors/Textpattern/Iterator/FileIterator.php: 
	6e26520c022e2c45a1d982be0eab93e0
/vendors/Textpattern/Iterator/RecDirIterator.php: 
	e405a0c0ad2bb0fd0fba983688edc60c
/vendors/Textpattern/Iterator/RecFilterIterator.php: 
	64c0159e58087519644245409dfe1740
/vendors/Textpattern/Iterator/RecIteratorIterator.php: 
	c240e02875e7ea95fc9fdeaca26e834f
/vendors/Textpattern/L10n/Lang.php: 
	cda6806df5c4c9a45cb190b16a859a11
/vendors/Textpattern/L10n/Locale.php: 
	12e5c2331eda895e4a08492ec21536a1
/vendors/Textpattern/Loader.php: 
	947e1de5f03130d1a0d743d9d4bf1b60
/vendors/Textpattern/Mail/Adapter/Mail.php: 
	b5aa1e86cbf09c8ccdc6fee99ba557d1
/vendors/Textpattern/Mail/AdapterInterface.php: 
	c089fb87a60763d24aa589cca5a4e2ff
/vendors/Textpattern/Mail/Compose.php: 
	30c8c428d377722658e5845cf89b9ea1
/vendors/Textpattern/Mail/Encode.php: 
	a981d3a3cc455a7fa88615e442713f21
/vendors/Textpattern/Mail/Exception.php: 
	763060d8136a74c7449f2e7faac110ca
/vendors/Textpattern/Mail/Message.php: 
	92dbb5ba3fd2e908b6f9c53b96f711bf
/vendors/Textpattern/Module/Help/HelpAdmin.php: 
	84120d58acc48dec32ead3adebf9be40
/vendors/Textpattern/Password/Adapter/PasswordHash.php: 
	f6a15f46e30eab0eb53b4f7aa69aa565
/vendors/Textpattern/Password/AdapterInterface.php: 
	32930ad148b6cda04b70945f7566535f
/vendors/Textpattern/Password/Generator.php: 
	8ab98722eb6d9dcf186dce558f42906c
/vendors/Textpattern/Password/Hash.php: 
	c265c6bc114432f4befc350eafce17c8
/vendors/Textpattern/Password/Random.php: 
	d0f127a8d31cac54040085d57a74a190
/vendors/Textpattern/Plugin/Plugin.php: 
	e7822bc3c097193c37fe9ec28d1e793b
/vendors/Textpattern/Search/Filter.php: 
	1d2aba6643e1b6d2382257825deb1b35
/vendors/Textpattern/Search/Method.php: 
	f2a1368481cc8bf781a9525c336de434
/vendors/Textpattern/Security/Exception.php: 
	46c987b3af3c526f063bf47cf60d35e9
/vendors/Textpattern/Security/Filter.php: 
	8ac713e61916c70425a731d0ec2d72e6
/vendors/Textpattern/Server/Config.php: 
	dbaddaea1c84a79063f1b7299bb7302c
/vendors/Textpattern/Server/Files.php: 
	d13d4a49879f170e16a1735f56cfffa7
/vendors/Textpattern/Skin/AssetBase.php: 
	0d5d10d973d0f0de2c181ca061aca33b
/vendors/Textpattern/Skin/AssetInterface.php: 
	321de33dd825a9d95419438d106f131f
/vendors/Textpattern/Skin/CommonBase.php: 
	fa1a403067051a86ea596b71d3b1f848
/vendors/Textpattern/Skin/CommonInterface.php: 
	8c4c5a5b8cd2f58923750253e566207c
/vendors/Textpattern/Skin/Css.php: 
	5076340c1e93bd3694b7571a112fef0e
/vendors/Textpattern/Skin/CssInterface.php: 
	530b7443df187b5e47d3af6a639ca1d0
/vendors/Textpattern/Skin/Form.php: 
	3faac3bbf0db4e8afad0508a32852ed5
/vendors/Textpattern/Skin/FormInterface.php: 
	ff4579330b5395ed7898cd2d5015ac15
/vendors/Textpattern/Skin/Page.php: 
	c155543e0f6edc6c394f45ae635f79e4
/vendors/Textpattern/Skin/PageInterface.php: 
	491f9d40e3a3b8117f58980c37ba2863
/vendors/Textpattern/Skin/Skin.php: 
	03fd71b821b1d51a51f0a2bb66127a4e
/vendors/Textpattern/Skin/SkinInterface.php: 
	ea0c4bccd16637998d64eabb2a003859
/vendors/Textpattern/Tag/Registry.php: 
	d3a06ae5bb2468fee8fdf816ccca13f7
/vendors/Textpattern/Tag/Syntax/Authors.php: 
	17d8275976b0b2906ba4315a14058a1b
/vendors/Textpattern/Tag/Syntax/File.php: 
	506b3213539d3cab2d31958fc14ed214
/vendors/Textpattern/Tag/Syntax/Image.php: 
	cc06f761d1a37f6ce3f2226ea3ed9d6f
/vendors/Textpattern/Tag/Syntax/Link.php: 
	7ec0f884da4ed3f39e1b20aa0e05a2d0
/vendors/Textpattern/Tag/Syntax/Partial.php: 
	7691413b0dba50cb57c130a7f49ec9b8
/vendors/Textpattern/Textfilter/Base.php: 
	798ecc573965fd29652d73d8a92491d4
/vendors/Textpattern/Textfilter/Constraint.php: 
	79d0754e3be24793d74e491d47fb01d2
/vendors/Textpattern/Textfilter/Nl2Br.php: 
	3e6ef464d5750e908df6b8e4d28624ee
/vendors/Textpattern/Textfilter/Plain.php: 
	9e37dca009614e043c28b0da6221990f
/vendors/Textpattern/Textfilter/Registry.php: 
	88b4de3151b3c252104e372d91df21be
/vendors/Textpattern/Textfilter/TextfilterInterface.php: 
	27d541404ff4bbbb21ddf617165634ea
/vendors/Textpattern/Textfilter/Textile.php: 
	cf06ae4d7c0cdab2b35bae6f8f4f9dc9
/vendors/Textpattern/Textile/Parser.php: 
	99fea5690c6ce8bceecd69a0a7bb4cc2
/vendors/Textpattern/Textile/RestrictedParser.php: 
	d46d49fcc716083532bf421ffbdf85cc
/vendors/Textpattern/Textpack/Parser.php: 
	8f68f2d5b15e300771f472f23989433d
/vendors/Textpattern/Textpack/String/Iterator.php: 
	c8233d6ac4c857a770810345c7f855aa
/vendors/Textpattern/Textpack/StringInterface.php: 
	0eaf2aea2c53abc814ad12a6a356f16d
/vendors/Textpattern/Type/StringType.php: 
	3569f32b4879517309ace40f06defe7b
/vendors/Textpattern/Type/TypeCallable.php: 
	62e567316e44f8b5b4a4e9de31648685
/vendors/Textpattern/Type/TypeInterface.php: 
	dca0db4e29dc478438e4d0c6f56b20c4
/vendors/Textpattern/Validator/BlankConstraint.php: 
	fd6602d50de209e2f8dfd76025cfbf42
/vendors/Textpattern/Validator/CategoryConstraint.php: 
	985b5b8f1b6f68dbb13c67424c3a0bca
/vendors/Textpattern/Validator/ChoiceConstraint.php: 
	b5dd8a3d4e304e3100b2dae39ba00e7e
/vendors/Textpattern/Validator/Constraint.php: 
	79d4e7c562a58b06b5ca374c993fc9f0
/vendors/Textpattern/Validator/FalseConstraint.php: 
	8c0d1e92c1cbd77e0d41de481d181701
/vendors/Textpattern/Validator/FormConstraint.php: 
	7f5b8cb53b924c4b32a4f12ce625cbe8
/vendors/Textpattern/Validator/SectionConstraint.php: 
	896694330d6a8e359420e9da32f560d1
/vendors/Textpattern/Validator/TrueConstraint.php: 
	673b18e8ce08f8426a85bda09149d868
/vendors/Textpattern/Validator/Validator.php: 
	67fdf5da4314a00bd04724f00a1f6d48
/vendors/Txp.php: 
	2a4a8b3710093792df7f9c074016737e
/../css.php: 
	dfac7d90955ae716fc57deb069d14b36
/../index.php: 
	a2c5a8eef6c2ec86a0c319ddd15ffa05

------------------------

Thanks again!

Offline

#2 2020-08-17 05:21:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,071
Website GitHub Mastodon Twitter

Re: Upgraded to 4.8.2; image uploads silently fail.

This is what I find confusing

upload_tmp_dir is set locally despite no open_basedir settings.

Also, did you check the permissions of the images directory?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2020-08-17 08:30:22

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,138
Website

Re: Upgraded to 4.8.2; image uploads silently fail.

Since updating to 4.8.2, my image uploads are silently failing;

Out of curiosity, what was the previous Textpattern version you were using ? And, I assume, uploading images worked fine there…

Does uploading “files” (from the Files panel) still work ?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#4 2020-08-17 08:35:03

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,536
Website GitHub Twitter

Re: Upgraded to 4.8.2; image uploads silently fail.

Hi

is it a Browser cache problem ? Try CTRL+F5

Cheers

Offline

#5 2020-08-17 08:37:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,419
Website GitHub

Re: Upgraded to 4.8.2; image uploads silently fail.

I presume the images directory is writable since pre-flight didn’t complain.

If you switch your web inspector on and try an image upload, do you get any warnings/errors in the Console or Network panels? That might give us a few more clues.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2020-08-17 14:17:33

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 48

Re: Upgraded to 4.8.2; image uploads silently fail.

colak wrote #325404:

This is what I find confusing

Also, did you check the permissions of the images directory?

I mean that the directory is under the /var/www subset, even though I am not chrooting Apache. Yes, all directory permissions are correct (even loose). Only thing is that /tmp has a sticky bit although it’s not referenced or in use anywhere.

phiw13 wrote #325407:

Out of curiosity, what was the previous Textpattern version you were using ? And, I assume, uploading images worked fine there…

Does uploading “files” (from the Files panel) still work ?

It’s from 4.8.0, actually My goodness, I haven’t used “files” since around 2006. Files works, but my index has been reset. Wonder if I need to reset autoincrement.

Dragondz wrote #325412:

Hi

is it a Browser cache problem ? Try CTRL+F5

Cheers

Nope. Tried a fresh browser before posting. Thanks.

Bloke wrote #325413:

I presume the images directory is writable since pre-flight didn’t complain.

If you switch your web inspector on and try an image upload, do you get any warnings/errors in the Console or Network panels? That might give us a few more clues.

Nothing. Nada. My guess is that somehow, auto_increment numerics failed and it is blindly dropping the insert – but I don’t see the file, either, so I’m a bit confused. Hope you enjoyed the DVDs! :)

Last edited by neptho (2020-08-17 14:18:14)

Offline

#7 2020-08-17 15:58:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,419
Website GitHub

Re: Upgraded to 4.8.2; image uploads silently fail.

neptho wrote #325430:

My guess is that somehow, auto_increment numerics failed and it is blindly dropping the insert

That would make a lot of sense. If it tries to insert and the numeric ID already exists, it’ll probably fail spectacularly. I’m going to have to try that and see if it’s repeatable if the autoincrement is corrupt or reset. I would hope that we’d have the good sense to dish out an error message, but looking at the code I’m not so sure that happens. Depends how safe_insert() responds when it tries to add a row that already exists.

In theory, it should overwrite the image id. But if it returns false in any way, we should be kicking out an image_save_error. So I’d expect it to return something in either case, rather than just die silently. I’d have to try it though to find out how it behaves.

Hope you enjoyed the DVDs! :)

They were ace, thank you!

Last edited by Bloke (2020-08-17 15:59:34)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#8 2020-08-17 16:16:33

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 48

Re: Upgraded to 4.8.2; image uploads silently fail.

Yup.


MariaDB [DATERBASERZ]> select id from newtxp_txp_image;
+----+
| id |
+----+
[...]
| 69 |
| 70 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
|  0 |
+----+
83 rows in set (0.00 sec)

------------------------

Heck, I give up trying to format this text. I even looked at my old text for formatting, and can’t make this work.

Last edited by neptho (2020-08-17 16:22:24)

Offline

#9 2020-08-17 16:26:43

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 48

Re: Upgraded to 4.8.2; image uploads silently fail.

Bloke wrote #325431:

That would make a lot of sense. If it tries to insert and the numeric ID already exists, it’ll probably fail spectacularly.

It seems to just does a blind insert, without checking for mysql_insert_id() before thowing back that it didn’t fail (technically worked, but didn’t; image is also lost and doesn’t move); I guess we could rewrite things to test for one on every insert, but that also seems like a bit of nasty overhead – and kind of ugly to just assume that there will never be a NULL/0 – however, eh, it did fail without knowing it failed and never moved the image properly after doing the DB insert.

Cheers!

[ E: Clarification ]

Last edited by neptho (2020-08-17 17:27:02)

Offline

#10 2020-08-17 20:03:19

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,419
Website GitHub

Re: Upgraded to 4.8.2; image uploads silently fail.

neptho wrote #325433:

It seems to just does a blind insert, without checking for mysql_insert_id() before thowing back that it didn’t fail

Hmm. Rats. According to the PHP docs it returns 0 if no insert was made or the query wasn’t an insert. We detect this situation explicitly and pass that back as “true”, which causes the Images panel to assume everything’s hunky dory. Except it’s not. As you say, far from good.

Not sure what we can do about this. We could somehow test the auto-increment value and the highest value stored in that table, and if the former is lower than the latter, either a) abort with a suitable error, or b) reset the auto-increment to one higher than the highest value and try again, hoping no other user has encountered the same problem at the same moment to enter a race condition.

Sounds time expensive and risky. Even though it should only ever need to happen once, the fact we’re checking for it every insert – and it only needs to be done if the table we’re operating upon has an auto_increment column – slows things down.

The other avenue is to make the test above a condition of the table checker in Diagnostics. That’s off the critical path and can test only the tables we know have such columns in them. It means people could potentially diagnose auto_increment issues when weird things happen, by checking the Diagnostics. I think that’s the sanest solution.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#11 2020-08-17 21:14:27

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 48

Re: Upgraded to 4.8.2; image uploads silently fail.

Bloke wrote #325438:

Not sure what we can do about this. We could somehow test the auto-increment value and the highest value stored in that table, and if the former is lower than the latter, either a) abort with a suitable error, or b) reset the auto-increment to one higher than the highest value and try again, hoping no other user has encountered the same problem at the same moment to enter a race condition.

Sounds time expensive and risky. Even though it should only ever need to happen once, the fact we’re checking for it every insert – and it only needs to be done if the table we’re operating upon has an auto_increment column – slows things down.

The other avenue is to make the test above a condition of the table checker in Diagnostics. That’s off the critical path and can test only the tables we know have such columns in them. It means people could potentially diagnose auto_increment issues when weird things happen, by checking the Diagnostics. I think that’s the sanest solution.

I’d be a bit annoyed, personally, if my last auto_increment ID was reset every time I inserted something and expected a new ID from something I had possibly deleted – but I’ve had the same DB schema since 2006. :)

My only real suggestion is to test after insertion if my_insert_id() isn’t === 0, or to test for the file path after upload to ensure it actually exists to ensure all is well, since TXP renames things numerically based upon that insert id, which is probably why the rename failed since the file rename literally nulled it, so it was ignored by the filesystem, AFAICT.

That said, I am not really sure HOW my tables got corrupt, but it was likely unrelated to the upgrade; just really weird that they got reset to 0 without any further DB instance changes upstream, although I have no 0 ID, so possibly a bit of weird logic; I haven’t checked any of the upgrade…php files to tell why since I was finally arsed to login and check for a reason. :)

Offline

#12 2020-08-24 08:57:20

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,071
Website GitHub Mastodon Twitter

Re: Upgraded to 4.8.2; image uploads silently fail.

neptho wrote #325440:

I’d be a bit annoyed, personally, if my last auto_increment ID was reset every time I inserted something and expected a new ID from something I had possibly deleted – but I’ve had the same DB schema since 2006. :)

My only real suggestion is to test after insertion if my_insert_id() isn’t === 0, or to test for the file path after upload to ensure it actually exists to ensure all is well, since TXP renames things numerically based upon that insert id, which is probably why the rename failed since the file rename literally nulled it, so it was ignored by the filesystem, AFAICT.

That said, I am not really sure HOW my tables got corrupt, but it was likely unrelated to the upgrade; just really weird that they got reset to 0 without any further DB instance changes upstream, although I have no 0 ID, so possibly a bit of weird logic; I haven’t checked any of the _upgrade_…php files to tell why since I was finally arsed to login and check for a reason. :)

Highly recommended rss_db_manager. It helps catching some of the errors on time.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB