#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    I am running an intranetserver at work with IIS4 and PHP 4.0.3pl1. Everything runs great, except when I user scripts that uses the GD library.
    I get an errormessage that there is no space for generating the temporary file or it just loads forever.
    I know I have to specify a temporary directory somewhere but I don't know where!
    Probably in PHP.ini, but I can't find information about where and with which syntax. Please, help me, it is an emergency for me!
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    I'm not sure exactly what your problem is, but is PHP installed on c: or is it on another drive?

    If PHP is not on C: then you need to have a file on c: called my.cnf, which tells the OS what the PHP base directory is (basedir = e:/mysql/), for example.

    If that is set up correctly, and there is a php.ini in your WINNT directory, then PHP should use the system default TEMP directory unless you specify otherwise in php.ini

    Also, did you install PHP as an NT service, that starts automatically?

    Check out www.php4win.de, which has a complete PHP distribution for Windows that is quite useful.

    OTOH, the problem could be in your PHP script itself, maybe trying to load an image that is larger than 8 MB, which is the default max memory allowed by any PHP script. You can change that, though, in php.ini.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    The problem is that it either loads forever or I get an error message about not being able to create temporary file of the picture. The fun part is that I can run everything under an Apache server, there is no problem with temfiles or anything similar.
    But I *have* to get it to work under MS IIS4.

    On my machine at home I have PHP on D: since I have a dualoboot installation of NT with Windows ME on C: and NT on d:
    But on my Intranetserver at work I have everything on c: and I have the same problem with it.

    About the my.cnf: Where can I get one or see how it is supposed to be? I do not use MySQL as a DB, I am working against an MS SQL 7.0.
    And everything works perfectly with connections and everything against the SQL server.
    How do I start PHP as a service? I run it now as a cgi.
    The picture is not too big, it is an autogenerated graph which is somwhere around 78kb in size...

    Since it doesn't seem like it is using my system temp dir, how and where do I specify it in PHP.INI?

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rycamor:
    I'm not sure exactly what your problem is, but is PHP installed on c: or is it on another drive?

    If PHP is not on C: then you need to have a file on c: called my.cnf, which tells the OS what the PHP base directory is (basedir = e:/mysql/), for example.

    If that is set up correctly, and there is a php.ini in your WINNT directory, then PHP should use the system default TEMP directory unless you specify otherwise in php.ini

    Also, did you install PHP as an NT service, that starts automatically?

    Check out www.php4win.de, which has a complete PHP distribution for Windows that is quite useful.

    OTOH, the problem could be in your PHP script itself, maybe trying to load an image that is larger than 8 MB, which is the default max memory allowed by any PHP script. You can change that, though, in php.ini.
    [/quote]

  6. #4
  7. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    I have never run PHP as a CGI under WinNT, so I don't know how to set permissions for temp file space. When you run PHP as an ISAPI service, though, it has no problem creating images and using default TEMP space.

    I would strongly recommend you set up PHP to run as an ISAPI service. You will get MUCH better performance. As I said, try the complete distribution at www.php4win.de, which is a custom-compiled binary specifically for Windows, with GD support, Java, etc... automatically included.

    Unzip to it's own directory. Follow the directions in the readme.first file. Copy the php.exe file from the sapi directory to the PHP root (overwriting the other php.exe), then read the README.txt in the readme directory for instructions on configuring Internet Services Manager for PHP.

    This worked for me the first time, and I was running GD creating images in minutes. Hope it helps.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0

    Well.. just shoot me.. all I can say t defend myself is that I am home from work sick with fever! Of course I am running it as an ISAPI service not as an CGI!
    And I have upgraded to the PHP distributions you mention. I am doing some progress now.
    Thanks!
    /Jari



IMN logo majestic logo threadwatch logo seochat tools logo