No announcement yet.

Get attachments to work under Windows Advanced Server 2000

  • Filter
  • Time
  • Show
Clear All
new posts

  • Get attachments to work under Windows Advanced Server 2000

    Just thought I'd give you guy's a hand. I'm new to vB and spent all weekend on a few problems..... including the attachement "BROWSE" button to submit a graphic.

    Well after reading all the posts I played around a little more and this is what I changed in my "C:\WINNT\PHP.ini" file. Open up notepad or wordpad and click on EDIT..... then FIND. Type in the FIND box "uploads" and it will bring you to this location below under EXAMPLE:

    ; File Uploads ;

    ; Whether to allow HTTP file uploads.
    file_uploads = On

    ; Temporary directory for HTTP uploaded files (will use system default if not
    ; specified).
    upload_tmp_dir = C:/inetpub/forums/temp/ ; temporary directory for HTTP uploaded files (will use system default if not specified)

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 2M
    Make sure you use forward slash, wack or what ever you want to call it as it apears i.e. "upload_tmp_dir = C:/inetpub/forums/temp/ "

    I also tested it out by creating a "temp" directory in the root (C:\).

    That also work and then I rewrote the PHP.ini file with the new mapping you see above.

    On my vB system the full graphic is displayed NOT A LINK TO AN ICON that brings up a seperate page!!!!

    This is what I wanted to begin with.

    I hope this helps my fellow Windows/98/NT/2000 users out there.

    Just a note.... I think in the future it would be more constructive to post a reply to a question with a full answer.... like the file in reference that needs to be changed i.e. (PHP.ini located in your WINNT folder....). Good Examples will always get good results. Plus when you post a question be as specific as you can with details of your OS (Operating System) and files that your trying to tweak i.e. PHP.ini or MySQL....... yada yada.

    You may check out my test boards at:

    Last edited by RJ Jaffey; Tue 5 Jun '01, 12:18am.

  • #2
    Wonderful post. Thank you immensely. This fixed all my problems.


    • #3
      umm i still not working.
      what version of php do u have and mysql. also are you using IIs 5. IF so what mode are you running php. isapi or cgi. Thx


      • #4
        i spend also a few of weekends for this problem.

        i fixed it also.

        if in your newreply and newthread in the form tag not the enctype=multipart/........ you are unable to post attachments.

        so i wrote a little regular expression in newreply and newthread to distinguish if the user browser with ie4 or ie5. so if the user use ie4 post not work with enctype in the form tag. and if user use ie5 attachment posting not work without enctype in the form tag.

        here the script:



        $AGENT = getenv("HTTP_USER_AGENT");
        if (preg_match("/MSIE 4./i", $AGENT) || preg_match("/Windows 95/", $AGENT)) {
        } else {


        Thats all.

        oh no. you have to create two new templeates (newreply and newreply1). so in newreply is the enctype existing and in the newreply1 not.


        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.