Files Bug?
Forum » Wikidot version 1 / Bugs » Files Bug?
started by: Ed JohnsonEd Johnson
on: 1203649386|%e %b %Y, %H:%M %Z|agohover
number of posts: 5
rss icon RSS: new posts
Files Bug?
Ed JohnsonEd Johnson 1203649386|%e %b %Y, %H:%M %Z|agohover

Here I go again! ;)

It looks like something is amiss with file handling, specifically linking/downloading.

I uploaded a variety of files to my test server.

Problem #1: all files are identified as "MIPS archive" regardless of the actual file type/extension.
Problem #2: after a successful upload, the file can not be downloaded. The link looks OK when you hover over it, but the actual URL gets changed and it always comes back with a 404 - Not Found error.
I took some screen shots to show what's happening:


File Information screen after successfully uploading the file:

  • Note the URL looks OK, but the file type is wrong.
File_Issue_1.jpg

Note the status bar shows what appears to be the correct link information while hovering over the file link:

File_Issue_2.jpg

Clicking the link produces this - the path is totally incorrect!

File_Issue_3.jpg

The actual file uploaded is where (I think) it should be on the Wikidot server:

File_Issue_4.jpg

Any help for this one?
Thanks again!

-Ed

last edited on 1203649664|%e %b %Y, %H:%M %Z|agohover by Ed Johnson + show more
unfold Files Bug? by Ed JohnsonEd Johnson, 1203649386|%e %b %Y, %H:%M %Z|agohover
Re: Files Bug?
GabrysGabrys 1203677828|%e %b %Y, %H:%M %Z|agohover

Hi Ed,

I had similar problem with MIME types. I don't exactly what it is caused by, but here is a solution:

cp /usr/share/file/magic* /var/www/wikidot/lib/magic/

I have no idea what's wrong with the paths, I'll check that now.

And I can't reproduce your problem… Are you sure you're not using custom domains?


Piotr Gabryjeluk
visit my Dev blog

last edited on 1203678455|%e %b %Y, %H:%M %Z|agohover by Gabrys + show more
unfold Re: Files Bug? by GabrysGabrys, 1203677828|%e %b %Y, %H:%M %Z|agohover
Re: Files Bug?
Ed JohnsonEd Johnson 1203685974|%e %b %Y, %H:%M %Z|agohover

Thanks for the tip on MIME types - I'll give that a try.

I do not have custom domains enabled. Here's a part of my GlobalProperties.php file:

/**
 * Global configuration properties. Please adjust this file to your needs.
 *
 */
class GlobalProperties {

    /**
     * Name of your service, e.g. "MIT University Wikis".
     */
    public static $SERVICE_NAME = "The Pizzageek's Wiki";

    /**
     * Domain name.
     */
    public static $URL_DOMAIN = "pizzageek.is-a-geek.com";

    /**
     * URL of documentation site.
     */
    public static $URL_DOCS = "http://www.wikidot.org/doc";

    /**
     * The IP of your server.
     */
    public static $IP_HOST = "192.168.0.108";

    /**
     * Allow (and process) the custom domains for the wikis. Most admins
     * would like this disabled and keep all the wikis within the
     * URL_DOMAIN domain.
     */
    public static $USE_CUSTOM_DOMAINS = false;

    /**
     * Allow users to configure SSL settings for their wikis.
     */
    public static $USE_SSL = false;

    /**
     * Session expiry time (in seconds). After that period the session will be reset and
     * authorisation will be lost.
     */
    public static $SESSION_TIMEOUT = 3600; // in seconds

    public static $SESSION_COOKIE_NAME = "WIKIDOT_SESSION_ID";
    public static $SESSION_COOKIE_SECURE = false; // by default
    public static $SESSION_COOKIE_DOMAIN = null;

    /**
     * Database settings. For type the valid value is: "pgsql". 
     */

    public static $DATABASE_TYPE = "pgsql";
    public static $DATABASE_SERVER = "127.0.0.1";
    public static $DATABASE_PORT = "5432";

    public static $DATABASE_USE_PERSISTENT_CONNECTIONS = false;

    public static $DATABASE_USER = 'wd';
    public static $DATABASE_PASSWORD = 'wdpass';
    public static $DATABASE_NAME='wd1';

    /**
     * Memcached settings.
     */

    public static $USE_MEMCACHE = false;
    public static $MEMCACHE_HOST = '127.0.0.1';
    public static $MEMCACHE_PORT = 11211;

Looking closer at the 404 error, you're right, it would look like the link is trying to find the file in the custom--domains folder rather than the files--sites folder where they are actually located. The strange part is the files are apparently put in the right place during upload, but get lost when trying to download.

Would the fact that I renamed my server to my new DynDNS name (pizzageek.is-a-geek) possibly affect this? All I did was update GlobalProperties.php after making that change. Are there other config files affected by this that I should check? Or possibly, the "$IP_HOST" setting? I used my internal IP, not my external one - does that make a difference? Should it be localhost (127.0.0.1) perhaps?

I may try another wipe/reinstall this weekend to see if that makes a difference.

Thanks again. With everyone's help we may get a bug-free install going yet! ;)

-Ed

last edited on 1203687040|%e %b %Y, %H:%M %Z|agohover by Ed Johnson + show more
unfold Re: Files Bug? by Ed JohnsonEd Johnson, 1203685974|%e %b %Y, %H:%M %Z|agohover
Re: Files Bug?
GabrysGabrys 1204115100|%e %b %Y, %H:%M %Z|agohover

The IP is only used in one place — a template showing you information about how to set up a custom domain mapping (i.e. "change your DNS settings to point to IP address: w.x.y.z").


Piotr Gabryjeluk
visit my Dev blog

last edited on 1204143059|%e %b %Y, %H:%M %Z|agohover by Gabrys + show more
unfold Re: Files Bug? by GabrysGabrys, 1204115100|%e %b %Y, %H:%M %Z|agohover
Re: Files Bug?
Ed JohnsonEd Johnson 1203687428|%e %b %Y, %H:%M %Z|agohover

Gabrys,

I just wanted to confirm that your fix for the MIME types worked great.

One more off the list!

-Ed

unfold Re: Files Bug? by Ed JohnsonEd Johnson, 1203687428|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License