Bug #14797 Updated: include (_path) in Apache SAPI and CGI on Win98SE does not work

From: Date: Wed, 30 Jan 2002 17:55:33 +0000
Subject: Bug #14797 Updated: include (_path) in Apache SAPI and CGI on Win98SE does not work
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-78578@lists.php.net to get a copy of this message
ID: 14797 User updated by: m@rtin-burger.de Reported By: m@rtin-burger.de Status: Open Bug Type: Scripting Engine problem Operating System: Windows 98 SE PHP Version: 4.1.0 New Comment: Hello, D:\127\Apache\Apache.exe -d "d:\127\apache" -k shutdown D:\127\Apache\Apache.exe -w -f "D:\127\Apache\conf\httpd.conf" -d "D:\127\Apache\" Martin Previous Comments: ------------------------------------------------------------------------ [2002-01-30 12:50:54] garth@utmail.to Martin, Just checking that you're restarting Apache after each edit to PHP.ini... You don't have to restart in CGI mode for changes to happen, but SAPI needs it (since PHP is loaded into Apache's memory space). -Garth ------------------------------------------------------------------------ [2002-01-24 17:48:44] james@stealthnet.co.uk We're getting hit by this too. Funny how because the local dev box is windows xp we can't use include_path for a unix main server! :(. Anyway, I tried the idea of using C:\apache/htdocs as the DocumentRoot, and Apache stopped reading .htaccess files completely, rendering the workaround useless. This is a major issue for us, I'm having to scream for a local unix dev box... ------------------------------------------------------------------------ [2002-01-17 11:11:47] mboeren@php.net How about include(getenv("DRIVELETTER")."/foo/test.php"); and setting this environment variable locally (chances are it isn't set on the real webserver). Cheerio, Marc. ------------------------------------------------------------------------ [2002-01-17 10:56:50] m@rtin-burger.de OK, I think I has to use this workaround: if (strpos($SERVER_SOFTWARE, "Win")) { // Windows - Is there a better way to detect this? $NB_INCLUDE_PATH_PREFIX = substr($DOCUMENT_ROOT, 0, 2); // The drive letter - Is there a better way to detect this? } else { // NOT Windows $NB_INCLUDE_PATH_PREFIX = ""; } include ($NB_INCLUDE_PATH_PREFIX . "/foo/test.php"); But I'm not really happy... ------------------------------------------------------------------------ [2002-01-17 10:35:01] m@rtin-burger.de Yes, but I do not want to edit anything. I want to upload the files and then it has to work. Perhaps you can use something like this: if (strpos($SERVER_SOFTWARE, "Win")) { echo "<font color=\"#FF0000\">WINDOWS</font>"; } else { echo "<font color=\"#008000\">Uhh, good...</font>"; } But it's only a dirty workaround. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=14797 Edit this bug report at http://bugs.php.net/?id=14797&edit=1

« previous php.dev (#78578) next »