ISAPI mode - functions not working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sarah J

    ISAPI mode - functions not working


    Hi

    We have a high traffic PHP built website which, for reasons beyond my
    control, is hosted on a twin processor (Zeus) Windows 2003/IIS6 server.
    PHP 4.4.1 came preinstalled as a CGI but because of the load we were
    getting random 'CGI Header' errors. Microsoft have found the problem to
    be with the processors entering 'race mode' (because of the high number
    of CGI processes being created), and have advised us to run PHP in
    ISAPI mode. So I have configured IIS to do this. PHP runs well in this
    mode except for in one crucial area - no file system functions are now
    working. Examples being;

    realpath()
    file_exists()
    readfile()
    readdir()
    fopen()

    and so on..

    For example this code:

    echo realpath('index .html');

    which works as expected in CGI mode returns FALSE in ISAPI mode.

    Similarly if I try to open an existing file with fopen() I get a 'file
    does not exist' type error. The same happens if I use the absolute path
    to the file.

    Now I've been searching the groups and php.net and can find no
    reference to this particular problem so I'm sure this is NOT a bug in
    PHP but more likely some kind of configuration problem, possibly
    something I need to enter in php.ini?

    I can toggle IIS between CGI and ISAPI and all the file based functions
    work perfectly in CGI mode and not at all in ISAPI. Both use the same
    php.ini file.

    If anyone can shed any light on this matter I would be most grateful.

    Thanks

Working...