Donate Share

PHP DocWriter

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Error when creating tmp-dir

You are viewing a single message from this topic. View all messages.

  1. 2008-02-19 00:34:27 UTC
    Hi.

    I have just begun using your tool for a customer, but I got a bug when trying to export a document in pdw_base.php:162. The line looks line this:
    @mkdir (pdw_tmpdir.$this->tmpdir) or $this->_error ('Can\'t create temporary directories');

    The PHP-installation on my customers website simply could not handle creating dirs like this:
    <?mkdir("/foo/bar/");?>

    I had to rewrite it to this:
    <?mkdir("/foo/bar");?>


    I fixed the whole thing by changing the code from line 162 to 171:

    $mkdir_dir = pdw_tmpdir.$this->tmpdir;
    if (substr($mkdir_dir, -1, 1) == "/"){
    $mkdir_dir = substr($mkdir_dir, 0, -1);
    }

    mkdir($mkdir_dir) or $this->_error ('Can\'t create temporary directories');


    Maybe you would consider implementing this code into the official release?


    Thanks for creating a great tool! If I continue using it in the future, I will defently donate some money!


    --
    Regards
    Kasper Johansen
< Previous | 1 | Next >

Add a Reply

You can use Markdown syntax in your reply.

Preview

Monitor this

Log in to monitor this topic. Not registered? Create an account to receive email updates when replies are posted to this topic. If you do not log in or register, your reply will be added anonymously.