• Resolved Lou Friedman

    (@lou-friedman)


    Uploading files to my WP install worked fine, but when I clicked a button in the front-end it returned the error File not found!. Digging into the code within functions.php of this plugin, there is an issue on line 109:

    function dedo_root_dir( $path = '' ) {
    	return $_SERVER['DOCUMENT_ROOT'] . $path;
    }

    For my install, which was running within the folder “dev” on my webserver’s root, this was returning the error. There may be a server misconfiguration, but I’m not IT. So I altered the code to:

    function dedo_root_dir( $path = '/dev/' ) {
    	return $_SERVER['DOCUMENT_ROOT'] . $path;
    }

    And this works fine. I keep a copy locally with path set to ” and in the dev install, it is ‘dev’. When I move the site to production it will be ” again.

    But this is not very good code. It needs to be improved to work in all environments with a single file.

    http://wordpress.org/plugins/delightful-downloads/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Files does not exist – error messages as a result of subdomain’ is closed to new replies.