• Hi,
    It’s my third night of trying to get a working WP in a WIMP platform (Windows XP – IIS 5.1 – Mysql 4.1 – Php 4.3.9)
    Before telling about my current problem with uploading, I will summarize my experiences and working around so far:
    1. Because I chose to use Mysql 4.1 my first problem was to connecto to the database. The solution was a password thing: I had to alter the password of admin with: mysql> set password for admin@localhost = old_password(‘pwd’);
    2. Everytime I login the siteurl value (in wp_options table) was set to null, therefore all links were wrong. Solution: comment the lines 153-155 of wp-login.php:
    //if ( dirname(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]) != get_settings(‘siteurl’) )
    // update_option(‘siteurl’, dirname(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]) );
    From there everything else seems to work fine, except for the upload functionality. At the beginning I was getting no single error but a succesful upload with size:0kb and no file on the upload directory. I’ve been playing with all sort of urls for the destination directory and nothing.
    I’ve also give write permission to the upload file but nothing.
    Looking carefully at the result text after uploading I first realized that the URI has a space in between the URI set in options and the name of the file.
    I fixed that by updating the option_value direclty in the database.
    Then I went to look upload.php. I realized that there was missing a ‘$’ in line 180 (aprox):
    // Still couldn’t get it. Give up.
    –> THIS $ WAS MISSING if (!$moved) {
    die(sprintf(__(“Couldn’t upload your file to %s.”), $pathtofile));
    } else {
    chmod($pathtofile, 0666);
    @unlink($img1);
    }
    After fixing the result now changed and I’m getting the following error:
    Couldn’t upload your file to c:/Inetpub/wwwroot/wordpress/wp-content/file.gif
    Now it’s almost midnight so no more brain able to work for more trials…
    any idea? please HELP!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator James Huff

    (@macmanx)

    Try setting the upload file’s permissions to 777 (CHMOD 777).

    Thread Starter natata

    (@natata)

    Thanks for the advice, but I can’t do CHMOD in IIS. What I did was to give write access persmission, but it didn’t work.
    More ideas?

    Are you planning on serving your blog from your computer ? And also posting to it remotely ?
    Have you checked out the php.ini file and any readme ?

    Thread Starter natata

    (@natata)

    For the first question the answer is a yes and no :). I’m at the moment testing it in my own personal webserver, but later on I plan to move it to my deparment’s webserver at the university. Second question, definetly yes.
    What do you reckon I should check on the php.ini?
    I plan to do a bit of research on the functions move and copy that upload.php use to upload files.

    If it’s just for testing, don’t stress about the upload – just copy images to the correct folder using windows explorer, and link with code.
    My first XP Home / Xampp setup, it wouldn’t “upload” but now it does – I have no idea what I changed, if I did in fact. (And I never use it – I always copy images straight into the folder but hardly ever do that as my local blogs are always for testing / breaking)
    If it isn’t working, it could be the ini file, or it could be IIS just being plain unreasonable.

    Thread Starter natata

    (@natata)

    Thanks for the clearification! I think I missunderstood the real functionality of “upload” as it is offered. Now I see that is basically for admin user, who’s the only one who can directly copy images straight into the folder…
    What I was after was a ‘real’ upload tool where I can offer also to external poster to upload files (doc, ppt, pdf, etd) as part of their posts or comments.
    Is that possible? Probably I should look at the existents plugins to see if there is something like that.

    hi natata,
    if I remember correctly you need to give the windows
    user IUSR_your_machine_name write permission to the upload directory.
    That is the windows equivalant of a *nix chmod 0777
    Regards
    adsworth

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Upload with WIMP’ is closed to new replies.