Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-06-06 16:05:57
- chrisgoodhue
- Member
- Registered: 2010-06-06
- Posts: 20
file_download directory problems
the file_download_link tag is calling a file from the file_download directory, but none of my files are there and the directory doesn’t exist. I’m not sure if this is something I have to set up and set my default file directory to.
i also cannot download them from the file area.
has anyone else experienced this problem?
Offline
#2 2010-06-06 18:41:30
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: file_download directory problems
Your first step should be to look at “ Preferences > Advanced > File Directory path” and ensure that it points to a directory that does exist.
Offline
#3 2010-06-06 18:49:04
- masa
- Member
- From: North Wales, UK
- Registered: 2005-11-25
- Posts: 1,095
Re: file_download directory problems
The files and images directories are part of the txp installation – after you’ve ftped the entire contents of the txp folder they definitely should show up on the server.
A standard install should contain these items in the web root:
- .htaccess
- css.php
- files
- HISTORY.txt (can be deleted)
- images
- index.php
- README.txt (can be deleted)
- rpc
- sites
- textpattern
Last edited by masa (2010-06-06 18:50:14)
Offline
#4 2010-06-07 13:20:24
- chrisgoodhue
- Member
- Registered: 2010-06-06
- Posts: 20
Re: file_download directory problems
thanks for the responses.
i have the correct items in the web root and have been uploading files into the “files” directory.
when i clicked on a file to view the details and click “download” i am taken to http://mysite.com/file_download/id/filename, where the file i uploaded does not exist.
any thoughts?
Offline
Re: file_download directory problems
/file_download/
is a ‘virtual’ (well, fake) directory. It’s simply a trigger that TXP uses to initiate a download and update the download counters in the database. Behind the scenes, TXP takes the /id
number, looks up the file name in the database and redirects to site.com/files/your_file_name
to serve the file.
If that last part is not happening, you may want to check your file paths are correct, as rsilletti suggested. Also make sure you definitely don’t have a real directory called file_download
or TXP/Apache might get confused.
I believe the file_download
feature relies on clean URLs and some features of your hosting environment. Is there anything in TXP’s Admin->Diagnostics tab that might give away what’s happening here? Anything in your apache logs? Any spurious .htaccess rules? If you have access to Firebug or the brilliant LiveHTTPHeaders firefox AddOn, they may also show you what TXP is actually trying to deliver and might lead you to an answer.
Hope some of that helps.
EDIT: when you say you’re uploading files to the files directory, are you doing that via the TXP interface or via FTP?
Last edited by Bloke (2010-06-07 13:30:22)
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 2010-06-07 13:34:34
- chrisgoodhue
- Member
- Registered: 2010-06-06
- Posts: 20
Re: file_download directory problems
I have been uploading the files via FTP.
I just checked the Diagnostics and it says my Clean URLs test failed. I’ve got to look into this.
Thanks so much for your help!
Offline
Re: file_download directory problems
chrisgoodhue wrote:
“files” directory […] http://mysite.com/file_download/id/filename
The /file_download/ is not an actual directory. In that form the file downloads urls are rewritten and do require working clean URLs. This is because Textpattern delivers the files with PHP script and doesn’t link directly to the files.
Please, provide your site’s High diagnostics (TXP/Admin/Diag/High).
Edit. Me slow, Stef fast.
Last edited by Gocom (2010-06-07 13:36:46)
Offline
#8 2010-06-07 13:37:08
- chrisgoodhue
- Member
- Registered: 2010-06-06
- Posts: 20
Re: file_download directory problems
here is my high diagnostics:
Textpattern version: 4.2.0 (r3275)
Last Update: 2010-06-05 14:37:29/2010-06-05 14:26:47
Document root: /home/stushmus/public_html
$path_to_site: /home/stushmus/public_html
Textpattern path: /home/stushmus/public_html/textpattern
Permanent link mode: section_id_title
Temporary directory path: /tmp
Site URL: stushmusicdigital.com
PHP version: 5.2.9
GD Image Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server TZ: America/New_York
Server Local Time: 2010-06-07 09:36:41
DST enabled?: 0
Automatically adjust DST setting?: 0
Time Zone: America/Caracas (-16200)
MySQL: 5.0.90-community
Locale: en_GB.UTF-8
Server: Apache
Apache version: Apache
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Linux 2.6.9-89.0.7.ELsmp
Active plugins: jnm_audio-0.3m, upm_file-0.4.1, upm_file_popper-0.2.2, jps_img_selector-0.2
Admin-side theme: classic 4.2.0
Pre-flight check:
————————————
Clean URL test failed.
————————————
.htaccess file contents:
————————————
————————————
Charset (default/config): latin1/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: /usr/share/mysql/charsets/
17 Tables: OK
10 Custom Fields: custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10 (10)
PHP extensions: xmlwriter/0.1, libxml, dom/20031129, xmlreader/0.1, xml, wddx, tokenizer/0.1, session, pcre, SimpleXML/0.1, sockets, soap, SPL/0.2, standard/5.2.9, Reflection/0.1, posix, mysqli/0.1, mysql/1.0, mhash, mcrypt, mbstring, json/1.2.1, imap, iconv, hash/1.0, gd, ftp, filter/0.11.0, exif/1.4 $Id: exif.c,v 1.173.2.5.2.27 2008/12/31 11:17:37 sebastian Exp $, date/5.2.9, curl, ctype, calendar, bcmath, zlib/1.1, openssl, apache2handler, PDO/1.0.4dev, pdo_sqlite/1.0.1, SQLite/2.0-dev, pdo_mysql/1.0.2, ionCube Loader, Zend Optimizer
Apache modules: core, mod_authn_file, mod_authn_default, mod_authz_host, mod_authz_groupfile, mod_authz_user, mod_authz_default, mod_auth_basic, mod_include, mod_filter, mod_deflate, mod_log_config, mod_logio, mod_env, mod_expires, mod_headers, mod_unique_id, mod_setenvif, mod_version, mod_proxy, mod_proxy_connect, mod_proxy_ftp, mod_proxy_http, mod_proxy_scgi, mod_proxy_ajp, mod_proxy_balancer, mod_ssl, prefork, http_core, mod_mime, mod_dav, mod_status, mod_autoindex, mod_asis, mod_info, mod_suexec, mod_cgi, mod_dav_fs, mod_negotiation, mod_dir, mod_actions, mod_userdir, mod_alias, mod_rewrite, mod_so, mod_auth_passthrough, mod_bwlimited, mod_fpcgid, mod_php5, mod_security2
/home/stushmus/public_html/index.php:
r3189 (8becf5ea8d9ced7d05b2433dfbabf868)
/home/stushmus/public_html/css.php:
r3189 (7a0cc56c9dc585e56aab80bc0fb22c53)
/home/stushmus/public_html/textpattern/css.php:
r3189 (459137eeb00bb07136001528ce724192)
/home/stushmus/public_html/textpattern/include/txp_admin.php:
r3203 (26c4f327450f66618fe82b06fb8b9e70)
/home/stushmus/public_html/textpattern/include/txp_article.php:
r3246 (9211f37e8ba873c78b0c46186896d6b2)
/home/stushmus/public_html/textpattern/include/txp_auth.php:
r3250 (6be154f05fca4e83c4a4947c8635afd7)
/home/stushmus/public_html/textpattern/include/txp_category.php:
r3203 (2350c33b6acc663b56ba982bc479c920)
/home/stushmus/public_html/textpattern/include/txp_css.php:
r3118 (bfd945a0b268c60f7b71b6535c06154e)
/home/stushmus/public_html/textpattern/include/txp_diag.php:
r3267 (c03f4b7e28c2f8e5050924b6caf2f61f)
/home/stushmus/public_html/textpattern/include/txp_discuss.php:
r3185 (9b08de9e4f2df7160105ff218134ec67)
/home/stushmus/public_html/textpattern/include/txp_file.php:
r3200 (dc26e8f4cbb1821c466c14926c8a10ca)
/home/stushmus/public_html/textpattern/include/txp_form.php:
r3260 (6ad789075a6a1811d027f5e4043b845d)
/home/stushmus/public_html/textpattern/include/txp_image.php:
r3267 (814b6421cb2e2df073d0d6bf05c252bf)
/home/stushmus/public_html/textpattern/include/txp_import.php:
r3203 (fb18d629321a93472674dbd4abbfc63c)
/home/stushmus/public_html/textpattern/include/txp_link.php:
r3203 (7dee2f899aa22712e4f5f1005c6853b0)
/home/stushmus/public_html/textpattern/include/txp_list.php:
r3203 (2dd80b98cb76b0532133f6d7c2bcccb9)
/home/stushmus/public_html/textpattern/include/txp_log.php:
r3203 (a97af8e5ed62605ab0111e45266300cb)
/home/stushmus/public_html/textpattern/include/txp_page.php:
r3260 (ef00267f34445a33ce0f2e453c3a20db)
/home/stushmus/public_html/textpattern/include/txp_plugin.php:
r3203 (8c1691e89ccfc8a8f9160e66efce2b09)
/home/stushmus/public_html/textpattern/include/txp_prefs.php:
r3235 (9833b1a7cbd01def4ceb40f8cdf01a3b)
/home/stushmus/public_html/textpattern/include/txp_preview.php:
r1238 (cc7d08574508c8ec1e4c5281d534d6e3)
/home/stushmus/public_html/textpattern/include/txp_section.php:
r3203 (1c7eec911a015b72e42d5cea903be426)
/home/stushmus/public_html/textpattern/include/txp_tag.php:
r3195 (280f0fd2e6f50e6a0f13490ea5dfc1f4)
/home/stushmus/public_html/textpattern/index.php:
r3275 (6e259f5394d65617809d25e4823de174)
/home/stushmus/public_html/textpattern/jquery.js:
unknown (bb381e2d19d8eace86b34d20759491a5)
/home/stushmus/public_html/textpattern/lib/IXRClass.php:
r2932 (6c533bb271087338aa19ca0b78b1810f)
/home/stushmus/public_html/textpattern/lib/admin_config.php:
r3202 (524b829d7c73e5db26415633e799e350)
/home/stushmus/public_html/textpattern/lib/class.thumb.php:
r3107 (0e3f7b9da4b0c77f9b75263142598902)
/home/stushmus/public_html/textpattern/lib/classTextile.php:
r2812 (b3e4cd9bd5fb469fabdebb2c0376f7e7)
/home/stushmus/public_html/textpattern/lib/constants.php:
r3133 (b296756aedaf98b6f9420359dd07abdb)
/home/stushmus/public_html/textpattern/lib/taglib.php:
r2868 (a0662fa399fb16e837e8852f044dade9)
/home/stushmus/public_html/textpattern/lib/txplib_admin.php:
r3047 (54de3f807984122ebe9b8b955e5189f4)
/home/stushmus/public_html/textpattern/lib/txplib_db.php:
r3250 (c29e316100ae6ed42d6ec51506388b5f)
/home/stushmus/public_html/textpattern/lib/txplib_forms.php:
r3256 (2623d94099735edc0e7a51309c26665d)
/home/stushmus/public_html/textpattern/lib/txplib_head.php:
r3265 (4492de4935f8352357f0809d9d89516f)
/home/stushmus/public_html/textpattern/lib/txplib_html.php:
r3255 (adb712630ad3bbe59c5f716befa33f0a)
/home/stushmus/public_html/textpattern/lib/txplib_misc.php:
r3271 (68d443f0f20acec5e86857a823c2b4e2)
/home/stushmus/public_html/textpattern/lib/txplib_theme.php:
r3269 (83bcbeffa883bed5f0af951dda7be2fb)
/home/stushmus/public_html/textpattern/lib/txplib_update.php:
r2812 (5e6821f06aeafe50b54e5a273423384f)
/home/stushmus/public_html/textpattern/lib/txplib_wrapper.php:
r2931 (1c1b260a13c67657f1678d72559583bc)
/home/stushmus/public_html/textpattern/publish.php:
r3258 (bc931a3406370c1ea4139ef957e95e38)
/home/stushmus/public_html/textpattern/publish/atom.php:
r3029 (f8cc6dbfb5a5f2b39ec480589b2d59c3)
/home/stushmus/public_html/textpattern/publish/comment.php:
r3266 (815df18aa4d451246ee70dd0502a8484)
/home/stushmus/public_html/textpattern/publish/log.php:
r3247 (1c047309f6f13883b29a943d1cddec3a)
/home/stushmus/public_html/textpattern/publish/rss.php:
r3029 (c39570953c1bd8347e456d750317b815)
/home/stushmus/public_html/textpattern/publish/search.php:
r2812 (29a315e2435b73fe3d3a4d83fe84ba19)
/home/stushmus/public_html/textpattern/publish/taghandlers.php:
r3256 (a40dce2989737477b1147d2104bba326)
/home/stushmus/public_html/rpc/index.php:
r2998 (682e18cb9bdd6e9442a9ac23db1a591f)
/home/stushmus/public_html/rpc/TXP_RPCServer.php:
r3250 (84ff888bf577670c897fdc27ad580c0f)
/home/stushmus/public_html/textpattern/theme/classic/classic.php:
r3191 (722c6c7f2c8dbfee5c6cede0af2cd689)
/home/stushmus/public_html/textpattern/update/_to_1.0.0.php:
r3047 (cbd20d275bf74184b1112569c2e77f76)
/home/stushmus/public_html/textpattern/update/_to_4.0.2.php:
r3047 (4c9f8cd5c16bf19ff191ab35f0354e0f)
/home/stushmus/public_html/textpattern/update/_to_4.0.3.php:
r3047 (6a4af33a23caf950c05faca0e8b4c93b)
/home/stushmus/public_html/textpattern/update/_to_4.0.4.php:
r3047 (b235e2a27a6e79652ef078f62f73eb21)
/home/stushmus/public_html/textpattern/update/_to_4.0.5.php:
r2894 (d17a02f48b79dbe6b3b0cf6eb779aadb)
/home/stushmus/public_html/textpattern/update/_to_4.0.6.php:
r3047 (4d7b21635fbf46058cc539a0eec00561)
/home/stushmus/public_html/textpattern/update/_to_4.0.7.php:
r3014 (e8ba7dc2892b81ce89b62775e2f5ea17)
/home/stushmus/public_html/textpattern/update/_to_4.0.8.php:
r3057 (d699021db8e7c9f7d32f3ad3631caebc)
/home/stushmus/public_html/textpattern/update/_to_4.2.0.php:
r3233 (aec6e4aafa98dbafe75506efd7f85816)
/home/stushmus/public_html/textpattern/update/_update.php:
r3275 (e9085d568d49ff7910ffd4eb49bbe293)
————————————
Offline
Re: file_download directory problems
chrisgoodhue wrote:
I have been uploading the files via FTP.
OK, in which case TXP won’t know about them. You need to link the files you’ve already uploaded into the database from the Files tab’s existing files dropdown. After that, and you’ve investigated the clean URLs thing, you should be on the highway to file downloadsville :-)
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
#10 2010-06-07 17:54:13
- chrisgoodhue
- Member
- Registered: 2010-06-06
- Posts: 20
Re: file_download directory problems
thanks for everyone’s help!
i think it’s obvious i’m a designer and not a developer
Offline
#11 2010-06-11 02:12:19
- chrisgoodhue
- Member
- Registered: 2010-06-06
- Posts: 20
Re: file_download directory problems
sorry to be back here…
i found that the .htaccess file needs to be modified to ensure that clean urls are enable.
unfortunately when i go to edit the file, there is nothing there.
do you know whats going on?
Offline
#12 2010-06-11 02:17:30
- chrisgoodhue
- Member
- Registered: 2010-06-06
- Posts: 20
Re: file_download directory problems
i figured everything out!
Offline